Noise. Probably from Vref. Also from stray lead noise. Possibly too high a source impedance. I put a good bypass cap on the PIC power leads, and also a small value cap (100pf) right at the AN0 pin to minimize the effects of charge dumping of the multiplexor. The quickest way to find your problem is to use a good scope. Be sure you ground the scope probe with a SHORT lead, right at the PIC gnd, or you'll be chasing ground noise rather than your real noise source. Also, make sure that your A/D conversion is complete. Reading before the conversion is complete can give you a partial result wherein the LSB's are still set high. Jeethu Rao wrote: > > I just wanted to test the accuracy of the PIC16f877 ADC. So, I wrote a simple routine to perform a A/D convertion and to read the ADRESH and ADRESL regs, convert them to ASCII and then transmit them through the UART to a terminal Program on a PC. I used only the AN0 input. And I did'nt opt for external voltage refs.And Finally te results were right justified > > But I was getting readings between 00 and 12 (Decimal). Is this normal or Is it because I'm not using External Refs ? I connected the AN0 pin to Ground and I get a perfect 00 on the ADRESL Reg. The track connected to the AN0 pin is quite long. So is it because of some stray capacitance or RF Interferance ? > > Can someone suggest a fix for this problem ? > > Jeethu Rao > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.