English
Language : 

W78ERD2_07 Datasheet, PDF (45/76 Pages) Winbond – 8-BIT MICROCONTROLLER
W78ERD2/W78ERD2A
MODULE FUNCTION
ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
No operation
0
0
0
0
0
0
0
16-bit capture by a positive edge
trigger on CEXn
X
1
0
0
0
0
X
16-bit capture by a negative trigger
on CEXn
X
0
1
0
0
0
X
16-bit capture by a transition on
CEXn
X
1
1
0
0
0
X
16-bit Software Timer
1
0
0
1
0
0
X
16-bit High Speed Output
1
0
0
1
1
0
X
8-bit PWM
1
0
0
0
0
1
0
Watchdog Timer (only in module4)
1
0
0
1
X
0
X
PCA Module Modes (CCAPMn Register)
PWM enables pulse width modulation. The TOG bit causes the output CEXn to toggle when there is a
match between the PCA counter and the module’s compare/capture register. The match bit MAT
causes the CCF bit in the CCON register to be set when there is a match between the PCA counter
and the module’s compare/capture register, and the ECCF bit enables the CCF flag to generate an
interrupt. The bits CAPP and CAPN determine whether positive and negative edges, respectively, are
captured. The bit ECOM enables the comparator function.
The PCA Timer is the common time-base for all five modules and can be programmed to select the
appropriate timer source. The default value is 12 clocks (12T) per machine cycle, and 6T can also be
selected by a bit in the options registers. The actual timer is then determined by the CPS1 and CPS2
bits in the CMOD SFR, as follows:
CPS1
0
0
1
1
CPS0
0
1
0
1
PCA TIMER COUNT SOURCE FOR 12T
Oscillator frequency / 12
Oscillator frequency / 4
Timer 0 overflow
External input at ECI pin
PCA TIMER COUNT SOURCE FOR 6T
Oscillator frequency / 6
Oscillator frequency / 2
Timer 0 overflow
External input at ECI pin
- 45 -
Publication Release Date: February 14, 2007
Revision A10