A comparator circuit according to an embodiment of the present invention
includes a comparator configured to compare an input signal voltage with
a reference voltage obtained by smoothing the input signal by use of a
resistor and a capacitor, and output a result of the comparison, a
discharge circuit configured to compare a first addition signal which is
obtained by adding a positive first voltage to the input signal voltage,
with the reference voltage, and discharge the capacitor when the first
addition signal is lower than the reference voltage, and a charge circuit
configured to compare a second addition signal which is obtained by
adding a negative second voltage to the input signal voltage, with the
reference voltage, and charge the capacitor when the second addition
signal is higher than the reference voltage.