Hi,
I haven't been following this thread but why do you say presumably the 12F683 has no comparators, would that be the case ?
Why not simply open the datasheet and have a look? Sure enough, the 12F683 DOES have a comparator and it's control register is CMCON0 - which you had got correct in your previous snippets of code but not in the latest one. I'm not saying this is the problem though.
Verify that ALL your grounds/commons are connected, as you move the wiper of the pot measure the voltage right at the PIC, between pins 8 (Vss) and 7 (AN0) to verify that it's not a loose connection or floating ground etc.
/Henrik.




Bookmarks