CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U12688EJ4V0UM00
271
9.5
Timer 4 Operation
9.5.1 Count operation
Timer 4 functions as a 16-bit interval timer. Setting of its operation is specified in timer control register 4n
(TMC4n) (n = 0, 1).
In a timer 4 count operation, the internal count clock (
φ
/32 to
φ
/256) specified by the PRS4n0, PRM4n1, and
PRM4n0 bits of the TMC4n register is counted up.
If the count results in TM4n match the value in CM4n, TM4n is cleared. At the same time, a matching interrupt
(INTCM4n) is generated.
Figure 9-9. Basic Operation of Timer 4
0001H
0000H
0002H 0003H
FBFEH FBFFH
0001H 0002H
0000H
0003H
TM4n
Count clock
∆
Count disable
CE4n
←
0
∆
Count start
CE4n
←
1
∆
Count start
CE4n
←
1
Remark
n = 0, 1
9.5.2 Count clock selection
Using the setting of the TMC4n register’s PRS4n0, PRM4n1, and PRM4n0 bits, one of four possible internal count
clocks,
φ
/32,
φ
/64,
φ
/128 or
φ
/256, can be selected (n = 0, 1).
Caution Do not change the count clock during timer operation.
PRS4n0
PRM4n1
PRM4n0
Internal Count Clock
0
0
0
φ
/32
0
0
1
φ
/64
0
1
0
φ
/128
0
1
1
RFU (reserved)
1
0
0
φ
/64
1
0
1
φ
/128
1
1
0
φ
/256
1
1
1
RFU (reserved)
Remark
n = 0, 1
9.5.3 Overflow
If the TM4n overflows as a result of counting the internal count clock, the OVF4n bit of the TOVS register is set (1)
(n = 0, 1).
Содержание V850E/MS1 UPD703100
Страница 2: ...User s Manual U12688EJ4V0UM00 2 MEMO ...
Страница 6: ...User s Manual U12688EJ4V0UM00 6 MEMO ...
Страница 8: ...User s Manual U12688EJ4V0UM00 8 MEMO ...
Страница 12: ...User s Manual U12688EJ4V0UM00 12 MEMO ...
Страница 26: ...User s Manual U12688EJ4V0UM00 26 MEMO ...
Страница 68: ...User s Manual U12688EJ4V0UM00 68 MEMO ...
Страница 124: ...User s Manual U12688EJ4V0UM00 124 MEMO ...
Страница 198: ...User s Manual U12688EJ4V0UM00 198 MEMO ...
Страница 230: ...User s Manual U12688EJ4V0UM00 230 MEMO ...
Страница 422: ...User s Manual U12688EJ4V0UM00 422 MEMO ...