Hi and welcome!
i see 1 small mistake ADCON1 setting. When you use 10 bit resolution, you have to specify to right justify your results, unless, yeah they might be weird.
ADCON1 = %10000100
Now depending of your external impedance the Acquisition/sampling time might be too small. Let's see the worst case... 4MHz, 10K impedance, min acquisition time 11uSec... bah... probably not enough to screw things.
Sounds like an interesting project so far
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks