Patent ID: 8593129

Claim:
A power supply, comprising: a switch to be coupled to an energy transfer element; and a controller coupled to control switching of the switch to regulate an output of the power supply, wherein the controller includes: a phase angle measurement block 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 coupled to control the switching of the switch, 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 an 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, and wherein the drive logic block sets 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 the output of the power supply, wherein the drive logic block comprises: a feedback reference circuit coupled to receive the feedback signal and a reference signal; and a drive signal generator coupled to receive an output of the feedback reference circuit, wherein the drive signal generator generates the drive signal responsive to the output of the feedback reference circuit when the phase angle of the input voltage is less than or equal to the phase threshold, and wherein the drive signal generator generates the drive signal in the open loop dimming control when the phase angle is greater than the phase threshold.