Hello Jeffrey, May be all you need is math library. If all you want to remove from signal is short peaks, exponential filter is enough. It has the following transfer function 1 W(s)= ------ Ts + 1 Calculation scheme is very simple. Let us call x the result from ADC and filtered result. Alpha is ]0,1[ and determines time constant T. The bigger is alpha, the smaller is T. 0) measurement ( x = ADC_result ) 1) y = x 2) y_before = y 3) measurement ( x = ADC_result ) 4) delta = x - y_before 5) y = y_before + alpha*delta ---> the next filtered number is ready 6) goto 3 So all you need is signed addition and multiplication. Be aware of number of binary digits used to store y_before and to do all calculation. If your ADC is 8-bit, I think you need 16-bit to get true exponential filter. Your filter's step response shall look like this |output | |1 +++++++++++++++++++++++++ | ++++++ | ++++ | +++ | ++ | + | + |+ +--------------------------------------------------- time 0 Sorry if I say trivial things :)) JS> Does anyone know of a software library (source code) that I could port to JS> the PIC for real-time filtering? I'm grabbing A/D data and want to do some JS> basic artifact removal in software (real-time hopefully, before sending it JS> to another processor) but I need a starting place of some working code. Any JS> language would be fine... -- Best regards, Oleg mailto: remove_this_word.sergin@fcita.dn.ua