thats a good thought about a negative input , and clearly the value for negative flag is being set

the 18f67k22 , which i am using, Has AN0-AN6 as negative inputs , for differential input , selected by ADCON1- BITS 2-0 , where 00 = AVSS. and they are not being set

AN4 is used for is used for ad input every 20 secs , but at no time is it set to a negative ref , by adcon1

AD17 is part of comparitor 3 input , which is set to 0 so that should not be affecting it

its got be stumped what setting maybe forcing the neg value ,

and it feel like i have a setting wrong some where for an17

i have moved to an7 to continue sorting out the CTMU for touch switch service , which has helped get a more consistent reading to sort out the touch function

the CTMU is nice bit of the PIC chip "IF" you can work your way around all the possible settings including the interrupts ,

i also note that the DT'S INts_18_k22.bas does not support the CTMU intrerupt for external pin triggering , and will need to be added or do it via a manual clearing of interupts , but thats for later