PURPOSE: To allow the comparator to make voltage comparison with high accuracy while receiving an input reference voltage in matching with an analog input voltage by setting two-way of comparison being comparison between external two input voltages and comparison between an external input voltage and an internal reference voltage as a comparison reference input to the comparator.
CONSTITUTION: When a comparison start signal is outputted from a comparator control circuit 12, comparison is implemented between analog input voltages V1 and V2 independently of an internal reference voltage Vr. The result is stored to a bit (n) of a comparator register 14 as 1-bit digital value. A CPU reads the data via a data bus 13 to recognize the result of comparison. When a terminal 11c is thrown to the position of a terminal 11b in a switch 11, an analog input voltage V1 and the internal reference voltage Vr are given to inputs to the comparator. In this case, a digital value corresponding to the internal reference signal Vr is set to the register 14, and the comparator 10 receiving the internal reference voltage Vr by a resistor ladder 16 and a switch tree 15 makes voltage comparison of the voltage Vr with the analog input voltage V1.
ABE MINORU