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.

Reading data from ADC output

Status
Not open for further replies.

belinda_sg

New Member
hi, i am new to PIC programming... thx for your help first....

i am using PICF2320.
i will create one look up table in the EPROM. my MCU read some external voltage. it converts to digital value through ADC, then i want to pick up the corresponding value and display it in my LCD.

my question is how can i connect the value from ADC and the value stored in EPROM?
 
I am not sure if this is what you are asking... but the way a ADC works is related to the resolution of the ADC. If you have an 8-bit ADC it means that for a range of voltages from 0 to your reference Voltage, you will only have 256 numbers (from 0-255)

What I mean by this is that if your reference voltage is 5V then 0V is going to be 0, and 5V is going to be 255. That said then you know that 5V/255 will give you a resolution of 0.0196V (~0.2V). This means that each change of 0.2V on your ADC input will reflect in higher conversion.

Then
0V will be 0
0.0196V will be 1
0.0392V will be 2
0.0588V will be 4.....
2.4901V will be 127 (middle point)....
5V will be 255

The higher the resolution the smaller the voltage steps. So if you use a 10-Bit ADC you will have 1024 different numbers, and a 12-bit ADC will have 4096 so each step will be of 1.22mV with a 5V reference.

So now that you know what numbers you are getting and how, then you have to find a logic way to relate them to the EEPROM address that you want. And read it.. now that is upto you to find the correlation.

Ivancho
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top