A reference voltage generating unit generates a plurality of analog
reference voltages, and an A/D converting unit converts the analog
reference voltages thus generated and an analog input voltage input from
an external device to digital reference values. A CPU generates, based on
the analog reference voltages and the digital reference values converted
from the analog reference voltages, an equation for correcting the analog
input voltage to be converted to a digital value falling in a range of
the digital reference values. With the equation generated, the CPU
calculates the analog input voltage for the digital value obtained by
conversion.