> What happens if the average is 180, and the readings are 178, > 179, 181 and 182? Hmmm. OK. We're into the trial-and-error stage of development ;-)) I see what you mean. Results will revolve around any arbitrary centre point unless compensated In the example above (+ 178 + 179 - 1 -2) / 4 =3D 88.5 or (-2 -1 + 181 + 182) / 4 =3D 90 So.......strip off the centre point to make absolute differences and then add it back as an offset ? The obvious answer is 180, which could be arrived at by (-2 -1 + 1 + 2) + 180 Joe --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .