A-D CONVERTER
12.6 Comparator function
12.6 Comparator function
By setting the AN
be selected for each pin AN
For pin AN where the comparator function is selected, the following comparison operation is performed.
i
pin comparator function select bit (See Figure 12.2.5.) to “1,” the comparator function can
i
.
i
✕ A 10-bit value (a set value), of which high-order 8 bits consist of the corresponding A-D register i
(at an even-numbered address)’s contents and of which low-order 2 bits = “10 ,” is D-A converted.
2
✕ The result of the D-A conversion (that is to say, comparison voltage Vref) is compared with an analog
voltage input from an analog input pin.
✕ The value to be stored into the AN pin comparator result bit (see Figure 12.2.6.) depends on the
i
comparison result as follows:
When Vref > analog input voltage, “0” is stored.
When Vref < analog input voltage, “1” is stored.
7906 Group User’s Manual Rev.2.0
12-18