Use the AN? number, not the PORT pin.
ADCIN 0,W0
ADCIN 1,W1
With the original statements ...
ADCIN PORTA.1,W1
It reads PORTA.1 as a DIGITAL bit value. And since the pin is in analog mode, it always reads 0.
It then uses that number for the AN? channel. So ADCIN always reads Channel AN0.
<br>
Bookmarks