Patent ID: 8102683

Claim:
A controller for a switched mode power supply, the controller comprising: a zero-crossing detector coupled to generate a zero-crossing signal representative of a length of time that a zero-crossing condition of an input voltage of the power supply exists, wherein the input voltage is a dimmer output voltage; a counter coupled to generate a phase count representative of a phase angle of the dimmer output voltage in response to the zero-crossing signal, wherein a reference signal is generated in response to the phase count; a feedback reference circuit to be coupled to receive a feedback signal and the reference signal, wherein the feedback signal is representative of an output of the power supply and wherein the controller is adapted to adjust the reference signal in response to the length of time that the zero-crossing condition exists; and a drive signal generator to be coupled to control switching of a switch included in the power supply in response to an output of the feedback reference circuit to regulate an output of the power supply.