182

µ
PD78214 Sub-Series

Table 7-16 TO2 and TO3 Toggle Output (fCLK = 6 MHz)

Count clock
fCLK/16
fCLK/32
fCLK/64
fCLK/128
fCLK/256
fCLK/512
Maximum pulse width
28 × 16/fCLK
(683
µ
s)
28 × 32/fCLK
(1.37 ms)
28 × 64/fCLK
(2.73 ms)
28 × 128/fCLK
(5.46 ms)
28 × 256/fCLK
(10.9 ms)
28 × 512/fCLK
(21.75 ms)
Minimum pulse width
2.6
µ
s
5.3
µ
s
10.7
µ
s
21.3
µ
s
42.7
µ
s
85.3
µ
s
Caution When using an in-circuit emulator, see the notes described in Section 7.5.4.
7.3.9 PWM Output

The PWM output function outputs a PWM signal whose period coincides with the full-count period of 8-bit timer

2 (TM2). The pulse width of TO2 is determined by the value of CR20, and the pulse width of TO3 is determined

by the value of CR21. Before this function can be used, the CLR21 and CLR22 bits of capture/compare control

register 2 (CRC2) must be set to 0, and the CMD2 bit of timer control register 1 (TMC1) must be set to 0.

The pulse period and pulse width are as follows:

PWM period = 256 × x/fCLK

PWM pulse width = ((value set in compare registerNote) × x + 2)/fCLK

; x = 16, 32, 64, 128, 256, 512

Note Zero cannot be set in the compare registers.

Duty factor = (PWM pulse width)/(PWM period) = ((value set in compare register) × x + 2)/(256 × x) (value set

in compare register)/256

Caution In PWM output, the actual pulse width is longer than a value obtained with the approximate expression by two clock pulses of fCLK
for the active level, and is shorter than such an approximate value by two clock pulses of fCLK for the inactive level. Take this point
into consideration when high-precision output is required or a high-speed count clock is used.

Fig. 7-85 PWM Pulse Output

Remark ALV2 = 0
FFH
TO2
0H
Count value of timer
Count starts
CR20
CR20
CR20
Interrupt
Pulse width
Pulse periodPulse period
Pulse width
FFH FFH