The HIGH & LOW commands take care of the TRIS registers for you to make your I/O-pins outputs, but they don't take care of certain built-in hardware peripheral features.
In this case, that would be the onboard comparator & A/D modules.
Try this;
Take a peek in the datasheet under the Comparator Module & Analog-to-Digital sections to see why this makes it work.Code:CMCON = 7 ' Comparators off ANSEL = 0 ' A/D off, set I/O to all digital Start: HIGH 0 HIGH 1 HIGH 2 PAUSE 500 LOW 0 LOW 1 LOW 2 PAUSE 500 GOTO Start




Bookmarks