CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
235
User’s Manual U14492EJ3V0UD
(2) Timer control registers 00, 01 (TMC00, TMC01)
TMC0n register is a 16-bit register that sets the operation of timer 0 (TM0n).
The TMC0n register can be read/written in 16-bit units.
If the higher 8 bits of the TMC0n register are used as the TMC0nH register and the lower 8 bits as the
TMC0nL register, the register can be read/written in 8-bit or 1-bit units.
Caution
To operate timer 0, first set TM0CEn = 0 and then set TM0CEn = 1.
(1/4)
<14>
STINT0
13
CUL02
12
CUL01
2
MBFTE
3
BFTEN
4
BFTE3
<5>
TM0CED0
6
0
7
0
8
PRM00
9
PRM01
10
PRM02
11
CUL00
<15>
TM0CE0
1
MOD01
0
MOD00
TMC00
Address
FFFFF57AH
Initial value
0508H
<14>
STINT1
13
CUL02
12
CUL01
2
MBFTE
3
BFTEN
4
BFTE3
<5>
TM0CED1
6
0
7
0
8
PRM00
9
PRM01
10
PRM02
11
CUL00
<15>
TM0CE1
1
MOD01
0
MOD00
TMC01
Address
FFFFF5BAH
Initial value
0508H
Bit Position
Bit Name
Function
15
TM0CEn
Specifies the operation of TM0n.
0: Count disabled (stops after all count values are cleared)
1: Count enabled
Caution When TM0CEn = 0, TO0n0 to TO0n5 output becomes high impedance.
14
STINTn
Specifies interrupt during TM0n timer start.
0: Don’t generate interrupt at operation start
1: Generate interrupt at operation start
When STINTn bit = 1, an interrupt is generated immediately after the rising edge of
the TM0CEn signal.
When the MOD01 bit = 0 (triangular wave mode), the INTTM0n interrupt (see
Figure
9-4
) is generated, and when the MOD01 bit = 1 (sawtooth wave mode), the
INTCM0n3 interrupt is generated.
Caution Changing the STINTn bit during TM0n operation (TM0CEn bit = 1) is
prohibited.
Specifies the interrupt culling ratio.
CUL02
CUL01
CUL00
Interrupt Culling Ratio
0
0
0
1/1
0
0
1
1/2
0
1
0
1/4
0
1
1
1/8
1
0
0
1/16
Other than above
Don’t perform culling
13 to 11
CUL02 to CUL00
Remark
n = 0, 1
Содержание V850E/IA1 mPD703116
Страница 2: ...2 User s Manual U14492EJ3V0UD MEMO...