Dario Greggio wrote: > ok... I guess I get this too. > Something like the "simple" (you showed it many times) > > new_value = (ADC_value+(old_value) ) / 2 > > done for both max and min. Not any more since you explained that negative values are clipped. That makes things more difficult. ******************************************************************** 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