Patent ID: 8115523

Claim:
An apparatus comprising: a first current source; a second current source; a switch that is coupled to the second current source; a capacitor that is coupled to the first current source and the switch; a comparator that is coupled to the capacitor, wherein the comparator compares the voltage across the capacitor to a reference voltage; a multiplexer that is coupled to the capacitor and that is coupled to the comparator, wherein the multiplexer outputs the voltage across the capacitor if the voltage across the capacitor is greater than the reference voltage and outputs the reference voltage if the voltage across the capacitor is less than the reference voltage; and a controller that is coupled to the capacitor and that receives a first threshold voltage and a second threshold voltage, wherein the controller actuates the switch if the voltage across the capacitor is greater than the first threshold voltage, and wherein the controller deactuates the switch if the voltage across the capacitor is less than the second threshold voltage.