Port A is configured as analog input by default at power on (see note on pg 51 of datasheet), so you will need to include the following configuartion setting to make them digital:
Check out this thread for more infoCode:ANSEL = 0
Although this is likely just an issue of copy-paste from your IDE to the forum, but make sure you pay attention to case. For instance, DEFINES are case sensetive.
And, for furture, you can use the "code" feature to post code. It is the "#" button in the tool bar of the forum posting window, or just type [code] ...your code here... [/code]




Bookmarks