
235
8.5 Operation of Interval Timer Function
8.5
Operation of Interval Timer Function
This section describes the operation of the interval timer function of the 8/16-bit timer/
counter.
s Operation of Interval Timer Function
r 8-bit mode
Figure 8.5-1 "Interval Timer Function (Timer 1) Settings" shows the settings required to operate
Timer 1 as the interval timer function in the 8-bit mode.
Figure 8.5-1 Interval Timer Function (Timer 1) Settings
Figure 8.5-2 "Interval Timer Function (Timer 2) Settings" shows the settings required to operate
Timer 2 as the interval timer function in the 8-bit mode.
Figure 8.5-2 Interval Timer Function (Timer 2) Settings
On activation in 8-bit mode, the counter starts counting-up from "00H" on the rising edge of the
selected count clock. Eventually, the count in the counter will match the value set in the data
register (comparison data latch). When this occurs, the timer control register interrupt request
flag bit (T1CR: T1IF) is set to "1" and the counter starts counting-up again from "00H". If using
timer 1, the output of the square wave output control circuit is inverted when a match is
detected; and if square wave output is enabled (T1CR: T1OS1, T1OS0 = values other than
"00B", a square wave is output at the TO pin.
Figure 8.5-3 "Operation of Interval Timer (Timer 1)" shows the interval timer function operation
in the 8 bit mode.
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
T1CR
T1IF
T1IE
T1OS1 T1OS0 T1CS1 T1CS0 T1STP T1STR
T1DR
Sets the interval time (compare value).
T2CR
T2IF
T2IE
T2OS1 T2OS0 T2CS1 T2CS0 T2STP T2STR
00
: Used bit
: Unused bit
0 : Set "0".
other than "11"
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
T2CR
T2IF
T2IE
T2OS1 T2OS0 T2CS1 T2CS0 T2STP T2STR
00
T2DR
Sets the interval time (compare value).
: Used bit
0 : Set "0".
other than "11"