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
•
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
1
Internal count
2
clock
3
8/16-bit timer
4
count clock
t
: Instruction cycle (Affected by the clock mode and others.)
INST
t
: Output cycle of an 8/16-bit capture timer
EXT
136
Interval
1t
1t
INST
INST
16t
4
2
t
INST
INST
64t
6
2
t
INST
INST
2t
2t
INST
INST
32t
5
2
t
INST
INST
512t
9
2
t
INST
INST
1t
1t
EXT
EXT
8
to 2
t
INST
12
to 2
t
INST
14
to 2
t
INST
17
to 2
t
INST
21
to 2
t
INST
25
to 2
t
INST
16
to 2
t
EXT
8
-times cycle is possible.
Square wave output (Hz)
9
1/ (2t
) to 1/ (2
t
INST
INST
5
13
1/ (2
t
) to 1/ (2
t
INST
INST
7
15
1/ (2
t
) to 1/ (2
t
INST
INST
2
10
1/ (2
t
) to 1/ (2
t
INST
INST
6
14
1/ (2
t
) to 1/ (2
t
INST
INST
10
18
1/ (2
t
) to 1/ (2
t
INST
INST
9
1/ (2t
) to 1/ (2
t
)
EXT
EXT
)
)
)
)
)
)