Thanks for the reply Jay.
I had analogs disabled but will look into PPS.
Some more of my code below if it helps, it's a cut down version but it gives you an idea of what I'm doing. I have the button ...
I'm porting some known functioning code across from a PIC18F2420 to a PIC18F24K42 because of the chip shortage currently going on. The devices should be pin for pin compatible and apart from a few dif ...