Devices, circuits, and methods generate a substantially constant output
voltage. A power storage element generates a DC output voltage from an input voltage.
The output is sampled to generate a feedback signal. An error amplifier generates
an error signal from the feedback signal and a reference voltage. A ramp generator
generates a ramp signal from the error signal. A comparator generates a pulse signal
by comparing the ramp signal to a threshold voltage. The pulse signal is used to
control a power switch, which switches the power storage element on and off. The
pulse signal is generated such that, if the input voltage changes within a certain
range, a width of its pulses changes so as to maintain the output voltage substantially constant.