TIMER A
7.4 Event counter mode
7.4.3 Switching between countup and countdown
Figure 7.4.5 shows structures of the up-down registers 0 and 1.
The up-down register or the input signal from the TAjOUT pin is used to switch countup from and to
countdown. This switching is performed by the up-down bit when the up-down switching factor select bit
(bit 4 at addresses 5616 to 5816, 5A16, DA16) is “0,” and by the input signal from the TAjOUT pin when the up-
down switching factor select bit is “1.”
When the switching between countup and countdown is set while counting is in progress, this switching is
actually performed when the count source’s next valid edge is input.
(1) Switching by up-down bit
Countdown is performed when the up-down bit is “0,” and countup is performed when the up-down
bit is “1.” Figure 7.4.5 shows the structures of the up-down registers 0 and 1.
(2) Switching by TAjOUT pin’s input signal
Countdown is performed when the TAjOUT pin’s input signal is at “L” level, and countup is performed
when the TAjOUT pin’s input signal is at “H” level.
When using the TAjOUT pin’s input signal to switch countup from and to countdown, set the port P2
and port P6 direction registers’ bits which correspond to the TAjOUT pin for the input mode.
7906 Group User’s Manual Rev.2.0
7-24