Electric apparatus, computer apparatus, controller, and battery switching
method and program is provided to prevent a system shutdown caused by a reduction
of electric power from a battery. A computer apparatus is constructed to be able
to accept and be powered by a rechargeable main battery and a rechargeable sub-battery.
An embedded controller in the computer apparatus monitors a remaining capacity
at a pre-specified temperature of the sub-battery under discharge by receiving
information from CPU. When the monitored temperature exceeds a predetermined temperature
and when the monitored remaining capacity becomes less than a predetermined capacity,
the embedded controller receives electric power from the main battery by switching
the power supply circuit to provide power from the main battery instead of the sub-battery.