CHAPTER 10 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U14359EJ4V0UM
325
10.1.4 Timer C
(1) Timers C0 to C3 (TMC0 to TMC3)
TMCn functions as a 16-bit free-running timer or as an event counter for an external signal. Besides being
mainly used for cycle measurement, TMCn can be used as pulse output (n = 0 to 3).
TMCn is read-only in 16-bit units.
Cautions 1. The TMCn register can only be read. If the TMCn register is written, the subsequent
operation is undefined.
2. If the TMCCAEn bit of the TMCCn0 register is cleared (0), a reset is performed
asynchronously.
TMC1
FFFFF610H
0000H
TMC2
FFFFF620H
0000H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
TMC0
FFFFF600H
0000H
Address
After reset
0
TMC3
FFFFF630H
0000H
TMCn performs the count-up operations of an internal count clock or external count clock. Timer start and stop are
controlled by the TMCCEn bit of timer mode control register Cn0 (TMCCn0) (n = 0 to 3).
The internal or external count clock is selected by the ETIn bit of timer mode control register Cn1 (TMCCn1) (n = 0
to 3).
(a) Selection of the external count clock
TMCn operates as an event counter.
When the ETIn bit of timer mode control register Cn1 (TMCCn1) is set (1), TMCn counts the valid edges
of the external clock input (TI0n0), synchronized with the internal count clock. The valid edge is specified
by valid edge select register Cn (SESCn) (n = 0 to 3).
Caution
When the INTP0n0/TI0n0 pin is used as TI0n0 (external clock input pin), disable the
INTP0n0 interrupt or set CCCn0 to compare mode (n = 0 to 3).