Is SW1 the SW1 on the LAB-XUSB board? (the matrix keypad)

If so, then you need to turn ON the internal pull-ups on PORTB.
And PORTB.4 is the input. Set PORTB.0 LOW.

See the keypad pinouts in the LAB-XUSB schematic ... http://melabs.com/downloads/LABXUSCH_06.PDF