Try a capacitor of maybe 10 to 22uF from the ADC pin to the zero rail. Should help smooth things out.
VREF needs to be stable/steady. If the voltage swings the ADC will also. Some will power the pic at 5.2 or so. If that is the case then the VREF needs addressed.
Many times if I am powering the PIC at ~5 volt I will have the VREF at 3 or 4 volts. That way if VDD changes a little it will not cause a problem with the ADC reading.
Bookmarks