200
CHAPTER 8 8/16-BIT TIMER/COUNTER
8.1
Overview of the 8/16-bit Timer/Counter
For Timer 1, either the interval timer function or the counter function can be selected.
The former function counts up in synchronization with one of the three types of
internal count clocks. The latter function counts up according to a clock that is input
to the external pin. This output can be used to output square waves of a pre-specified
frequency.
For Timer 2, only the interval timer function that counts up in synchronization with one
of the three types of internal count clock can be selected. This output can be used to
output square waves of a pre-specified frequency. Timer 2 is linked to Timer 1 in the
16-bit mode.
I
Interval Timer Function
The interval timer function repeatedly generates an interrupt in pre-specified intervals.
Additionally, it can output square waves of a pre-specified frequency by reversing the output
level of the pins at every interval.
In the 8-bit mode, Timers 1 and 2 operate as two independent timers. Each of the timers
can perform the interval timer operation from the count clock cycle to that times 2
8
.
In the 16-bit mode, Timers 1 and 2 operate as one 16-bit timer with the former as the lower
and the latter as the upper. The timer can perform the interval timer operation from the
count clock cycle to that times 2
16
.
The count clock can be selected from one of the three types of internal count clocks
(Selecting the external clock for Timer 1 selects the operation as the counter function.)
The output cycle of Timer 1 of the 8/16-bit timer/counter can be used as the consecutive
start clock for the A/D converter.
Table 8.1-1 "Channels of the 8/16-bit Timer/Counter and the Pins that Output Square Waves"
shows the channels of the 8/16-bit timer/counter and the pins that output square waves using
this timer output.
Table 8.1-2 "Timer 1 Interval Time and Square Wave Output Range in the 8-bit Mode" to Table
8.1-4 "Interval Time and Square Wave Output Range in the 16-bit Mode" shows the interval
time and square wave output range in each of the operation modes.
Table 8.1-1 Channels of the 8/16-bit Timer/Counter and the Pins that Output Square
Waves
Channel
8/16-bit timer/counter
8-bit timer
Timer 1
Timer 2
Output pin
8-bit mode
T01
T02
16-bit mode
T01