NEC PD78214 User Manual
Page 165
136
µ
PD78214 Sub-Series
Fig. 7-37 Setting Procedure for PWM Output
Fig. 7-38 Changing Duty Factor of PWM Output
CIF00
←0
Preprocessing for
changing duty factor
Clear INTC00 interrupt request
flag
; Clears bit 4 of IF0L
Enable INTC00 interrupt
; Clears bit 4 of MK0L
INTC00 interrupt
Duty factor changing
processing
Set duty factor in CR00
CMK00
←0
Disable INTC00 interrupt
; Sets bit 4 of MK0L
CMK00
←1
RETI
PWM output
Set CRC0 register
Set TOC register
Set P34 pin in control mode
Set initial value in compare
register
Start counting
; Sets bit 3 of TMC0
CRC0
←90H
PMC3.4
←1
CE0
←1