See if this helps;

CMCON0 = 7
ANSEL = 0

Comparators & A/D are enabled by default on power-up. To use some pins for
digital I/O, you need to disable these.