CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)
User’s Manual U12688EJ4V0UM00
278
Figure 9-17. Example of PWM Output Setting Procedure
PWM output initial setting
;
Specifies the active level (high level)
and enables timer output
Setting the TOC10 register
TOC10.ENTO100
←
1
TOC10.ALV100
←
1
Setting the TUM10 register
TUM10.CMS100
←
1
TUM10.CMS101
←
1
Through the PMC0 register, the P00 pin is
designated as the timer output pin TO100
PMC0.PMC00
←
1
Setting of the TMC10 register
Setting of the count value
in the CC100 register
CC100
←
D00
Setting of the count value
in the CC101 register
CC101
←
D10
Count start
TMC10.CE10
←
1
Enabling interrupt
;
Specifies the operation of the CC100 and CC101 registers
(specifies compare operation)
;
Specifies the TM10’s count clock
;
Sets the CE10 bit (1)
INTCC100 interrupt
INTCC101 interrupt
Figure 9-18. Example of Interrupt Request Processing Routine for Rewriting Compare Value
INTCC100 interrupt processing
The amount of time until the next time the
TO100 output is reset (0) (the number of counts)
is set in compare register CC101
RETI
INTCC101 interrupt processing
The amount of time until the next time the
TO100 output is set (1) (the number of counts)
is set in compare register CC100
RETI
Содержание 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 ...