TIMER A
7.2 Block description
7.2.1 Counter and Reload register (timer Ai register)
Each of timer Ai counter and reload register consists of 16 bits.
Countdown in the counter is performed each time the count source is input. In the event counter mode,
it can also function as an up-counter.
The reload register is used to store the initial value of the counter. When a counter underflow or overflow
occurs, the reload register’s contents are reloaded into the counter.
A value is set to the counter and reload register by writing the value to the timer Ai register. Table 7.2.1
lists the memory assignment of the timer Ai register.
The value written into the timer Ai register while counting is not in progress is set to the counter and reload
register. The value written into the timer Ai register while counting is in progress is set only to the reload
register. In this case, the reload register’s updated contents are transferred to the counter at the next
reload time. The value obtained when reading out the timer Ai register varies according to the operating
mode. Table 7.2.2 lists reading from and writing to the timer Ai register.
Table 7.2.1 Memory assignment of timer Ai register
Timer Ai
Timer A0
Timer A1
Timer A2
Timer A3
Timer A4
Timer A5
Timer A6
Timer A7
Timer A8
Timer A9
register
register
register
register
register
register
register
register
register
register
register
High-order byte
Address 47
16
Address 49
16
Address 4B
16
Address 4D
16
Address 4F
16
Address C7
16
Address C9
16
Address CB
16
Address CD
16
Address CF
16
Low-order byte
Address 46
16
Address 48
16
Address 4A
16
Address 4C
16
Address 4E
16
Address C6
16
Address C8
16
Address CA
16
Address CC
16
Address CE
16
Note:
At reset, the contents of the timer Ai register
are undefined.
Table 7.2.2 Reading from and writing to timer Ai register
Operating mode
Timer mode
Event counter mode
One-shot pulse mode
Pulse width modulation (PWM) mode
(Note
1)
Undefined value is read out.
Read
Counter value is read out.
Write
<While counting>
Written only to reload register.
<While not counting>
Written to both of the counter
and reload register.
Notes 1:
Also refer to sections
“[Precautions for timer mode]”
and
“[Precautions for event counter
mode].”
2:
When reading from and writing to the timer Ai register, perform it in a unit of 16 bits.
3:
Each of timers A3 and A5 to A8 is equipped with the timer mode only.
7906 Group User’s Manual Rev.2.0
7-5