Octavio, At 05:33 PM 9/23/97 -0300, you wrote: >I have another question about this. One of my pic aplications is a cow >scale, >I do my best to keep it still but you can imagine how the cow listen to >me,it don't keep still at all. >The filtering I'm doing is: VAL=(LASTVAL/7+NEWVAL)/8 >I know thie is not the best way, is the median average better in this >case? > >Regards, > >Octavio I had a friend in the '70s who designed a scale for sheep/goats. Whilst he did not use a PIC, his approach may be of value to you. His strain gauge sensor output was amplified and then put through an adaptive filter before being digitised and displayed. His adaptive filter was simply a low pass RC filter with the C being connected to ground via 4016 transmission gates. The first time on the scale, the filtering was very short in time constant, allowing a quick attack. The time constant was automatically adjusted by switching in progressively larger C values so that the effects of dancing by the animal was filtered out quickly resulting in a near perfect reading in a relatively short time. And no need to learn sheep-speak ..... Perhaps you could use the PIC to switch filtering/averaging in your analogue path in a similar way. HTH, Regards, Ross McKenzie Melbourne Australia