Patent ID: 8242766

Claim:
A controller for a power supply, the controller comprising: a phase angle measurement block to be coupled to receive an input sense signal, wherein the phase angle measurement block generates a phase angle signal representative of a phase angle of an input voltage of the power supply in response to the input sense signal; and a drive logic block to be coupled to control switching of a switch included in the power supply, wherein the drive logic block controls the switch in a closed loop dimming control when the phase angle is less than or equal to a phase threshold and wherein the drive logic block controls the switch in a open loop dimming control when the phase angle is greater than the phase threshold, wherein the drive logic block outputs a drive signal to control switching of the switch by setting one or more operating conditions of the drive signal responsive to a feedback signal when the drive logic block controls the switch in the closed loop dimming control, and wherein the feedback signal is representative of an output of the power supply.