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
Summary of Contents for V850E/MS1 UPD703100
Page 2: ...User s Manual U12688EJ4V0UM00 2 MEMO ...
Page 6: ...User s Manual U12688EJ4V0UM00 6 MEMO ...
Page 8: ...User s Manual U12688EJ4V0UM00 8 MEMO ...
Page 12: ...User s Manual U12688EJ4V0UM00 12 MEMO ...
Page 26: ...User s Manual U12688EJ4V0UM00 26 MEMO ...
Page 68: ...User s Manual U12688EJ4V0UM00 68 MEMO ...
Page 124: ...User s Manual U12688EJ4V0UM00 124 MEMO ...
Page 198: ...User s Manual U12688EJ4V0UM00 198 MEMO ...
Page 230: ...User s Manual U12688EJ4V0UM00 230 MEMO ...