Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

analog input?

Status
Not open for further replies.
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
    divder.JPG
    14.1 KB · Views: 155
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
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top