![](http://datasheet.mmic.net.cn/30000/M37703M2BXXXSP_datasheet_2359958/M37703M2BXXXSP_131.png)
TIMER A
7702/7703 Group User’s Manual
5–44
5.6 Pulse width modulation (PWM) mode
5.6.4 Operation in PWM mode
When the PWM mode is selected with the operating mode select bits, the TAiOUT pin outputs “L” level.
When a trigger is generated, the counter (pulse width modulator) starts counting and the TAiOUT pin
outputs a PWM pulse (Notes 1 and 2).
The timer Ai interrupt request bit is set to “1” each time the PWM pulse level goes from “H” to “L.”
The interrupt request bit remains set to “1” until the interrupt request is accepted or the interrupt request
bit is cleared to “0” by software.
Each time a PWM pulse has been output for one period, the reload register’s contents are reloaded and
the counter continues counting.
The following explains operation of the pulse width modulator.
[16-bit pulse width modulator]
When the 16/8-bit PWM mode select bit is set to “0,” the counter operates as a 16-bit pulse width
modulator. Figures 5.6.4 and 5.6.5 show operation examples of the 16-bit pulse width modulator.
[8-bit pulse width modulator]
When the 16/8-bit PWM mode select bit is set to “1,” the counter is divided into 8-bit halves. Then, the
high-order 8 bits operate as an 8-bit pulse width modulator, and the low-order 8 bits operate as an 8-bit
prescaler. Figures 5.6.6 and 5.6.7 show operation examples of the 8-bit pulse width modulator.
Notes 1: If a value “000016” is set into the timer Ai register when the counter operates as a 16-bit pulse
width modulator, the pulse width modulator does not operate and the output from the TAiOUT
pin remains “L” level. The timer Ai interrupt request does not occur. Similarly, if a value “0016”
is set into the high-order 8 bits of the timer Ai register when the counter operates as an 8-
bit pulse width modulator, the same is performed.
2: When the counter operates as an 8-bit pulse width modulator, the TAiOUT pin outputs “L” level
of the PWM pulse which has the same width as set “H” level of the PWM pulse after a trigger
generated. After that, the PWM pulse output starts from the TAiOUT pin.