
Table 14.5
Specifications of Event Counter Mode When Handling Two Phase Pulse Signals on
Timers A2, A3, and A4
NOTES:
1. Wait for 1 count source cycle or more to write after the count starts.
2. Either operation can be selected for timer A3 only. Timer A2 is fixed in the normal processing operation. Timer
A4 is fixed in the multiply-by-4 operation.
Item
Specification
Count sources
Two-phase pulse signals applied to pins TAiIN and TAiOUT (i = 2 to 4)
Count operations
Timer increment or decrement is set by a two-phase pulse signal.
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
Two-phase pulse input
TAiOUT pin function
Two-phase pulse input
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) Normal processing operation (Timers A2 and A3)
While a high-level (“H”) signal is applied to the TAjOUT pin (j = 2, 3), the timer
increments a counter value at the rising edge of the TAjIN pin or decrements a
counter value at the falling edge.
Multiply-by-4 processing operation (Timers A3 and A4)
In the timing A, the timer increments the counter value at the rising and falling
edges of pins TAkIN and TAkOUT. In the timing B, the timer decrements the
counter value at the rising and falling edges of pins TAkOUT and TAkIN.
Counter reset by a Z-phase pulse signal input (Timer A3)
The counter value of timer is cleared to 0 by a Z-phase pulse signal input
TAjOUT
TAjIN
Increment
Increment Increment
Decrement Decrement Decrement
TAkOUT
TAkIN
Increment on all edges
Decrement on all edges
A
B