An input changing switch is provided at a preceding stage of a comparator that
measures a DC offset of a D/A converter, and also a selective polarity inverting
circuit is provided at a subsequent stage. A first compensation value is generated
by a compensation value generating means and then stored in a register. Then, a
second compensation value is generated by switching the input changing switch and
the polarity inverting circuit and then stored in a register. Then, a third compensation
value is calculated by averaging the first compensation value and the second compensation
value by a compensation value calculating circuit. Then, the DC offset of the D/A
converter is compensated by using this compensation value. Therefore, it enables
to implement a precise DC offset compensation of the D/A converter by canceling
the DC offset contained in the comparator itself employed in the DC offset compensation
of the D/A converter.