A detection device and method for accurately detecting the battery
capacity remaining in the device independent of the operating mode of the
device. When the battery-powered device is operating in a low load mode,
the battery discharge voltage is A/D converted and the remaining battery
capacity is determined based on the resulting digital signal. When the
battery-powered device is operating in a high load mode, the battery
discharge voltage is compared with specific threshold voltages, and an
interrupt process is run based on the comparison result to calculate the
remaining battery capacity.