Ok I have posted elsewhere but I think I have my adc problems resolved.
Two code changes. First is not to call adc constructor on each read but only once on configuration change i.e from touch detect -> read x -> read y , then the averaging analogue reads just call the read method each time.
This doesn't fix the issue alone but changing my resetpin function to NOT set ISO does seem to fix it. Just setting IE to 0 will transition the pin to a non latching high impedance input that can still do ADC reads.
At this point the tracking anomaly seems to have vanished. Why setting ISO would cause this I'm not sure but hey, I may have a fix at least.
Two code changes. First is not to call adc constructor on each read but only once on configuration change i.e from touch detect -> read x -> read y , then the averaging analogue reads just call the read method each time.
This doesn't fix the issue alone but changing my resetpin function to NOT set ISO does seem to fix it. Just setting IE to 0 will transition the pin to a non latching high impedance input that can still do ADC reads.
At this point the tracking anomaly seems to have vanished. Why setting ISO would cause this I'm not sure but hey, I may have a fix at least.
Statistics: Posted by ajay_m — Mon Sep 02, 2024 10:58 pm