A voltage-detecting circuit includes a CPU, a comparator, a first resistor, a
second
resistor, and at least a power level segment detector connected in parallel with
the first resistor, the power level segment detector having a third resistor and
a first switch serially connected to the third resistor. The battery is electrically
connected to a first input end of the comparator. The first resistor is electrically
connected between a second input end of the comparator and a reference voltage.
The second resistor is electrically connected between the second input end of the
comparator and ground. The method includes outputting a control signal with the
CPU to control the first switch by determining voltage levels at the output end
of the comparator, and outputting a power indication signal with the CPU to indicate
the voltage level of the battery by determining voltage levels at the output end
of the comparator.