When your PIC powers up, the default ADCON1 sets all the analogue ports ON.
So as you are wanting to use the ports as Digital you must appropriately set them by means of loading 0x06 to ADCON1.
See the datasheet for further details of how to use ADCON1.
Notice that its only setting them to Digital, you still have to set the TRIS register for the input or output direction you require.