CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U12688EJ4V0UM00
280
Figure 9-20. Example of Frequency Measurement Setting Procedure
Cycle measurement initial setting
Setting the TMC11 register
Setting the TUM11 register
TUM11.CMS110
←
0
INTP110 interrupt
Setting the INTM2 register
INTM2.ES101
←
0
INTM2.ES100
←
1
Initializing buffer memory
for capture data storage
X0
←
0
Count start
TMC11.CE11
←
1
Enabling interrupt
;
Specifies the count clock.
;
Specifies operation of the CC110 register as the capture register.
;
Specifies the rising edge of the INTP110 signal as the active edge.
;
Sets the CE11 bit (1).
Figure 9-21. Example of Interrupt Request Processing Routine Which Calculates the Frequency
Calculating the period
Yn = (10000H – X
n–1
) + CC110
tn = Yn
×
count clock period
;
tn: Period
Storing of the nth time is
capture data in buffer memory
Xn
←
CC110
RETI
INTP110 interrupt processing
Содержание 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 ...