TIMER B
8.4 Event counter mode
8.4 Event counter mode
In this mode, the timer counts an external signal. Table 8.4.1 lists the specifications of the event counter
mode. Figure 8.4.1 shows the structures of the timer Bi register and the timer Bi mode register in the event
counter mode.
Table 8.4.1 Specifications of event counter mode
Item
Specifications
Count source
•External signal input to the TBiIN pin, or fX32 (Note 1)
•The count source’s valid edge can be selected from the falling edge,
the rising edge, and both of the falling and rising edges by software.
•Countdown
Count operation
Division ratio
•When a counter underflow occurs, reload register’s contents are
reloaded, and counting continues.
1
n: Timer Bi register’s set value
(n + 1)
Count start condition
Count stop condition
When the count start bit is set to “1.”
When the count start bit is cleared to “0.”
Interrupt request occurrence timing When the counter underflow occurs.
TBiIN pin’s function
Count source input pin (Note 2)
Read from timer Bi register
Write to timer Bi register
Counter value can be read out.
ꢀ While counting is stopped
When a value is written to the timer Bi register, it is written to both
of the reload register and counter.
ꢀ While counting is in progress
When a value is written to the timer Bi register, it is written only to the
reload register. (Transferred to the counter at the next reload timing.)
Notes 1: Only for timer B2, fX32 can be selected.
2: When fX32 is selected as the count source in timer B2, the TB2IN pin can be used as a programmable
I/O port pin or as I/O pins of other internal peripheral devices, which are multiplexed.
7906 Group User’s Manual Rev.2.0
8-13