Program looks ok, even used CMCON. Have you tried the old blinky LED program yet?
Put an LED an GP4 and make it blink. When that works, put the switch on GP0, and turn the LED on and off with that switch under program control.
After that, it should be easy to change it over to do what you want.
Bookmarks