using ADC in PIC16f877a

Thread Starter

sunil0790

Joined Feb 11, 2013
14
In my project i am utlising 3 ADC channels and to display on an LCD. All the ADC's are working properly but independently. But all together, i am facing some issues.

Assume the first ADC output is 12v and second ADC output is 0v. the o/p is perfect. but the first ADC output is 0 and second ADC is 12. the LCD is displaying a value less than 12 volts, but when i increase the first adc input voltage my second adc o/p is getting corrected.

what might be the reason?
 

tshuck

Joined Oct 18, 2012
3,534
In my project i am utlising 3 ADC channels and to display on an LCD. All the ADC's are working properly but independently. But all together, i am facing some issues.

Assume the first ADC output is 12v and second ADC output is 0v. the o/p is perfect. but the first ADC output is 0 and second ADC is 12. the LCD is displaying a value less than 12 volts, but when i increase the first adc input voltage my second adc o/p is getting corrected.

what might be the reason?
sounds like you swapped your variables... better post your code too...
 

THE_RB

Joined Feb 11, 2008
5,438
It's a common problem if you do not allow enough "settling time" between changing between ADC inputs and reading them.

The datasheet for the PIC covers the settling time, and if time if not so critical it's best to use lots of settling time for good accuracy.
 
Top