
CHAPTER 9 TIMER/COUNTER FUNCTION
298
User’s Manual U14492EJ5V0UD
(b) Up/down counter mode (UDC mode)
In the UDC mode, TM1n functions as a 16-bit up/down counter, counting based on the TCUD1n and
TIUD1n input signals.
This mode is divided into the UDC mode A and UDC mode B, depending on the condition of clearing
TM1n.
The conditions for clearing the TM1n are classified as follows depending on the operation mode.
Table 9-5. Timer 1 (TM1n) Clear Conditions
TUMn Register
TMC1n Register
Operation Mode
CMD
Bit
MSEL
Bit
ENMD
Bit
CLR1
Bit
CLR0
Bit
TM1n Clear
0
×
×
Clearing not performed (free-running timer)
General-purpose
timer mode
0
0
1
×
×
Cleared upon match with CM1n0 set value
×
0
0
Cleared only by TCLR1n input
×
0
1
Cleared upon match with CM1n0 set value during up-
count operation
×
1
0
Cleared by TCLR1n input or upon match with CM1n0 set
value during up-count operation
UDC mode A
1
0
×
1
1
Clearing not performed
UDC mode B
1
1
×
×
×
Cleared upon match with CM1n0 set value during up-
count operation or upon match with CM1n1 set value
during down-count operation
Settings other than the above
Setting prohibited
Remarks 1.
n = 0, 1
2.
×
: Indicates that the set value of that bit is ignored.