CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U12688EJ4V0UM00
274
9.6 Application Example
(1) Operation as an interval timer (Timer 4)
In this example, timer 4 is used as an interval timer that repeatedly issues an interrupt at intervals specified by
the count time preset in the compare register (CM4n) (n = 0, 1).
Figure 9-11. Example of Timing in Interval Timer Operation
n
TM40 count value
0
Interrupt request
(INTCM40)
Compare register
(CM40)
n
∆
Count start
∆
Clear
∆
Clear
n
t
Remark
n:
Value in the CM40 register
t:
Interval time = (n + 1)
×
count clock cycle
Figure 9-12. Example of Interval Timer Operation Setting Procedure
Interval timer initial setting
TMC4n register setting
;
Specifies the count clock
Setting the count value in the CM4n register
CM4n
←
Count value
Count start
TMC4n.CE4n
←
1
;
Sets the CE4n bit (1)
INTCM4n interrupt
Remark 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 ...