As per your code, it does not function properly on my setup even though I made the LCD changes. What am I not seeing or missing? See video of power up and what happens when I turn the knob of the encoder. See what happens when I select a digit and then turn the knob. I can only get it to respond to the knob turn when I do it fast, not when it is done slowly.
I have the identical rotary encoder module and use no caps at all on it,
I have used a pic18f458 @8mhz , a pic18f25k22 @64mhz they both work perfectly.
I don't have a pic16 chip with the correct pinout to suit the lcd wiring in my easypic7 board so I can't test for those chips
but can see no reason for it not to work.