Table 13 shows the CCAPMn settings for the various PCA functions.
Table 13. CCAPMn Registers (n = 0-4)
CCAPM0 - PCA Module 0 Compare/Capture Control Register (0DAh)
CCAPM1 - PCA Module 1 Compare/Capture Control Register (0DBh)
CCAPM2 - PCA Module 2 Compare/Capture Control Register (0DCh)
CCAPM3 - PCA Module 3 Compare/Capture Control Register (0DDh)
CCAPM4 - PCA Module 4 Compare/Capture Control Register (0DEh)
7
6
5
4
3
2
1
-
ECOMn
CAPPn
CAPNn
MATn
TOGn
PWMn
0
ECCFn
Bit
Number
7
Bit
Mnemonic Description
-
Reserved
The value read from this bit is indeterminate. Do not set this bit.
Enable Comparator
6
ECOMn Cleared to disable the comparator function.
Set to enable the comparator function.
Capture Positive
5
CAPPn Cleared to disable positive edge capture.
Set to enable positive edge capture.
Capture Negative
4
CAPNn Cleared to disable negative edge capture.
Set to enable negative edge capture.
Match
3
MATn When MATn = 1, a match of the PCA counter with this module's
compare/capture register causes the CCFn bit in CCON to be set, flagging an
interrupt.
Toggle
2
TOGn When TOGn = 1, a match of the PCA counter with this module's
compare/capture register causes the CEXn pin to toggle.
Pulse Width Modulation Mode
1
PWMn Cleared to disable the CEXn pin to be used as a pulse width modulated output.
Set to enable the CEXn pin to be used as a pulse width modulated output.
Enable CCF interrupt
Cleared to disable compare/capture flag CCFn in the CCON register to generate
0
CCF0 an interrupt.
Set to enable compare/capture flag CCFn in the CCON register to generate an
interrupt.
Reset Value = X000 0000b
Not bit addressable
28 AT80C51RD2/AT83C51Rx2
4113B–8051–03/05