A circuit for providing power factor correction includes a bridgeless
boost converter circuit and a control circuit receiving an input AC line
voltage of the bridgeless boost converter circuit, wherein the control
circuit provides a pulse width modulated signal to control the on time of
a PFC switch of the bridgeless boost converter circuit. The control
circuit also includes a scaling device operable to scale down a bi-polar
AC voltage of the input AC line voltage to a uni-polar AC voltage, an
analog to digital converter operable to convert the uni-polar AC voltage
into digital data and a digital rectifier operable to process the digital
data of the uni-polar AC voltage to provide a half-sinusoidal AC signal
that is proportional to and in phase with the input AC line voltage for
use in providing the pulse width modulated signal.