Hi,

Could you please insert the following lines in your register settings:

Code:
SSPCON.5   = 0                  ' DISABLE THE SYNC.SERIAL.PORT AND USE AS I/O
TRISB      = %11000000
PORTB      = 0                  ' Init PORTB to low
Portb.5 is shared with the onboard Synchronous Serial Port. Turning off bit 5 of the SSPCON registers turns off this peripheral and configures it as general I/O.