138
µ
PD78214 Sub-Series
Fig. 7-41 Setting Procedure for PPG Output
PPG output
Set CRC0 register
Set TOC register
Set P34 pin in control mode
Set period in compare
register CR01
; Sets bit 3 of TMC0
CRC0D8H
PMC3.41
Set duty factor in compare
register CR00
Start counting
CE01
Fig. 7-42 Changing Duty Factor of PPG Output
CIF000
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
CMK000
Disable INTC00 interrupt ; Sets bit 4 of MK0L
CMK001
RETI