197
CHAPTER 9 8-BIT TIMER/EVENT COUNTERS 1, 2
User’s Manual U12697EJ3V0UM
9.4.2 Operation as external event counter
The external event counter counts the number of external clock pulses that are input to TI1/P33, TI1/P34 pins with
8-bit timer counters 1 and 2 (TM1, TM2).
Each time a valid edge specified in prescaler mode registers 1 and 2 (PRM1, PRM2) is input, TM1and TM2 are
incremented. The edge setting is selected to be either a rising edge falling edge.
If the counting of TM1and TM2 matches with the values of 8-bit compare registers 10 and 20 (CR10, CR20), the
TM1and TM2 are cleared to 0 and the interrupt request signal (INTTM1, INTTM2) is generated.
INTTM1 and INTTM2 are generated each time when the value of the TM1 and TM2 matches with the value of CR10
and CR20.
Figure 9-7. Timing of External Event Counter Operation (When Rising Edge Is Set)
TIn pin input
00H
01H
03H
05H
N – 1
01H
03H
TMn count value
N
CRn0
INTTMn
02H
04H
00H
02H
N
Remark
N = 00H to FFH
n = 1, 2