beautypg.com

NEC PD78214 User Manual

Page 167

background image

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

CRC0

←D8H

PMC3.4

←1

Set duty factor in compare
register CR00

Start counting

CE0

←1

Fig. 7-42 Changing Duty Factor of PPG 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

This manual is related to the following products: