An apparatus for regulating current in an electrical load, the apparatus for coupling to a converter to provide current to the electrical load through a switch and an inductor, the apparatus comprising:
- digital logic to control the switch to provide current to the inductor for a first predetermined period of time and to provide current to the electrical load for a second predetermined period of time;
- an integrator to determine an average current during the second predetermined period of time;
- and
- a comparator coupled to the integrator and to the digital logic, the comparator to compare the average current to a predetermined reference level;
- wherein the digital logic, when the average current is less than the predetermined reference level, further is to increase the first predetermined period of time for a next cycle by at least one first predetermined time increment, and when the average current is greater than the predetermined reference level during the second predetermined period of time, to determine a third period of time which elapses until the average current becomes less than the predetermined reference level, to determine an integer corresponding to a ratio of the third period of time to the second predetermined period of time, and to decrease the first predetermined period of time for the next cycle by the integer multiple of the first predetermined time increment.