This has been solved. The issue was that on the PIC16F887, SS is on RA5 which is also AN4, and for that reason I had to write to a register to enable the digital input buffer because I am using that pin as a digital input. In this case it is ANSEL. It had to be cleared for that pin. Many thanks to Ric.
Bookmarks