CMCON0 = %00000000
... only common points these two pins share is serial programmer, and comparator inputs, and convienently the comparator ouput pin as an output works just fine!
Exactly as it should.
Comparator mode 0 has both GP0 and GP1 as ANALOG inputs, with GP2/COUT as DIGITAL.
Configurations can be seen in FIGURE 8-3 COMPARATOR I/O OPERATING MODES.
The configuration you want is CMCON0 = %00000111 ... (ALL DIGITAL).
<br>
Bookmarks