Hello,
I am going to use a sensor which will produce analog output ranging from 0V to 5V. So I need to connect the output from the sensor to pin RA0 (AN0).
What should I do in the program code? Just configure ADCON1? What about ADCON0 and ADCON2? So far I just see people use ADCON1.
I use this instruction for setting ADCON1:
MOVLW 0x0E ; since I just only use pin RA0
MOVLW ADCON1
what I want is just the result in ADRESH and ADRESL register. I don't care the value, I just want to use the value for my if/else statement later in the code.
Please, someone..