TIMER A
7905 Group User’s Manual Rev.1.0
7-13
7.3.1 Setting for timer mode
Figure 7.3.2 shows an initial setting example for registers related to the timer mode.
Note that when using interrupts, set up to enable the interrupts. For details, refer to section “CHAPTER
6. INTERRUPTS.”
7.3 Timer mode
Fig. 7.3.2 Initial setting example for registers relevant to timer mode
Note: Counter divides the count source frequency by (n + 1).
b7
b0
Pulse output function select bit
0 : No pulse output
1 : Pulses output
00
Selecting timer mode and each function
Timer Ai mode register (i = 0 to 4) (Addresses 5616 to 5A16)
(i = 5 to 9) (Addresses D616 to DA16)
1 0 : Gate function (Counter counts only while TAi IN pin’s input signal level is “L.”)
1 1 : Gate function (Counter counts only while TAi IN pin’s input signal level is “H.”)
b4 b3
Selection of timer mode
Setting division ratio
b7
b0
Can be set to “000016” to “FFFF16” (n).
(b15)
(b8)
b7
b0
Timer A0 register (Addresses 4716, 4616)
Timer A1 register (Addresses 4916, 4816)
Timer A2 register (Addresses 4B16, 4A16)
Timer A3 register (Addresses 4D16, 4C16)
Timer A4 register (Addresses 4F16, 4E16)
Timer A5 register (Addresses C716, C616)
Timer A6 register (Addresses C916, C816)
Timer A7 register (Addresses CB16, CA16)
Timer A8 register (Addresses CD16, CC16)
Timer A9 register (Addresses CF16, CE16)
Gate function select bits
Count source select bits
See Table 7.2.3.
No Gate function
0
Count starts.
Setting count start bit to “1.”
b7
b0
Count start register 0 (Address 4016)
Timer A0 count start bit
Timer A1 count start bit
Timer A2 count start bit
Timer A3 count start bit
Timer A4 count start bit
Setting interrupt priority level
b7
b0
Timer Ai interrupt control register
(i = 0 to 4) (Addresses 7516 to 7916)
(i = 5 to 9) (Addresses F516 to F916)
Interrupt priority level select bits
When using interrupts, set these bits to one of
levels 1 to 7.
When disabling interrupts, set these bits to
level 0.
Setting port P6, port P2, and port P4 direction registers
b7
b0
Port P6 direction register (Address 1016)
Pin TA0IN
Pin TA1IN
When gate function is selected, clear the bit corresponding to the TAiIN
pin to “0.”
b7
b0
Port P2 direction register (Address 816)
Pin TA4IN
Pin TA2IN
Pin TA3IN
Pin TA9IN
b7
b0
Count start register 1 (Address 4116)
Timer A5 count start bit
Timer A6 count start bit
Timer A7 count start bit
Timer A8 count start bit
Timer A9 count start bit
b7
b0
Port P4 direction register (Address C16)
Pin TA5IN
Pin TA6IN
Pin TA7IN
Pin TA8N
0 0 :
0 1 :