Software Implementation
5.3.3 Synchronization Interrupt Routine
The interrupt procedure is used for trimming the internal oscillator and for synchronization of the phase shift of the reference sine wave with the mains voltage. A detailed illustration of this is shown in Figure
interrupt void IRQisr(void)
Get actual timer value
Stop and reset timer
Run timer
Enable PI PFC stage regulator computing
Enable trimming value calculation
Reset sine wave table pointer
Clear IRQ flag
End of subroutine
Figure
5.3.4 Sine Wave Generation Interrupt Routine
The PWM modulator is used to generate the reference sine wave for PFC control. The amplitude of generated sine wave depends on output
Dimmable Light Ballast with Power Factor Correction, Rev. 1
Freescale Semiconductor | 43 |