Datasheet
63
4337K–USB–04/08
AT89C5130A/31A-M
Reset Value = X000 0000b
Not bit addressable
Table 14-4. PCA Module Modes (CCAPMn Registers)
There are two additional registers associated with each of the PCA modules. They are CCAPnH
and CCAPnL and these are the registers that store the 16-bit count when a capture occurs or a
compare should occur. When a module is used in the PWM mode these registers are used to
control the duty cycle of the output (see Table 14-5 and Table 14-6)
Table 14-5. CCAPnH Registers (n = 0-4)
CCAP0H - PCA Module 0 Compare/Capture Control Register High (0FAh)
CCAP1H - PCA Module 1 Compare/Capture Control Register High (0FBh)
CCAP2H - PCA Module 2 Compare/Capture Control Register High (0FCh)
CCAP3H - PCA Module 3 Compare/Capture Control Register High (0FDh)
CCAP4H - PCA Module 4 Compare/Capture Control Register High (0FEh)
1 PWMn
Pulse Width Modulation Mode
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.
0 ECCFn
Enable CCF Interrupt
Cleared to disable compare/capture flag CCFn in the CCON register to generate an
interrupt.
Set to enable compare/capture flag CCFn in the CCON register to generate an
interrupt.
ECOMn CAPPn CAPNn MATn TOGn PWMm ECCFn Module Function
0 0 0 0 0 0 0 No Operation
X 1 0 0 0 0 X
16-bit capture by a positive-edge
trigger on CEXn
X 0 1 0 0 0 X
16-bit capture by a negative trigger
on CEXn
X 1 1 0 0 0 X
16-bit capture by a transition on
CEXn
1 0 0 1 0 0 X
16-bit Software Timer/Compare
mode.
1 0 0 1 1 0 X 16-bit High Speed Output
1 0 0 0 0 1 0 8-bit PWM
1 0 0 1 X 0 X Watchdog Timer (module 4 only)
7 6 5 4 3 2 1 0
- - - - - - - -
Bit
Number
Bit
Mnemonic Description
7 - 0 -
PCA Module n Compare/Capture Control
CCAPnH Value
Bit
Number
Bit
Mnemonic Description