Hi, see my posting from last week 'Digital filtering on PIC's' and the excellent replies it generated, other techniqes than mentioned below. Very simple and easy to implement is an recursive moving average filter. First, accumulate N-number of samples ( preferably N should power of two factor 2,4,8 etc as there is division involved ). For each sample: add it in an circular buffer of the same size as N, where X(0) is first sample X(N-1) is last sample. Then calulate the first filtered value like: ( the adding could be done while collecting them ) Y(0) = [ X(0) + X(1) + ... + X(N-1)] / N Then the next ( and consecutive ) filtered value/s can be calculated for each new sample( where the first would be X(N) ) by using: Y(1) = Y(0) + [ X(N) - X(0)]/N And first the next: Y(2) = Y(1) + [ X(N+1) - X(1)]/N Take care though for possible negative numbers when calculating the difference between latest and oldest sample and dividing it :-). And also to elliminate roundoff errors one could always add one to the value to divide before the latest division by 2. If you need buffer routines or example code, please request to me personally. /Tony Tony KŸbek, Flintab AB ΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣ E-mail: tony.kubek@flintab.com ΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣ