If you know you have a signal of a certain (constant) frequency (eg. power line) added to the analog input you could take the n samples equally spaced within the added signal's period. Then do the average of the samples and the noise should be cancelled. This may be combined with Bob Axtel's solution. [I'm studying IT and know little about electronics so use with care! Ovidio Vazquez Jara ----- Original Message ----- From: "Ed Sutton" To: Sent: Thursday, August 21, 2003 7:15 PM Subject: [PIC] 10-bit A2D: How to soft filter w/o lose LSB's? > I have a P-I temperature controller using a PIC 16f877. There is apparent > random noise on the least significant 2 or 3 bits of the thermistor sensor > connected to the 10-bit A/D. At least random as it appeared on my > spreadsheet. I am using a 200ms sample rate. > > How can I software filter this noise without losing the least significant > bits of the A/D? > > I do not have a black-belt in math so I was thinking about something simple > like: > Avg=Avg + (Sample-Avg)/k > > This would be simple to implement if k is a power of 2, however, this > appears to lose accuracy. > > Thanks in advance for any tips or suggestions, > > -Ed > > -- > 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: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu