interrupt

Status
Not open for further replies.

philipsi

New Member
how to use interrupt on change on port b in BASIC? if there are four buttons connected to RB4-RB7 and also OR to RB0, if interrupt occurs, how to check which button is pressed?i really have great nightmare with this feature and my project gets stuck because of this.can anyone help me pleas
 
philipsi said:
if interrupt occurs, how to check which button is pressed?

Inside the interrupt routine simply poll RB4 - RB7 like you do with any normal input inside your software.

something like this (for picbasic pro):

IF PORTB.4 = 1 THEN
;do something
ENDIF
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…