Thanks everyone for the suggestions. I don't think in my case it is=20 really a filtering issue because for example if my POT is set close or=20 on the edge of an A/D transition I believe I will still see a bit=20 flipping occasionally in the LSB if I have lots of filtering. Not sure=20 if I am being clear but I really only want to have the reading change my=20 output if I am moving the POT so thought there would be a clever way to=20 detect that and only update my output if the input is varying=20 substantially. Perhaps to really get the best results I need a=20 multiturn POT or move to a digital encoder. Thanks, Jim On 2015-11-26 02:08 PM, John J. McDonough wrote: > Microchip has a pretty good video and document (the video is better). > Has a lot of things to consider. > > http://www.microchip.com/webinars.microchip.com/WebinarDetails.aspx?dDocN= ame=3Den528480 > > --McD > > On Thu, 2015-11-26 at 03:26 -0500, Jim Ruxton wrote: >> I am using a pot and the high resolution mode of an A/D on the 16f1828 . >> I am directly controlling a 10 bit PWM with the result of the 10 bit A/D >> input. I have a problem in that I want to avoid the noise of the A/D >> input from affecting my output. This happens if my pot is set just >> between two levels so the output fluctuates between two levels. Not very >> much only 1 or 2 levels out of the 1024 but this is significant in my >> application. I really only want the output to change if I physically >> move the pot. Currently I have fixed it by only outputting to the PWM on >> the output if the input changes by more than 2, assuming if it does I am >> moving the pot. This works in that my output is steady however it >> effectively lowers my resolution as well since the output now steps only >> when the pot moves more than 2 values. I was wondering if I should set >> up a timer interrupt for say 1 second and if the output changes by more >> than 2 during that second assume the pot is being moved and allow level >> increments of 1. If it didn't move by more than 2 during that second >> assume the pot isn't being moved and lock the output. Am I on the right >> track here or can anyone recommend another technique . >> Jim >> >> > > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .