User’s Manual U11969EJ3V0UM00
195
CHAPTER 7 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
7.8 Application Examples
(1) Operation as interval timer (timer 0, timer 2, and timer 3)
The following shows that timer 2 used as an interval timer that repeatedly generates an interrupt request at
time intervals specified by the count value set in advance to compare register CM20. Figure 7-22 shows the
timing. Figure 7-23 illustrates the setting procedure.
Figure 7-22. Example of Timing of Interval Timer Operation (timer 2)
Remark
n : value of CM20 register
t : interval time = (n + 1) x count clock cycle
Figure 7-23. Setting Procedure of Interval Timer Operation (timer 2)
Interval timer initial setting
Setting of TMC20 register
Sets count value to CM20 register
CM20
←
n
Count starts
TMC20. CE20
←
1
; Specifies count clock
; Sets CE20 bit to 1
INTCM20 interrupt
TM20
count value
0
Compare register
(CM20)
Interrupt request
(INTCM20)
n
n
n
Count starts
Clear
Clear
t
Содержание V854 UPD703006
Страница 2: ...2 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 22: ...22 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 80: ...80 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 134: ...134 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 156: ...156 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 294: ...294 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 320: ...320 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 324: ...324 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 336: ...336 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 376: ...376 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 382: ...382 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 394: ...394 User s Manual U11969EJ3V0UM00 MEMO ...
Страница 396: ...396 User s Manual U11969EJ3V0UM00 MEMO ...