High Speed Output Mode In this mode the CEX output (on port 1) associated with the PCA module will toggle
each time a match occurs between the PCA counter and the module’s capture registers.
To activate this mode the TOG, MAT, and ECOM bits in the module’s CCAPMn SFR
must be set.
Figure 36. PCA High Speed Output Mode
CCON
CF
CR
CCF1 CCF0
0xD8
Write to
CCAPnH Reset
PCA IT
Write to
CCAPnL
CCAPnH
CCAPnL
“0”
“1”
Enable
Match
16 bit comparator
CEXn
CH
CL
PCA counter/timer
CCAPMn, n = 0 to 1
0xDA to 0xDE
ECOMnCAPPn CAPNn MATn TOGn PWMn ECCFn
Pulse Width Modulator
Mode
All the PCA modules can be used as PWM outputs. The output frequency depends on
the source for the PCA timer. All the modules will have the same output frequency
because they all share the PCA timer. The duty cycle of each module is independently
variable using the module’s capture register CCAPLn. When the value of the PCA CL
SFR is less than the value in the module’s CCAPLn SFR the output will be low, when it
is equal to or greater than it, the output will be high. When CL overflows from FF to 00,
CCAPLn is reloaded with the value in CCAPHn. the allows the PWM to be updated with-
out glitches. The PWM and ECOM bits in the module’s CCAPMn register must be set to
enable the PWM mode.
76
AT89C5115
4128F–8051–05/06