Patent ID: 8288953

Claim:
An apparatus comprising: pulse width modulation (PWM) circuitry configured to generate a PWM signal to control a current flowing through a load; a power switch configured to control the current flowing through the load based on the PWM signal; and averaging circuitry configured to: provide a varying feedback voltage to the PWM circuitry during a first phase of a repetitive control cycle, the feedback voltage based on the current flowing through the load; and provide an average of the varying feedback voltage from the first phase of the repetitive control cycle to the PWM circuitry during a second phase of the repetitive control cycle the averaging circuitry including: first and second switches coupled to a first capacitor; and third and fourth switches coupled to a second capacitor, the third and fourth switches coupled in parallel with the first and second switches, wherein the second switch is configured to receive an inverted control signal of the third switch, wherein the control signal of the third switch is derived from a logical combination of the PWM signal and an inversion of a clock signal, wherein a) the first switch is closed and then opened and the second switch is opened in the first phase to charge the first capacitor; b) the third is closed in the first phase to charge the second capacitor; and c) the first switch is opened, the second switch is closed, and the third switch is opened to redistribute charges on the first and second capacitors and generate the average of the feedback voltage.