Make sure you configure PORTB.0 as an output port with the TRISB register.