Motion in a periodic potential driven by rectangular pulses