NO:
W90P710 Programming Guide
VERSION:
2.0
PAGE:
218
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed, distributed or reproduced without permission
from Winbond.
Table No.: 2005-W90P710-11-A
Figure 19-2 PWM operation
pwm_out
write a nonzero
number to prescaler &
setup clock dividor
Start
Reg_CNR=150
Reg_CMR=50
151
51
200
50
Reg_CNR=199
Reg_CMR=49
Reg_CNR=99
Reg_CMR=0
100
1
Reg_CNR=0
Reg_CMR=XX
Stop
PWM double buffering
19.4.3
PWM Timer Start Procedure
The PWM Timer start procedure is is described as follows.:
5. Setup clock selector (
CSR
)
6. Setup prescaler & dead zone interval (
PPR
)
7. Setup inverter on/off, dead zone generator on/off, toggle mode /one-shot mode, and pwm
timer off. (
PCR
)
8. Setup comparator register (
CMR
)
9. Setup counter register (
CNR
)
10. Setup interrupt enable register (
PIER
)
11. Enable pwm timer (
PCR
)
A flowchart of this procedure is given in the following figure.