analog input?

what is the value the pic receives when it receives an analog input?

hi,
The PIC will not automatically start a conversion cycle, it has to be called from within the program.
 
Analog It could be any thing from 0 to 1024

0 being 0 volts

1024 being 5 volts

You can read higher volts with a voltage divider that scales it up.

You then just divide 1024 by 12 and you'll get 85.333 per volt so say you read 6 volt
the adc value would be 512

Like this one
 

Attachments

  • divder.JPG
    14.1 KB · Views: 204
Last edited:
Hi Eric and Burt,

@doggy, apart from what Eric and Burt have said, the Analog input should be on an Analog input which would require you to configure the AD Module. Than as Eric pointed out, start conversion and any necessary hardware mods that may be required. If its a digital pin than of course you will only be able to 'read' voltages that are with the logic high and low voltage levels. If you want to start off with PIC ADCs than i would recommend this document to get familiar with the jargon

https://www.electro-tech-online.com/custompdfs/2010/11/adc.pdf
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…