Patent ID: 8008964

Claim:
A device for providing an output voltage based on a variable input voltage, the device comprising: a charge-pump comprising a plurality of cells, wherein each of the plurality of cells can be configured as an input cell, a stepping cell, or a load cell; a comparator, the comparator having (i) a first comparator input coupled to receive a reference voltage, (ii) a second comparator input coupled to receive as a comparison voltage either one of the output voltage or a fraction of the output voltage, and (iii) a comparator output, wherein the comparator output changes its state in response to a comparison of the comparison voltage with the reference voltage indicating a transition of the comparison voltage above or below the reference voltage; a differentiator coupled to the comparator output, wherein the differentiator is configured to monitor the comparator output and produce a reset pulse each time the comparator output changes its state; a decimator for receiving the reset pulse, wherein the decimator resets its count in response to the reset pulse, the decimator having a predetermined decimation count and configured for counting a number of clock periods that occur in response to not being reset by the differentiator, the decimator further providing an output signal in response to each occurrence of counting up to a multiple of the predetermined decimation count; an up/down counter having a counter input, an up/down control input, wherein the up/down control input is coupled to the comparator output for controlling the up/down counter to count up or down in response to the state of the comparator output, and wherein the up/down counter provides a counter output as a function of (i) the output signal of the decimator and (ii) the comparator output; and a controller for, based on the counter output, detecting whether the device is operating in a first predetermined mode or a second predetermined mode, wherein in the first predetermined mode the controller configures the plurality of cells as a combination of at least one input cell, at least one stepping cell, and at least one load cell, and wherein in the second predetermined mode the controller configures the plurality of cells as a combination of at least one input cell and at least one load cell.