I need help I want to read input pontimeter on pin RA0
and pin RA1 which a temp. sensor is attached
from reading the book the code is as follows to read RA0
TRISA = 0xFF // all port a i/o inputs
ANSEL =1
ADCON0 = 0b00000001 //channel an0/ra0 selected
int x=0;
GODONE = 1;
while (GODONE ==1)
{
}
x=ADRESH
so this is basic for reading value of port ra0 to value X
so How do I read value of RA1 ??
and pin RA1 which a temp. sensor is attached
from reading the book the code is as follows to read RA0
TRISA = 0xFF // all port a i/o inputs
ANSEL =1
ADCON0 = 0b00000001 //channel an0/ra0 selected
int x=0;
GODONE = 1;
while (GODONE ==1)
{
}
x=ADRESH
so this is basic for reading value of port ra0 to value X
so How do I read value of RA1 ??