AT89C51CC03U-S3SIM ATMEL [ATMEL Corporation], AT89C51CC03U-S3SIM Datasheet - Page 143

no-image

AT89C51CC03U-S3SIM

Manufacturer Part Number
AT89C51CC03U-S3SIM
Description
Enhanced 8-bit MCU with CAN Controller and Flash Memory
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
PCA Interrupt
Figure 68. PCA Interrupt System
PCA Capture Mode
4182I–CAN–06/05
PCA Timer/Counter
Module 0
Module 1
Module 2
Module 3
Module 4
CMOD.0
Each module in the PCA has a special function register associated with it (CCAPM0 for
module 0 ...). The CCAPM0:4 registers contain the bits that control the mode that each
module will operate in.
ECF
To use one of the PCA modules in 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 reg-
isters (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.
The ECCF bit enables the CCF flag in the CCON register to generate an interrupt
when a match or compare occurs in the associated module.
The PWM bit enables the pulse width modulation mode.
The TOG bit when set causes the CEX output associated with the module to toggle
when there is a match between the PCA counter and the module’s capture/compare
register.
The match bit MAT when set will cause the CCFn bit in the CCON register to be set
when there is a match between the PCA counter and the module’s capture/compare
register.
The two bits CAPN and CAPP in CCAPMn register determine the edge that a
capture input will be active on. The CAPN bit enables the negative edge, and the
CAPP bit enables the positive edge. If both bits are set both edges will be enabled.
The bit ECOM in CCAPM register when set enables the comparator function.
CF
CCAPMn.0
ECCFn
CR
CCF4 CCF3 CCF2 CCF1 CCF0
IEN0.6
EC
IEN0.7
EA
CCON
To Interrupt
143

Related parts for AT89C51CC03U-S3SIM