At 05:08 PM 2/11/00 -0200, you wrote: >Hello, > > I'm making a voltage reader with the internal A/D from a PIC16F877. >While my voltmeter shows that my input have steady 1.18V, PIC's A/D gives me >random values from 240 to 247. Is this normal? Is there a way to make the >A/D shows a steady reading? > Unfortunately..... It is called "quantization error" on most data sheets, and can amount to quite a few bits. On the 16-bit converters we are looking at, and have used in the past, 6-9 bits is not unusual. The Max186 ADCs are quite tight in comparison, and are usually <3 bits. I have no experience (yet) with the '74 or '877 ADC's, but the numbers you give don't surprise me at all. Best way to deal with this inherent noise is to average several readings. Decimation is a standard technique and if you can average enough samples, you can actually gain resolution. Things to do to help the situation: Make VERY sure you have the right bypass capacitors in ALL the right places! Noisy analog power supplies and reference supplies can kill a good ADC. You can also hang a cap directly onto each power/reference pin, and insert a small series resistor to the power rail--10 to 100 ohms depending on the current draw. This will further isolate the bypass cap and increase its effectiveness. Also--volt meters are really slow, or integrate the reading over some time period. THe ADC's in the pic are probably a lot faster and look at a smaller time slice. The faster the sampling rate, the noisier the signal will appear--because you are actually measuring real noise--not just an average. Try taking 100 reading with the PIC and compare the results with your voltmeter--bet they are close. Best way to look at the signal going in to the ADC is with a good analog scope-- enjoy Kelly William K. Borsum, P.E. -- OEM Dataloggers and Instrumentation Systems & San Diego, California, USA