PIC ADC analogue voltage reading

Status
Not open for further replies.

richacm

New Member
Hi,

I am just writing some PIC code that will read a 0V-5V analogue value from its AN0 pin. The question I have is what value does the reading relate to in the code? E.g. 0V = 0 but is 5V = 255 and 1V = 51 (255/5)? Or is there some other values for each of these?

Thanks in advance,

Craig
 
If it's an 8-bit converter with 0 to 5V full-scale, then it's ideally just as you stated (without including any A/D inaccuracies or noise).
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…