NO:
W90P710 Programming Guide
VERSION:
2.0
PAGE:
213
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
19 Pulse Width Modulation (PWM) Timer
19.1 Overview
The W90P710 have 4 channels PWM.Timer. They can be divided into two groups. Each group
has 1 prescaler, 1 clock divider, 2 clock selectors, 2 16-bit counters, 2 16-bit comparators, 1 Dead-
Zone generator. They are all driven by PCLK (80MHz). Each channel can be used as a timer and
issue interrupt independently.
Two channels PWM.Timer in one group share the same prescaler. Clock divider provides each
channel with 5 clock sources (1, 1/2, 1/4, 1/8, 1/16). Each channel receives its own clock signal from
clock divider which receives clock from 8-bit prescaler. The 16-bit counter in each channel receive
clock signal from clock selector and can be used to handle one PWM period. The 16-bit comparator
compares number in counter with threshold number in register loaded previously to generate PWM
duty cycle.
The clock signal from clock divider is called PWM clock. Dead-Zone generator utilize PWM clock
as clock source. Once Dead-Zone generator is enabled, output of two PWM timer in one group is
blocked. Two output pin are all used as Dead-Zone generator output signal to control off-chip power
device.
To prevent PWM driving output pin with unsteady waveform, 16-bit counter and 16-bit comparator
are implemented with double buffering feature. User can feel free to write data to counter buffer
register and comparator buffer register without generating glitch.
When 16-bit down counter reaches zero, the interrupt request is generated to inform CPU that
time is up. When counter reaches zero, if counter is set as toggle mode, it is reloaded automatically
and start to generate next cycle. User can set counter as one-shot mode instead of toggle mode. If
counter is set as one-shot mode, counter will stop and generate one interrupt request when it reaches
zero.