
14.1.2
Event Counter Mode
In event counter mode, the timer counts the external signal or another timer overflows or underflows. Timers
A2, A3, and A4 can count externally generated two-phase signals.
Table 14.4 lists specifications of event
counter mode when not handling a two-phase pulse signal.
Table 14.5 lists specifications of event counter mode when handling a two-phase pulse signal with timers A2,
a event counter mode operation.
Table 14.4
Specifications of Event Counter Mode When Not Handling Two Phase Pulse Signals
NOTE:
1. Wait for 1 count source cycle or more to write after the count starts.
Item
Specification
Count sources
External signal applied to the TAiIN pin (i = 0 to 4) (valid edge is selectable by
program)
Timer B2 overflows or underflows
Timer Aj overflows or underflows (j = i - 1, except j = 4 if i = 0)
Timer Ak overflows or underflows (k = i + 1 except k = 0 if i = 4)
Count operations
Timer increment or decrement can be selected by an external signal or by
program.
When the timer underflows or overflows,
Reload function: the contents of the reload register are reloaded into the
counter and the count continues.
Free-running count function: the timer continues running without reloading.
Number of count times
(FFFFh - n + 1): for counter increment
n + 1: for counter decrement
n: setting value of the TAi register, 0000h to FFFFh
Counter start condition
The TAiS bit in the TABSR Register is set to 1 (count starts)
Counter stop condition
The TAiS bit is set to 0 (count stops)
Interrupt request generation timing When the timer overflows or underflows
TAiIN pin function
Count source input
TAiOUT pin function
Pulse output, or input to select a timer increment or decrement
Read from timer
The TAi register indicates a counter value
Write to timer
When a value is written to the TAi register while the count is stopped, the value
is written to both the reload register and the counter.
When a value is written to the TAi register while counting, the value is written to
the reload register (It is transferred to the counter at the next reload timing)
.(1)Selectable function
Pulse output function
The polarity of the TAiOUT pin is inverted whenever the timer overflows or
underflows. The TAiOUT pin outputs “L” signal while the TAiS bit is 0 (count
stops).