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?dDocNam= e=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 .= =20 > I am directly controlling a 10 bit PWM with the result of the 10 bit A/D= =20 > input. I have a problem in that I want to avoid the noise of the A/D=20 > input from affecting my output. This happens if my pot is set just=20 > between two levels so the output fluctuates between two levels. Not very= =20 > much only 1 or 2 levels out of the 1024 but this is significant in my=20 > application. I really only want the output to change if I physically=20 > move the pot. Currently I have fixed it by only outputting to the PWM on= =20 > the output if the input changes by more than 2, assuming if it does I am= =20 > moving the pot. This works in that my output is steady however it=20 > effectively lowers my resolution as well since the output now steps only= =20 > when the pot moves more than 2 values. I was wondering if I should set=20 > up a timer interrupt for say 1 second and if the output changes by more= =20 > than 2 during that second assume the pot is being moved and allow level= =20 > increments of 1. If it didn't move by more than 2 during that second=20 > assume the pot isn't being moved and lock the output. Am I on the right=20 > track here or can anyone recommend another technique . > Jim >=20 >=20 --=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 .