Pic 16f877a anlog input error

Discussion in 'Embedded Systems and Microcontrollers' started by saneeshforu, Apr 30, 2014.

  1. saneeshforu

    Thread Starter New Member

    Feb 22, 2014
    Haii all ..
    I have a doubt with analog inputs in pic16f877a....I have designed a temperature indicator using lm35 and pic 16f877a(AN0 pin used) it is working well also.
    I found a scenario that when we connect any of other analog inputs (AN1 to AN7) to VCC then the temperature reading increasing by 15 degree(ie 150 mv).
    I measured the voltage at AN0 pin and it not have an increase of 150mv.So the error may be an internal...? How this type of interference occurs. May be this
    is a simple question for professional...but i am a beginner ...help me
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    There could be a number of things causing this.

    What is your schematic and configuration?
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    As tshuck say it can be several causes Like if one of input channels are saturated/overloaded. Saturated will say that a input channel has a input higher than the ADC conversion somewhat simplified. This may influence on the conversion on all ADC inputs even if they are none saturated. Due to the ADC layout in your PIC
    saneeshforu and absf like this.
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    A curious error indeed if the AN0 voltage does not increase.

    My first thought is how stable is the A2D reference voltage? Do you use an external reference voltage? Is it stable?

    If you use the internal Vdd as a reference is THAT stable?
    (By stable I mean does it too change when you apply the voltage to the AN pins)

    This PIC has 2 power and 2 return pins, do you connect them all? Do you use two nice bypass caps (0.01 to 0.1uF) right at the PIC pins?
    saneeshforu and absf like this.
  5. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    Could be the additional load dropping Vdd, which makes the ADC read higher if Vdd is the Vref.
    saneeshforu likes this.