![Dallas DS87C550 User Manual Supplement Download Page 93](http://html1.mh-extra.com/html/dallas/ds87c550/ds87c550_user-manual-supplement_3298646093.webp)
DS87C550 High-Speed Microcontroller User’s Guide Supplement
93 of 93
Similarly, setting bit PW1T/C (PW01CON.0) allows register PWM1 to access the MSB of the 16-bit
counter. Clearing it accesses the MSB compare value register.
As described in 8-bit mode, flags PW0F (PW01CON.7) and PW2F (PWM23CON.7) indicate a rollover
from 0FFh to 00h of the counters for 16-bit PWM0 and PWM1 respectively.
The PWM outputs are disabled on all forms of reset. To enable the output of 16-bit PWM0 on pin
PWMO0, the bit PW0OE (PW01CON.5) must be set, and to enable the output of 16-bit PWM1 on pin
PWMO2, the bit PW2OE must be set.
All of the Clock Generator sections operate exactly as they did in 8-bit mode. The thing to remember is
that only registers and bits for Clock Generators used for 8-bit PWM0 and PWM2 will function in 16-bit
mode. Other registers and bits used in 8-bit mode (PWM1, PWM3 as examples) no longer serve a
purpose in 16-bit mode.
As before, bits PW0S2:0 and PW0EN (PW01CS7:4) will enable the prescaler and will determine the
selected PWM-Clock input for 16-bit PWM0. Similarly, bits PW2S2:0 and PW2EN (PW23CS7:4) ) will
enable the prescaler and will determine the selected PWM-Clock input for 16-bit PWM1. Bits
PW01CS3:0 and PW23CS3:0 have no effect when the corresponding PWM channel is set for 16-bit
mode.
The same is true for the Clock Generator divisors. Only those associated with 8-bit PWM functions 0 and
2 will have any effect. It is important to recognize that while the Clock Generators operate in the same
way and produce the same clock frequencies as they did in 8-bit mode, the repetition rate will be much
longer since the clock now operates a 16-bit counter in the Pulse Generator module. Therefore the
equation for the 16-bit mode repetition rate is as follows:
Repetition Rate (8-bit mode) =
65,536
Clock
PWM
Using the previous example where the PWM clock was 2.76 MHz, the 16-bit repetition rate becomes:
Repetition Rate (8-bit mode) =
65,536
Clock
PWM
=
65,536
MHz
2.76
= 42.11 Hz
∴
23.74 ms
Since 16-bit mode typically results in a fairly slow repetition rate, it may be desirable to adjust the CD1:0
and
X
2
/
X
4
bits to select a divide by 1 or divide by 2 of the crystal as the machine cycle clock. This
results in an increased frequency being available to the PWM function.