An A/D converter has a first voltage generation circuit, a second voltage
generation circuit, a comparator, first and second switch circuits
connected in series between an input terminal of an analog input voltage
and an output terminal of the first voltage generation circuit, a first
capacitor inserted between a connection node between the first and second
switch circuits and the first input terminal, a second capacitor inserted
between an output terminal of the second voltage generation circuit and
the second input terminal, a third switch circuit, a fourth switch
circuit, an A/D converter which generates a digital signal in accordance
with signal level of the first output terminal, and a voltage setting
circuit which sets a voltage to be outputted from the first and second
voltage generation circuits based on the digital signal.