A semiconductor device includes an adjustable current source that is
coupled to an external battery. The semiconductor device includes a
feedback control module that is responsive to a voltage level at the
external battery. The feedback control module also has an output that is
directed to control the current supplied by the adjustable current
source. Also, the feedback control module can selectively provide a
signal to periodically and temporarily turn off the current supplied by
the adjustable current source. A voltage at the external battery is
measured during a time period when the current is turned on and during a
time period when the current is turned off. While the current is turned
off, the feedback control module can measure the external battery voltage
so that it can be compared to the battery voltage while the adjustable
current source is on.