Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top