English
Language : 

7220 Datasheet, PDF (226/303 Pages) Renesas Technology Corp – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPENDIX
6.3 Notes on use
6.3.5 Notes on timer
When a timer value is read, “the timer value at read timing + 1” may be read.
Reason
Figure 6.3.8 shows the relation between timer values and their values read. Timer values are changed at
the rising edge of the count source, but the values read are counted down at the falling edge of the count
source. Therefore, “the timer value + 1” may be read in some read timings.
Figure 6.3.9 shows the relation between timer values and their values read when two 8-bit timers are
connected in series. In this example, timers 1 and 2 are connected in series and an overflow signal of
timer 1 is used as the count source of timer 2. The timer 2 values read are counted down at the falling
edge of the count source. When timers 1 and 2 are used as a single 16-bit counter, the timer 2 values
read take the same value at timing A and B (or at timing C and D) as shown in Figure 6.3.9. This is
because the count source of timer 2 changes at the falling edge of the count source of timer 1.
Timer count
source
Timer value
1 0 FF 1 0 FF 1 0
Timer value read
Interrupt request
2 1 0 FF 1 0 FF 1
Writing to
timer 1
Fig. 6.3.8 Relation between timer values and their
values read (timer setting value = 2)
Timer 1
count
source
Timer 1
value
Timer 1
value read
Timer 1
interrupt
request
Timer 2
count
source
Timer 2
value
Timer 2
value read
Timer 2
interrupt
request
1 0 FF 1 0 FF 1 0 FF 1
2 1 0 FF 1 0 FF 1 0 FF 1
Writing to
timer 1
0
A
1
Writing to
timer 2
FF
0
FF
BC
D
0
FF
0
Fig. 6.3.9
Relation between timer values and their
values read when two timers are
connected in series (timers 1 and 2
are connected, timer 1 setting value
= 2, timer 2 setting value = 1)
7220 Group User’s Manual
6-7