CHAPTER 8 TIMER/COUNTER FUNCTION
304
User’s Manual U15109EJ3V0UD
8.4.2 Operation as external event counter
The external event counter counts the number of external clock pulses that are input to TIn.
Each time the valid edge specified by timer clock select registers n0 and n1 (TCLn0, TCLn1) is input, TMn is
incremented. The edge setting can be selected to be either a rising or falling edge.
If the total value of TMn and the value of 16-bit compare register n (CRn) match, TMn is cleared to 0 and an
interrupt request signal (INTTMn) is generated.
INTTMn is generated each time the TMn value matches the CRn value.
Remark
n = 5, 6
Figure 8-33. Timing of External Event Counter Operation (with Rising Edge Specified)
TIn
TMn count value
0005H
0004H
0003H
0002H
0001H
0000H
N
−
1
N
CRn
INTTMn
N
0000H 0001H 0002H 0003H
Remark
n = 5, 6