Problem with ADC

Status
Not open for further replies.

timbash

New Member
Hi,

i'm new to PICs and am trying to use the AN0 port on a 16F877 to read a voltage ~1 volt from an external device using an Microchip X1 board. I have a program that works reading the voltage (0-5)through one of the on board variable resistors but when I put my voltage from the external device on that pin I get nothing. I'm taking the ground from the external device also but no joy. Can anyone help?

Thanks.
 
Hello,
try the next port. AN0 ist always connected to the potentiometer. There is no jumper to disconnect it.

Erhard
 
Thanks for the advice, I went to AN2 as that one has nothing connected and it's reading a voltage when nothing is connected to that pin so can't even try to read my external voltage yet.
 
Thanks for the advice, I went to AN2 as that one has nothing connected and it's reading a voltage when nothing is connected to that pin so can't even try to read my external voltage yet.

hi,
Post all of the program so that we can how you have programmed the PORTS etc.
It sounds as though the PORTs are not correctly configured.
 
Last edited:
Problem solved! Thanks again for the help, I got it working the missing piece of the puzzle was a decoupling capacitor as soon as that went on everything worked fine!
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…