On TRISB, set PORTB.5 as an Input pin.

OR just add "INPUT PORTB.5" after "portB = 0".


---------------------------------