Do what Spehro said and use a 10K pot instead of the 1Meg pot. This will help reduce the amount of flicker but it won't go away. Why? When you are right at a transition point between two digital values, the analog input signal needs to change some tiny amount and you get the higher value then it goes back to the lower value and so on. It's called noise. The infinite analog hisss. Get used to it. Fortunately for you, there is a simple fix. It's called hysteresis. Suppose you have a transition from one count to the next at 1Volt. This means that at .99999 volts, one led is on and at 1.0000 volts the next led is on, so to speak. Change your code such that it doesn't switch to the higher led until your input is say, maybe 5% of the way to the next higher number. If you sense the input is dropping, don't change to the lower led until the input has dropped 5% below the threshold. Do you see how this works? You create a dead-band between input thresholds in your code and get a flicker free result. How much hysteresis you use depends on how "noisy" your input signal is and on what your instructors requirements for accuracy are. (assuming this is a class project?). Doesn't matter, real world projects need to deal with this also. You get to learn something either way. In any case, some analog filtering on the input and some software hysteresis will cure the problem. Good luck! Tom M. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads