Okay, how about this (thinking it should work, though I haven't tried it)..= .. - Set a deadband that will eliminate that bit toggling (say 2). - If you detect a change that's greater than 2, set the deadband to=20 zero, and start a timer for a few seconds. - Keep resetting the timer as changes greater than 2 are detected (even=20 though the deadband is 0). - After not seeing any change of at least the 2 for over those few=20 seconds (timer runs out), re-set the deadband back to 2. Since I really doubt anyone will be able to nudge the pot just 1 bit,=20 this would detect if someone is using it and let them get to 1 LSB while=20 changing it. Seeing no change of at least the deadband value for a few=20 seconds would indicate that no one is changing it, so you lock it at=20 that value (by re-introducing the deadband). Cheers, -Neil. On 11/26/2015 11:28 PM, Jim Ruxton wrote: > Thanks everyone for the suggestions. I don't think in my case it is > really a filtering issue because for example if my POT is set close or > on the edge of an A/D transition I believe I will still see a bit > flipping occasionally in the LSB if I have lots of filtering. Not sure > if I am being clear but I really only want to have the reading change my > output if I am moving the POT so thought there would be a clever way to > detect that and only update my output if the input is varying > substantially. Perhaps to really get the best results I need a > 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?dDoc= Name=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 ver= y >>> 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 o= n >>> the output if the input changes by more than 2, assuming if it does I a= m >>> moving the pot. This works in that my output is steady however it >>> effectively lowers my resolution as well since the output now steps onl= y >>> 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 mor= e >>> than 2 during that second assume the pot is being moved and allow leve= l >>> 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 .