English
Language : 

W78ERD2 Datasheet, PDF (45/72 Pages) Winbond – 8-BIT MICROCONTROLLER
W78ERD2
The CCON SFR contains the run control bit for the PCA and the flags for the PCA timer (CF) and each
module to run the PCA the CR bit (CCON.6) must be set by software. The PCA is turned off by
clearing this bit. The CF bit (CCON.7) is set when the PCA Counter overflows and an interrupt will be
generated if the ECF bit in the CMOD register is set. The CF bit can only be cleared by software.
CCON.0~CCON.4 are the flags for the modules and are set by hardware when either a match or a
capture occurs. These flags also can only be cleared by software.
CCAPMn
CCAPM0(DAH) , CCAPM1(DBH) , CCAPM2(DCH) , CCAPM3(DDH), CCAPM4(DEH)
BIT
NAME
FUNCTION
7
-
Reserved
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.
Match. When MATn = 1 a match of the PCA counter with this module’s
3
MATn
compare/capture register causes the CCFn bit in CCON to be set, flagging
an interrupt.
2
TOGn
Toggle. When TOGn = 1 a match of the PCA counter with this module’s
compare/capture register causes the CEXn bit to toggle.
1
PWMn
Pulse Width Modulation Mode. PWMn = 1 enables the CEXn bit to be used
as a pulse width modulated output.
0
ECCFn
Enable CCF interrupt. Enables compare/capture flag CCFn in the CCON
register to generate an interrupt.
MODULE FUNCTION
No operation
16-bit capture by a positive edge
trigger on CEXn
16-bit capture by a negative trigger
on CEXn
16-bit capture by a transition on
CEXn
16-bit Software Timer
16-bit High Speed Output
8-bit PWM
Watchdog Timer (only in module4)
PCA Module Modes (CCAPMn Register)
ECOMN CAPPN CAPNN MATN TOGN PWMN ECCFN
0
0
0
0
0
0
0
X
1
0
0
0
0
X
X
0
1
0
0
0
X
X
1
1
0
0
0
X
1
0
0
1
0
0
X
1
0
0
1
1
0
X
1
0
0
0
0
1
0
1
0
0
1
X
0
X
- 45 -
Publication Release Date: April 20, 2005
Revision A4