This is a syntax error that compiles.adcin PORTA.1,vall
You need to use the analog CHANNEL number, NOT the port PIN number.
The hex value of PORTA is $05. Setting the bit to .0, .1, or .3 might set it to 0 or 1, but no matter what Port pin you use, you will never get a port number greater than 1 if you are using a bit value.
The hex value of analog channel 0 (AN0) is 0, and that's what you need to be using. It may have helped to read the HELP file:
ADCIN 0, B0 ' Read channel 0 to B0
So the hex values are valid to compile, but when they are placed into the ANSEL register, you don't get the results you were expecting.
Bottom line: Use the channel number, which is the "x" value of the ANx number on the pin diagrams. This is pretty simple had you looked at the HELP file.
ADCIN 0, B0 ' Read channel 0 to B0
Have fun!
Bookmarks