Lets go with small steps and we will come back to the 10 bit resolution~1024.
And lets not worry about the VREF for now. That will take extra hardware to setup the reference voltage. When we get there all you will need for your application is V+.
Read through these two links, Bruce makes very nice tutorials.
This one is using your chip but does not use the ADCIN command. I like this way and it will help you to understand how the ADC works.
http://rentron.com/PICX2.htm
This one is using ADCIN and a different PIC, but will help with your understanding.
http://rentron.com/serial.htm
Get some of the above working and post the code you have. Then we will go for the 10 bit stuff.
Bookmarks