Kerry Wentworth wrote: >> FILT <-- FILT + FF(NEW - FILT) >> >> where FILT is the low pass filter being updated with input value NEW >> each iteration. FF is the "filter fraction". FF =3D 1 is just a pass >> thru filter, and FF =3D 0 is a infinitely heavy filter. Useful values >> are obviously in between. In a small system with limited math >> capabilities, you often arrange FF =3D 1/(2**N), so that the multiply >> by FF becomes a right shift by N. > > I would normally implement such a filter as: > > Total =3D Total + New - Filt > Filt =3D (Total+1) / Factor I'm not sure what exactly that results in, but it's not a single pole low pass filter, otherwise known as a exponential decay. The simple case of a unit step input with N=3D1 proves that easily enough. Your filter jumps to= 1 in the first iteration, then stays there. It also requires more computatio= n and more persistant state, so it's not clear what the advantage is. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .