MOTOROLA
74
M68HC11 K Series
MC68HC11TS/D
12 Pulse-Width Modulation Timer
M68HC11 K-series MCUs contains a PWM timer that is composed of a four-channel 8-bit modulator.
Each of the modulators can create independent continuous waveforms with software-selectable duty
rates from 0% to 100%.
The PWM provides up to four pulse-width modulated waveforms on port H pins. Each channel has its
own counter. Pairs of counters can be concatenated to create 16-bit PWM outputs based on 16-bit
counts. Three clock sources (A, B, and S) and a flexible clock select scheme give the PWM system a
wide range of frequencies.
Four control registers configure the PWM outputs —PWCLK, PWPOL, PWSCAL, and PWEN. The PW-
CLK register selects the prescale value for the PWM clock sources and enables the 16-bit PWM func-
tions. The PWPOL register determines each channel's polarity and selects the clock source for each
channel. The PWSCAL register derives a user-scaled clock based on the A clock source, and the
PWEN register enables the PWM channels.
Each channel has a separate 8-bit counter, period register, and duty cycle register. The period and duty
cycle registers are double buffered so that if they are changed while the channel is enabled, the change
does not take effect until the counter rolls over or the channel is disabled. A new period or duty cycle
can be forced into effect immediately by writing to the period or duty cycle register and then writing to
the counter.
With channels configured for 8-bit mode and E = 4 MHz, PWM signals of 40 kHz (1% duty cycle reso-
lution) to less than 10 Hz (approximately 0.4% duty cycle resolution) can be produced. By configuring
the channels for 16-bit mode with E = 4 MHz, PWM periods greater than one minute are possible.
In 16-bit mode, duty cycle resolution of almost 15 parts per million can be achieved (at a PWM frequen-
cy of about 60 Hz). In the same system, a PWM frequency of 1 kHz corresponds to a duty cycle reso-
lution of 0.025%.