136
CHAPTER 7 8-BIT PWM TIMER
7.1 Overview of 8-bit PWM Timer
An 8-bit PWM timer has the interval timer functions and the PWM timer functions of an
8-bit resolution. A counter is incremented using interval timer functions in
synchronization with three types of internal count clocks or the output of 8/16-bit
capture timer/counter. The user can select one of these functions. Therefore, the 8-bit
interval timer can be set and the square wave of any frequency can be output using the
set output. In addition, if a low-pass filter is connected to the PWM output, the D/A
converter can be used.
■ Interval Timer Functions (Functions to Output the Square Wave)
Interrupts are generated repeatedly at any interval by the interval timer functions.
Because the output level of the pin (P50/PWM pin) can be inverted for each interrupt, the square wave of
any frequency can also be output.
• An interval timer operation from the cycle of the count clock to 2
8
-times cycle is possible.
• The count clock can be selected from four types.
Table 7.1-1 shows the range of intervals and square wave output.
Table 7.1-1 Range of Intervals and Square Wave Output
Count clock cycle Interval Square wave output (Hz)
1
Internal count
clock
1t
INST
1t
INST
to 2
8
t
INST
1/ (2t
INST
) to 1/ (2
9
t
INST
)
2
16t
INST
2
4
t
INST
to 2
12
t
INST
1/ (2
5
t
INST
) to 1/ (2
13
t
INST
)
3
64t
INST
2
6
t
INST
to 2
14
t
INST
1/ (2
7
t
INST
) to 1/ (2
15
t
INST
)
4
8/16-bit timer
count clock
2t
INST
2t
INST
to 2
17
t
INST
1/ (2
2
t
INST
) to 1/ (2
10
t
INST
)
32t
INST
2
5
t
INST
to 2
21
t
INST
1/ (2
6
t
INST
) to 1/ (2
14
t
INST
)
512t
INST
2
9
t
INST
to 2
25
t
INST
1/ (2
10
t
INST
) to 1/ (2
18
t
INST
)
1t
EXT
1t
EXT
to 2
16
t
EXT
1/ (2t
EXT
) to 1/ (2
9
t
EXT
)
t
INST
: Instruction cycle (Affected by the clock mode and others.)
t
EXT
: Output cycle of an 8/16-bit capture timer