> This seems to be taking on a life of its own! > 5 degrees is accurate enough for my needs. If time response is not critical, and it may be, then yuou can smooth this as much as you need to make it stable against any sensible amount of random noise. For faster response even a modest formally designed (as opposed to just a big RC) low pass filter (say 2 to 4 poles) will make a vast difference to the response time. A 4 pole LP filter can require as little as 2 transistors and some passives. You can get 3 with a single transistor if needs be. Russell -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist