An amplifying circuit amplifies and outputs voltage difference between first
external
input voltage and voltage corresponding to second external input voltage. An A/D
converting circuit converts the output voltage of the amplifying circuit into a
digital value by comparing it with reference voltage, and outputs it. A bias circuit
selects the second external input voltage or voltage obtained by adding bias voltage
to the second external input voltage, according to the output voltage of the amplifying
circuit, and outputs it as the voltage corresponding to second external input voltage.
A first storing circuit prestores a measured value of the bias voltage, and outputs
the stored value as a digital value whose bit number is greater than that of the
digital value from the A/D converting circuit, when the voltage corresponding to
second external input voltage is the voltage obtained by adding the bias voltage
to the second external input voltage.