Yes, you can switch to whatever Port or pins you wish.
If you are not using weak pull-up's on PortB, delete the appropriate line in my code as it's not required.
You will then need an external pull-up Resistor, say 10K, connect it between the PIC pin that you are using and Vdd (+5v). The Push-Button is as usual connected between the PIC pin and Vss (0v).
Melanie
Bookmarks