This example shows ACMP - analog comparator, which compares voltage from potentiometer and voltage from DAC. DAC is set at 2.5V and uses the positive input of the comparator. Potentiometer uses the negative input in the range of 0V - 5V. When the potentiometer is moved, the output from ACMP will be changed. If the voltage at the non-inverting (positive) input > the voltage at the inverting (negative) input, the output result is in the logic level 1 and the red LED is on.