Marcel Birthelmer wrote: > - filter() looks something like 1/128 * getsamp(t) + 1/128 * getsamp(t > - sampdt) ? No, not really. Each filter pole uses the standard algorithm of FILT <-- FILT + FF(NEW - FILT) Where NEW is the input value being added to the filter, FILT is the filter being updated, and FF is the filter fraction. My filter used two such poles, each with a filter fraction of 1/128. > Or is it an IIR filter? Yes. > - What is the trunc() bit? It converts from floating point to integer by truncating the fraction part. For example, trunc(3.14) = 3. > A peculiarity of the arcane language (I'm > guessing fortran) you're using? It's a variant of Pascal. I was hoping the algorithm would be clear enough even if the syntax details weren't familiar. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist