![](http://datasheet.mmic.net.cn/30000/M30855FHTGP_datasheet_2359399/M30855FHTGP_186.png)
Page 163
4
9
4
f
o
5
0
2
,
1
0
.
l
u
J
3
0
.
1
.
v
e
R
3
0
1
0
-
7
3
0
B
9
0
J
E
R
15. Timer (Timer A)
)
T
5
8
/
C
2
3
M
,
5
8
/
C
2
3
M
(
p
u
o
r
G
5
8
/
C
2
3
M
Table 15.5 Event Counter Mode Specifications (When Processing Two-phase Pulse Signal on
Timer A2, A3 and A4)
Item
Specification
Count Source
Two-phase pulse signal applied to the TAiIN and TAiOUT pins (i = 2 to 4)
Counting Operation
Two-phase pulse signal determines whether the timer increments or decrements a
counter value
When the timer counter overflows or underflows, content of the reload register is
reloaded into the count register and counting resumes. With the free-running count
function, the timer counter continues running without reloading.
Divide Ratio
1/ (FFFF16 - n + 1) for counter increment
1/ (n + 1) for counter decrement
n : setting value of the TAi register 000016 to FFFF16
Counter Start Condition
The TAiS bit in the TABSR register is set to "1" (starts counting)
Counter Stop Condition
The TAiS bit is set to "0" (stops counting)
Interrupt Request Generation Timing The timer counter overflows or underflows
TAiIN Pin Function
Two-phase pulse signal is applied
TAiOUT Pin Function
Two-phase pulse signal is applied
Read from Timer
The TAi register indicates the counter value
Write to Timer
When the timer counter stops, the value written to the TAi register is also written to
both reload register and counter
While counting, the value written to the TAi register is written to the reload register
(It is transferred to the counter at the next reload timing)
Selectable Function(1)
Normal processing operation (the timer A2 and timer A3)
While a high-level ("H") signal is applied to the TAjOUT pin (j = 2 or 3), the timer
increments a counter value on the rising edge of the TAjIN pin or decrements a
counter on the falling edge.
TAjOUT
Increment
Decrement
TAjIN
Increment Increment
Decrement Decrement
TAkOUT
TAkIN
Increment on all edges
Decrement on all edges
NOTES:
1. Only timer A3 operation can be selected. The timer A2 is for the normal processing operation. The timer A4 is
for the multiply-by-4 operation.
Multiply-by-4 processing operation (the timer A3 and timer A4)
While an "H" signal is applied to the TAkOUT pin (k = 3 or 4) on the rising edge of the
TAkIN pin, the timer increments a counter value on the rising and falling edges of the
TAkOUT and TAkIN pins.
While an "H" signal is applied to the TAkOUT pin on the falling edge of the TAkIN pin, the
timer decrements a counter value on the rising and falling edges of the TAkOUT and
TAkIN pins.