Philips Semiconductors Product specification
8XC54/58
8XC51FA/FB/FC/80C51FA
8XC51RA+/RB+/RC+/RD+/80C51RA+
80C51 8-bit microcontroller family
8K–64K/256–1K OTP/ROM/ROMless, low voltage (2.7V–5.5V),
low power, high speed (33MHz)
2000 Aug 07
28
(8XC51FX and 8XC51RX+ ONLY)
CCAPMn Address CCAPM0 0DAH
CCAPM1 0DBH
CCAPM2 0DCH
CCAPM3 0DDH
CCAPM4 0DEH
Reset Value = X000 0000B
ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
Not Bit Addressable
Bit:
Symbol Function
Not implemented, reserved for future use*.
ECOMn Enable Comparator. ECOMn = 1 enables the comparator function.
CAPPn Capture Positive, CAPPn = 1 enables positive edge capture.
CAPNn Capture Negative, CAPNn = 1 enables negative edge capture.
MATn Match. 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.
TOGn Toggle. When TOGn = 1, a match of the PCA counter with this module’s compare/capture register causes the CEXn
pin to toggle.
PWMn Pulse Width Modulation Mode. PWMn = 1 enables the CEXn pin to be used as a pulse width modulated output.
ECCFn Enable CCF interrupt. Enables compare/capture flag CCFn in the CCON register to generate an interrupt.
NOTE:
*User software should not write 1s to reserved bits. These bits may be used in future 8051 family products to invoke new features. In that case, the reset or inactive value of the new
bit will be 0, and its active value will be 1. The value read from a reserved bit is indeterminate.
SU00037
76543210
Figure 19. CCAPMn: PCA Modules Compare/Capture Registers
ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn MODULE FUNCTION
X 0 0 0 0 0 0 0 No operation
X X 1 0 0 0 0 X 16-bit capture by a positive-edge trigger on CEXn
X X 0 1 0 0 0 X 16-bit capture by a negative trigger on CEXn
X X 1 1 0 0 0 X 16-bit capture by a transition on CEXn
X 1 0 0 1 0 0 X 16-bit Software Timer
X 1 0 0 1 1 0 X 16-bit High Speed Output
X 1 0 0 0 0 1 0 8-bit PWM
X 1 0 0 1 X 0 X Watchdog Timer
Figure 20. PCA Module Modes (CCAPMn Register)
PCA Capture Mode
To use one of the PCA modules in the capture mode either one or
both of the CCAPM bits CAPN and CAPP for that module must be
set. The external CEX input for the module (on port 1) is sampled for
a transition. When a valid transition occurs the PCA hardware loads
the value of the PCA counter registers (CH and CL) into the
module’s capture registers (CCAPnL and CCAPnH). If the CCFn bit
for the module in the CCON SFR and the ECCFn bit in the CCAPMn
SFR are set then an interrupt will be generated. Refer to Figure 21.
16-bit Software Timer Mode
The PCA modules can be used as software timers by setting both
the ECOM and MAT bits in the modules CCAPMn register. The PCA
timer will be compared to the module’s capture registers and when a
match occurs an interrupt will occur if the CCFn (CCON SFR) and
the ECCFn (CCAPMn SFR) bits for the module are both set (see
Figure 22).
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 (see Figure 23).
Pulse Width Modulator Mode
All of the PCA modules can be used as PWM outputs. Figure 24
shows the PWM function. The frequency of the output depends on
the source for the PCA timer. All of the modules will have the same
frequency of output 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 the output will be high. When
CL overflows from FF to 00, CCAPLn is reloaded with the value in
CCAPHn. the allows updating the PWM without glitches. The PWM
and ECOM bits in the module’s CCAPMn register must be set to
enable the PWM mode.
Philips Semiconductors Product specification
8XC54/58
8XC51FA/FB/FC/80C51FA
8XC51RA+/RB+/RC+/RD+/80C51RA+
80C51 8-bit microcontroller family
8K–64K/256–1K OTP/ROM/ROMless, low voltage (2.7V–5.5V),
low power, high speed (33MHz)
2000 Aug 07
29
(8XC51FX and 8XC51RX+ ONLY)
CF CR CCF4 CCF3 CCF2 CCF1 CCF0––
CCON
(D8H)
–– ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
CCAPMn, n= 0 to 4
(DAH – DEH)
CH CL
CCAPnH CCAPnL
CEXn
CAPTURE
PCA INTERRUPT
PCA TIMER/COUNTER
0 000
(TO CCFn)
SU00749
Figure 21. PCA Capture Mode
MATCH
CF CR CCF4 CCF3 CCF2 CCF1 CCF0––
CCON
(D8H)
–– ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
CCAPMn, n= 0 to 4
(DAH – DEH)
CH CL
CCAPnH
CCAPnL
PCA INTERRUPT
PCA TIMER/COUNTER
0000
16–BIT COMPARATOR
(TO CCFn)
ENABLE
WRITE TO
CCAPnH
RESET
WRITE TO
CCAPnL
01
SU00750
Figure 22. PCA Compare Mode
Philips Semiconductors Product specification
8XC54/58
8XC51FA/FB/FC/80C51FA
8XC51RA+/RB+/RC+/RD+/80C51RA+
80C51 8-bit microcontroller family
8K–64K/256–1K OTP/ROM/ROMless, low voltage (2.7V–5.5V),
low power, high speed (33MHz)
2000 Aug 07
30
(8XC51FX and 8XC51RX+ ONLY)
CF CR CCF4 CCF3 CCF2 CCF1 CCF0––
CCON
(D8H)
–– ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
CCAPMn, n: 0..4
(DAH – DEH)
CH CL
CCAPnH CCAPnL
PCA INTERRUPT
PCA TIMER/COUNTER
1000
16–BIT COMPARATOR
(TO CCFn)
WRITE TO
CCAPnH
RESET
WRITE TO
CCAPnL
01
ENABLE
CEXn
TOGGLE
MATCH
SU00751
Figure 23. PCA High Speed Output Mode
CL < CCAPnL
–– ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
CCAPMn, n: 0..4
(DAH – DEH)
PCA TIMER/COUNTER
0000
CL
CCAPnL
CEXn
8–BIT
COMPARATOR
OVERFLOW
CCAPnH
ENABLE
0
1
CL >= CCAPnL
0
SU00752
Figure 24. PCA PWM Mode

P87C51FB-4A,512

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
Microcontrollers - MCU 8-bit Microcontrollers - MCU 80C51 16K/256 OTP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union