P89LV51RB2_RC2_RD2_5 © NXP B.V. 2009. All rights reserved.
Product data sheet Rev. 05 — 15 December 2009 49 of 76
NXP Semiconductors
P89LV51RB2/RC2/RD2
8-bit microcontrollers with 80C51 core
Table 37. CMOD - PCA counter mode register (address D9H) count pulse select
CPS1 CPS0 Select PCA input
0 0 0 Internal clock, f
osc
/ 6
0 1 1 Internal clock, f
osc
/ 2
1 0 2 Timer 0 overflow
1 1 3 External clock at ECI/P1.2 pin (maximum rate = f
osc
/ 4)
Table 38. CCON - PCA counter control register (address 0D8H) bit allocation
Bit addressable; reset value: 00H.
Bit 7 6 5 4 3 2 1 0
Symbol CF CR - CCF4 CCF3 CCF2 CCF1 CCF0
Table 39. CCON - PCA counter control register (address 0D8H) bit descriptions
Bit Symbol Description
7 CF PCA Counter Overflow Flag. Set by hardware when the counter rolls
over. CF flags an interrupt if bit ECF in CMOD is set. CF may be set by
either hardware or software but can only be cleared by software.
6 CR PCA Counter Run Control Bit. Set by software to turn the PCA counter
on. Must be cleared by software to turn the PCA counter off.
5 - Reserved for future use. Should be set to
‘0’ by user programs.
4 CCF4 PCA Module 4 Interrupt Flag. Set by hardware when a match or
capture occurs. Must be cleared by software.
3 CCF3 PCA Module 3 Interrupt Flag. Set by hardware when a match or
capture occurs. Must be cleared by software.
2 CCF2 PCA Module 2 Interrupt Flag. Set by hardware when a match or
capture occurs. Must be cleared by software.
1 CCF1 PCA Module 1 Interrupt Flag. Set by hardware when a match or
capture occurs. Must be cleared by software.
0 CCF0 PCA Module 0 Interrupt Flag. Set by hardware when a match or
capture occurs. Must be cleared by software.
Table 40. CCAPMn - PCA modules compare/capture register (address CCAPM0: 0DAH,
CCAPM1: 0DBH, CCAPM2: 0DCH, CCAPM3: 0DDH, CCAPM4: 0DEH) bit
allocation
Not bit addressable; reset value: 00H.
Bit 7 6 5 4 3 2 1 0
Symbol - ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
Table 41. CCAPMn - PCA modules compare/capture register (address CCAPM0:
0DAH,
CCAPM1: 0DBH, CCAPM2: 0DCH, CCAPM3: 0DDH, CCAPM4: 0DEH) bit
descriptions
Bit Symbol Description
7 - Reserved for future use. Should be set to ‘0’ by user programs.
6 ECOMn Enable Comparator. ECOMn = 1 enables the comparator function.
5 CAPPn Capture Positive, CAPPn = 1 enables positive edge capture.
4 CAPNn Capture Negative, CAPNn = 1 enables negative edge capture.