CHAPTER 10 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U14359EJ4V0UM
331
(2) Timer mode control registers C01 to C31 (TMCC01 to TMCC31)
The TMCCn1 registers control the operation of TMCn (n = 0 to 3).
These registers can be read or written in 8-bit units.
Be sure to set bit 2 to 0. If it is set to 1, the operation is not guaranteed.
Cautions 1. The various bits of the TMCCn1 register must not be changed during timer operation. If
they are to be changed, they must be changed after setting the TMCCEn bit of the
TMCCn0 register to 0. If these bits are overwritten during timer operation, operation
cannot be guaranteed (n = 0 to 3).
2. If the ENTn1 and ACTLVn bits are changed at the same time, a glitch (spike shaped
noise) may be generated in the TO0n pin output. Either create a circuit configuration
that will not malfunction even if a glitch is generated or make sure that the ENTn1 and
ACTLVn bits do not change at the same time (n = 0 to 3).
3. TO0n output is not changed by an external interrupt signal (INTP0n0 or INTP0n1). To
use the TO0n signal, specify that the capture/compare registers are compare registers
(CMSn0 and CMSn1 bits of TMCCn1 register = 1) (n = 0 to 3).
(1/2)
7
6
5
4
3
2
1
0
Address
After reset
TMCC01
OST0
ENT01
ACTLV0
ETI0
CCLR0
0
CMS01
CMS00
FFFFF608H
20H
TMCC11
OST1
ENT11
ACTLV1
ETI1
CCLR1
0
CMS11
CMS10
FFFFF618H
20H
TMCC21
OST2
ENT21
ACTLV2
ETI2
CCLR2
0
CMS21
CMS20
FFFFF628H
20H
TMCC31
OST3
ENT31
ACTLV3
ETI3
CCLR3
0
CMS31
CMS30
FFFFF638H
20H
Bit position
Bit name
Function
7
OSTn
(n = 0 to 3)
Overflow Stop
Sets the operation when TMCn has overflowed (n = 0 to 3).
0: After the overflow, counting continues (free-running mode)
1: After the overflow, the timer maintains the value 0000H, and counting stops
(overflow stop mode). At this time, the TMCCEn bit of TMCCn0 remains at 1.
Counting is restarted by writing 1 to the TMCCEn bit.
6
ENTn1
(n = 0 to 3)
Enable To Pin
External pulse output is enabled/disabled (TO0n) (n = 0 to 3).
0: External pulse output is disabled. Output of the ACTLVn bit inactive level to
the TO0n pin is fixed. The TO0n pin level is not changed even if a match
signal from the corresponding compare register is generated.
1: External pulse output is enabled. A compare register match causes TO0n
output to change. However, if capture mode is set, TO0n output does not
change. The ACTLVn bit inactive level is output from the time when timer
output is enabled until a match signal is first generated.
Caution If either CCCn0 or CCCn1 is specified as a capture register, the
ENTn1 bit must be set to 0.