Microchip Technology MA300015 Data Sheet

Page of 22
© 2008 Microchip Technology Inc.
DS01208A-page 7
AN1208
FIGURE 5:
STATE FLOW DIAGRAM OF DIGITAL PFC
Update 
PWM2 Duty 
Cycle
Current PI 
Control
Calculate 
Reference 
Current
Voltage PI 
Control
Power-on 
delay 
Calculate 
∑ V
AC
 and 
Sample 
Count 'N'
Calculate 
Feed-forward 
Compensate
En
d o
f P
ow
er-
on
 D
ela
y
S
ta
rt 
o
f P
o
w
e
r-
o
n
 D
e
la
y
Measured V
AC
Measured V
DC
Calculate 
Sample 
Count 'N'
A/D Interrupt 
Service 
Routine
Measured I
AC
Wait for ADC 
Interrupt
Measured V
AC
V
AVG
 and 
I
ACREF
Voltage
PFC Switch 
Pressed
Read
 I
A
 and I
B
 
∑ V
AC
 and