A battery-powered power supply system is disclosed that is fully compatible with PMU ASIC and USB power architectures as well as being backwards compatible with the non-PMU power architectures. A battery-powered power supply utilizes a battery source (e.g., two AA battery cells in series), in a circuit including a switching power supply IC with a programmable variable output voltage and current limiter, along with a microcontroller. The invention also can include a flashlight or similar light source, which has utility beyond the obvious uses of a flashlight. The voltage and current supplied by the system of the present invention is controlled by the microcontroller to provide a variable voltage, variable as a function of time, if desired, during the charging operation. The flexibility afforded by a micro-controller controlled system allows the present invention to operate in different power or operational states and to adapt itself to the load demands. Furthermore, a unique power 'boost' feature can be invoked by the user or be automatically invoked.