You have set up the comparator to use two comparators with a common reference at pin AN2. The problem is that you have no reference voltage at that pin, VRCON bit 6 should be set to output the Vref. Remember that you can't use this pin for any I/O operations anymore.
Bookmarks