olin_piclist@embedinc.com (Olin Lathrop) wrote: > Mike Hord wrote: > > Median filter? Take, say, 5 samples, put them in increasing order > > from least to greatest, then take sample 3. > > That still can't gurantee no bounces from sample to sample. You can always come up with a series of samples to defeat any filter. A median-value filter is a fairly standard approach to this problem. It tends to preserve the underlying signal "waveform" fairly well while filtering out glitches that are less than half the filter length. Its primary drawback is the delay it introduces -- half the filter length, just like any other symmetric FIR filter. Since the implementation involves a sorting operation instead of a dot product (multiply-add), it is well suited to smaller processors with no hardware multiplier. -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist