Hi,
As far as I can see comparator 1's output is on PortA.4 - not PortA.5.If portA.5=1 then ...
And, if you're not actually driving anything with the comparator you don't need to have it "connected" to the physical output. In order to get its state you might as well read CM1CON0.6 (the C1OUT bit).
/Henrik.
Bookmarks