Many thanks, I now have sleep mode working perfectly! I still need to polish my analogue circuits but with the capacitor the results are much much better.
I'll get onto the capacitors immediately! The pot is a 10k and it's currently running straight from the ground to +5v. Do I need to get a new pot or can I tweak the circuit?
I am trying to get a reasonably accurate measurment from a potentiometer. I am using a 18F4550 which in theory has 10bit ADC. The stability of the reading is 7bit at most the remaining 3 bits are cons ...