Setting Procedure For Pwm Output; Changing Duty Factor Of Pwm Output - NEC PD78212 User Manual

8-bit single-chip microcomputer sub-series
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Table of Contents