1-65
1.12 Timer X and Timer Y
HARDWARE
7480 Group and 7481 Group User's Manual
Count Operation
The count operation (start/stop) of timer X or timer Y is controlled by the timer X or Y stop control bit of
the timer XY control register as follows:
When the timer X or Y stop control bit is set to ‘0’, the timer starts counting.
When the timer X or Y stop control bit is set to ‘1’, the timer stops counting.
In the count operation, the contents of each timer are decremented by 1 at every rising edge of the count
source.
The timer X or Y stop control bit is recognized during the HIGH time of the count source. When the count
has stopped, the count source cannot be accepted.
In the PWM mode, the high- and the low-order bytes of timer X or Y counts down each as an 8-bit timer.
Reloading Timers
When a timer reaches ‘000016’ in the count operation, an underflow occurs at the subsequent rising edge
of the count source, and the contents of the timer latch are reloaded to the timer.
In the pulse period measurement mode or the pulse width measurement mode, when a timer reaches
‘000016’, an underflow occurs and a timer wraps around to ‘FFFF16’ at the subsequent rising edge of the
count source.
In the PWM mode, the high- and the low-order byte of a timer count down each as an 8-bit timer. When
either the high- or the low-order byte of the timer becomes ‘0116’, an underflow occurs at the subsequent
rising edge of the count source, and the contents of the timer latch are reloaded to the timer.
Timer Interrupt
At an underflow, the timer X or Y interrupt request bit of interrupt request register 1 is set to ‘1’; then a
timer interrupt request is generated.
Table 1.12.1 lists the relation between timer count periods and values set to timer X and timer Y.
Table 1.12.1 Relation between Timer Count Periods and Values Set to Timer X and Timer Y
Clock Input
Oscillation Frequency
Count Source
(Cycle Time)
f(XIN) = 8 MHz
f(XIN) = 4 MHz
f(XIN)/2
(0.25
s)
f(XIN)/8
(1
s)
f(XIN)/16
(2
s)
f(XIN)/2
(0.5
s)
f(XIN)/8
(2
s)
f(XIN)/16
(4
s)
High-
order
0116
0316
0916
1316
6116
C316
Low-
order
F316
E716
C316
8716
A716
4F16
Low-
order
E716
CF16
8716
0F16
4F16
High-
order
0316
0716
1316
2716
C316
Low-
order
9F16
3F16
1F16
3F16
High-
order
0F16
1F16
4E16
9C16
High-
order
0716
0F16
2716
4E16
Low-
order
CF16
9F16
0F16
1F16
High-
order
0116
0316
0916
1316
6116
C316
Low-
order
F316
E716
C316
8716
A716
4F16
High-
order
0016
0116
0416
0916
3016
6116
Low-
order
F916
F316
E116
C316
D316
A716
Timer
Period
–
1 ms
2 ms
5 ms
10 ms
50 ms
100 ms