It would be better to use RB4, 5, 6 or 7, theese pins have the "interrupt on change" feature. That means it will interrupt every time your pin changes state. If you need to know if it were a high-to-low or low-to-high transition, you need to manually check that in your ISR.
Bookmarks