CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U12688EJ4V0UM00
272
9.5.4 Compare operation
In Timer 4, a compare operation which compares the value set in the compare register (CM4n) with the TM4n
count value is performed (n = 0, 1).
If values are found to match in the compare operation, an interrupt (INTCM4n) is issued. By issuing an interrupt,
TM4n is cleared (0) with the following timing (refer to Figure 9-10 (a)). Through this function, Timer 4 is used as an
interval timer.
CM4n can also be set to 0. In this case, if TM4n overflows and becomes 0, a value match is detected and
INTCM4n is issued. Using the following count timing, the TM4n value is cleared (0), but with this match, INTCM4n is
not issued (refer to Figure 9-10 (b)).
Figure 9-10. Example of TM40 Compare Operation (1/2)
(a) If FFFFH is set in CM40
1
TM40
Count clock
0
n
CM40
n
TM40 clear
Match detected
(INTCM40)
Count up
Clear
Remark Interval time = (n + 1)
×
count clock cycle
n = 1 to 65,535 (FFFFH)
Содержание 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 ...