A multi-turn pulse width modulation (PWM) generator for generating a PWM output
corresponding to multiple 360 degree turns. A counter receives a reference signal,
and counts a number of cycles of the reference signal to generate a binary output
corresponding to the number of cycles counted. A frequency divider receives a sensor
output signal, and divides the frequency of the sensor output signal by the number
of turns in the multiple turns to generate a frequency divided signal. The sensor
output signal has substantially the same frequency as the reference signal, but
can be offset in phase from the reference signal. A demultiplexer receives the
binary output, and generates a plurality of turn indicator signals, each corresponding
to one of the multiple turns. A multiplexer receives the turn indicator signals
and a mechanical turn indication signal, and selects one of the turn indicator
signals that corresponds to the mechanical turn indication signal. At least one
flip flop receives the selected one of the turn indicator signals and the frequency
divided signal, and generates the PWM output using the selected one of the turn
indicator signals and the frequency divided signal. The multi-turn PWM generator
may be combined with a single-turn angular position sensor to form a multi-turn
angular position sensor.