using ADC in PIC16f877a

Discussion in 'General Electronics Chat' started by sunil0790, Feb 11, 2013.

  1. sunil0790

    Thread Starter New Member

    Feb 11, 2013
    1
    0
    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?
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Hard to say something as it is now. You better post your schematic
     
  3. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    sounds like you swapped your variables... better post your code too...
     
  4. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    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.
     
Loading...