Patent ID: 8525498

Claim:
A voltage regulator circuit, comprising: a switching circuit having an input current; a current average circuit electrically coupled to said switching circuit to generate a signal indicative of the average value of said input current; and a current limit circuit electrically coupled to said switching circuit and said current average circuit to limit said average value of said input current to a value, wherein said switching circuit further comprises an input switch through which said input current flows; wherein said current average circuit comprises: a current sensing circuit electrically coupled to said input switch to sense said input current and generate a sensed current proportional to said input current; a first capacitor electrically coupled to said current sensing circuit and said current limit circuit; and a first switch electrically coupled across said first capacitor; wherein when said first switch is on, said first capacitor is charged by said sensed current and when said first switch is off, said first capacitor is discharged; wherein said first switch is turned on and off complementarily to said input switch; wherein said current limit circuit compares the voltage across said first capacitor with a threshold voltage and turns off said input switch when said voltage across said first capacitor and said threshold voltage fulfill a relationship; wherein said relationship is that said voltage across said first capacitor is larger than said threshold voltage; the circuit further comprising a threshold correction circuit operable to adjust said threshold value along with said first capacitor; and wherein said threshold correction circuit is integrated in the same IC with said current average circuit and comprising: a second capacitor; a second switch electrically coupled across said second capacitor; a current supply circuit electrically coupled to said second capacitor to supply charge current to said second capacitor; and a sample and hold circuit electrically coupled to said second switch and said current limit circuit to sample and hold the voltage across said second capacitor; wherein said second switch and said sample and hold circuit are controlled by a clock signal; and the output of said sample and hold circuit is used as said threshold voltage.