Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC16F877A ADC converter problem

Status
Not open for further replies.

Thunderhorse312

Member level 1
Joined
May 7, 2012
Messages
32
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,286
Activity points
1,526
Hi! how do i convert input voltages having decimal point (i.e. 2.52324V and 2.818203V). I wasn't able to differentiate these voltages because the input voltages have ADC values that are the same like 1011. What can i use to fix this. thanks!
 

It helps if you have a very stable external reference voltage for the ADC.
For the 10 bit converter, divide the ADC reference voltage by 1024 for the resolution, then multiply that by the ADC result for the value in volts.

for example, if the ADC returns 500,

Vin = (ADC_REF / 1024) * ADC_Result;

Vin = (5 / 1024) * 500;

Vin = 2.44 Volts.

You should have good filtering on your ADC input so noise doesn't swamp the small differences.

Here is a link to an article on implementing a simple digital filter on the results.

**broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top