Quote Originally Posted by Darrel Taylor View Post
...
Or, you can turn on PORTB pull-ups (OPTION_REG.7 = 0), make PORTB.4 LOW so you can use SW1 pushbutton.
Changing to OPTION_REG.6 = 0 will make it trigger on the falling edge (button press) instead of the rising edge (button release).
This is funny, I did this very exercise yesterday and posted it in the Code Examples. LOL

Robert