English
Language : 

W78ERD2 Datasheet, PDF (46/72 Pages) Winbond – 8-BIT MICROCONTROLLER
W78ERD2
11.1 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 port1) 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 (CCAPnH and CCAPnL). If the
CCFn(CCON) bit for the module and the ECCFn(CCAPMn) bit are set then an interrupt will be
generated.
CEXn
CF
CR
-
CCF4 CCF3 CCF2 CCF1 CCF0
CCON(D8H)
To CCFn
PCA INTERRUPT
PCA Timer/Counter
CH
CL
Capture
CCAPnH CCAPnL
-
ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
CCAPMn, n=0~4
(DAH~DEH)
0
0
0
0
PCA Capture Mode
11.2 16-bit Software Timer Comparator 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) and the ECCFn(CCAPMn) bits for the
module are both set.
Write To
CCAPnL
0
CF
CR
-
CCF4 CCF3 CCF2 CCF1 CCF0
CCON(D8H)
Write To
CCAPnH
CCAPnH CCAPnL
16-bit Comparator
1
Enable
Match
CH
CL
PCA Timer/Counter
To CCFn
-
ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
0
0
0
0
PCA INTERRUPT
CCAPMn, n=0~4
(DAH~DEH)
PCA 16-bit Timer Comparator Mode
- 46 -