CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
302
User’s Manual U14492EJ3V0UD
(1) Timers 10, 11 (TM10, TM11)
TM1n is a 2-phase encoder input up/down counter and general-purpose timer.
TM1n can be read/written in 16-bit units.
Cautions 1. Write to TM1n is enabled only when the TM1CEn bit of the TMC1n register is “0” (count
operation disabled).
2. It is prohibited to set the CMD bit (general-purpose timer mode) and the MSEL bit (UDC
mode B) of the TUMn register to “0” and “1”, respectively.
3. Continuous reading of TM1n is prohibited. If TM1n is continuously read, the second
read value may differ from the actual value. If TM1n must be read twice, be sure to read
another register between the first and the second read operation.
Correct usage example
Incorrect usage example
TM10 read
TM10 read
TM11 read
TM10 read
TM10 read
TM11 read
TM11 read
TM11 read
14
13
12
2
3
4
5
6
7
8
9
10
11
15
1
0
TM10
Address
FFFFF5E0H
Initial value
0000H
14
13
12
2
3
4
5
6
7
8
9
10
11
15
1
0
TM11
Address
FFFFF600H
Initial value
0000H
TM1n start and stop is controlled by the TM1CEn bit of timer control register 1n (TMC1n).
The TM1n operation consists of the following two modes.
(a) General-purpose timer mode
In the general-purpose timer mode, TM1n operates as a 16-bit interval timer, free-running timer, or for
PWM output.
Counting is performed based on the clock selected by software.
Division by the prescaler can be selected for the count clock from among f
CLK
/2, f
CLK
/4, f
CLK
/8, f
CLK
/16,
f
CLK
/32, f
CLK
/64, or f
CLK
/128 with bits PRM12 to PRM10 of prescaler mode register 1n (PRM1n). (f
CLK
:
base clock, refer to
9.2.4 (1) Timer 1/timer 2 clock selection register (PRM02)
).
Содержание V850E/IA1 mPD703116
Страница 2: ...2 User s Manual U14492EJ3V0UD MEMO...