CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
303
User’s Manual U14492EJ3V0UD
(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.
Two operation modes can be set with the MSEL bit of the TUMn register for this mode.
(i)
UDC mode A (when CMD bit = 1, MSEL bit = 0)
TM1n can be cleared by setting the CLR1 and CLR0 bits of the TMC1n register.
(ii) UDC mode B (when CMD bit = 1, MSEL bit = 1)
TM1n is cleared upon match with CM1n0 during TM1n up count operation.
TM1n is cleared upon match with CM1n1 during TM1n down count operation.
When the TM1CEn bit of the TMC1n register is “1”, TM1n counts up when the operation mode is the general-
purpose mode, and it counts up/down when the operation mode is the UDC mode.
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
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.
Содержание V850E/IA1 mPD703116
Страница 2: ...2 User s Manual U14492EJ3V0UD MEMO...