Technically you can't improve the accuracy of the signal with a filter - all you can do is remove noise so that you can get an accurate read on the signal. A simple digital filter that I throw at a lot of signals (where I don't want to do complex signal analysis) is a weighted moving averge. It requires one persistant variable. On start you take the first signal reading and place it in the persistant variable. On each new reading you take 90% of the persistant variable and add it to 10% of the new reading. Then store this value into the persistant variable and output it as the filtered signal. On the PIC it's easier to choose powers of 2, so I'll usually stick to adding 75% of the persistant variable to 25% of the new reading. In C, a filter function might look like this: int filter(int input) { static int filtered; filtered = filtered/2 + filtered/4 + input/4; \\ 1/2 + 1/4 + 1/4 = 1 return filtered; } Of course, since I have no idea what kind of noise you're expecting, what analog filtering (if any) is being used, the sample rate, the expected signal, and other characteristics of the system then I can't tell you how well this will work for you. But as dirt simple and cheap filters go, this is pretty decent. -Adam 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 > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist