On Mon, 17 Jul 2006, Mark Rages wrote: > On 7/16/06, Kevin wrote: > > I have a pic16f88, I am using the 10 bit ADC to read an > > LM34DZ. The LM34DZ puts out 10mV per degree F from 0 F to > > 100 F. I have the F88 ADC set to use VSS-VDD for reference, > > 0 to 5V. > > A couple weeks ago I was asking about a digital filter > > to improve the accuracy of the ADC reading. Can anybody > > provide me one or point to a web page that explains one. > > This is strictly a hobby type project, and the LM34DZ will > > be used in my house, so no extreme temps will be monitored. > > If someone could provide an example with numbers plugged in > > I would appreciate it. > > > > Thanks, > > Kevin > > > > You've received two good replies about filtering. One (average five > samples) is called an "FIR" filter and the other (moving average) is > called an "IIR" filter. Google these terms if you need more > information. > > I would like to add that it's a good idea to use an analog filter > before you sample the voltage. It should be a lowpass filter that > removes any noise above half the sampling frequency. The digital > filtering will work out better if you're not trying to filter aliased > noise too. > > Regards, > Mark > markrages@gmail > Yes, now I have received three good answers ! All I want to do is read the LM34DZ with AN0, and a HIH-4000, with AN5. I am using the F88 with the 8Mhz, internal osc. The LM34DZ, puts out 10mV per degree F. The HIH-4000 puts out a voltage between 1V and 4V, which you can use to compute the realtaive humidity. I then take the ADC readings and send them out the serial port to a PC at 19200. Cuurently the ANO and AN5 are both hooked directly to their respective devices.(LM34DZ and HIH-4000). I have googled read the wikipedia on Digital Filters and some other DSP pages, as well as Olin's respose a week or so ago. I was kind of looking for a real world example. What should my sampling rate be ? I only need to xmit a new temp and RH every minute or so. I may add a Pressure sensor later. But, besides sending the new reading to a PC the pic does nothing else. What sampling rate would you use ? This is where I was hoping some one could tell me what they have used effectively in the past. Thanks again, Kevin -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist