A printer has a motor and an encoder. The encoder opposes a scale having marks or slits at predetermined intervals. Staggered detectors detect positions of the marks or slits, and output detection signals. Signal generators output signals with respective frequencies based on the various detectors. A controller detects the rotational position and speed of the motor the signals output from the signal generators, and controls the rotational speed of the motor by PID control on the basis of the position and speed thus detected.