English
Language : 

W78ERD2_07 Datasheet, PDF (49/76 Pages) Winbond – 8-BIT MICROCONTROLLER
W78ERD2/W78ERD2A
11.4 Pulse Width Modulator Mode
The PWM and ECOM (CCAPM) bits must be set to enable the PWM mode.
CCAPnH
CCAPnL
Enable
8-BIT
COMPARATOR
0
CL < CCAPnL
CL >= CCAPnL
1
CEXn
Overflow CL
PCA Timer/Counter
-
ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
CCAPMn, n=0~4
(DAH~DEH)
0
0
0
0
0
Figure 11-5 PAC PWM Mode
All of the modules have the same frequency because they share the same PCA timer. The duty cycle
of each module, however, is independently controlled by the module’s capture register CCAPLn.
When the value of the PCA CL SFR is less than the value in CCAPLn, the output is low; when it is
equal to or greater than the value in CCAPLn, the output is high. When CL overflows from FF to 00,
CCAPLn is reloaded with the value in CCAPHn.
11.5 Watchdog Timer
The Watchdog Timer is a free-running timer that serves as a system monitor. It is implemented in
module 4, which can still be used for other modes if the Watchdog Timer is not needed.
CIDL WDTE
-
-
-
CPS1 CPS0 ECF
CMOD(D9H)
Write To
CCAP4L
0
CCAP4H CCAP4L Module4
Write To
CCAP4H
16-bit Comparator
1
Enable
Match
CH
CL
PCA Timer/Counter
RESET
-
ECOM4 CAPP4 CAPN4 MAT4 TOG4 PWM4 ECCF4
CCAPM4(DEH)
0
0
1
x
0
x
Figure 11-6 PCA Watchdog Timer Mode
The program first loads a 16-bit value into the compare registers. Then, like the other compare modes,
this 16-bit value is compared to the PCA timer value. If a match occurs, an internal reset is generated,
but it does not make the RST pin go high.
- 49 -
Publication Release Date: February 14, 2007
Revision A10