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.

assemply with pic18f4520

Status
Not open for further replies.

tinhnho

New Member
Hi guys,

I have this assemply code which poll 2 low priority interrupts INT1 and INT2
Code:
org 0x0018               ; low priority interrupt vector
btfsc INTCON3,INT1F
goto  ISR_for_INT1    ; service device 1
btfsc INTCON3,INT2F
goto  ISR_for_INT2    ; service device 2
goto  $                    ; trap $

I know that INT1 has higher priority than INT2 (correct me if i'm wrong). What should i do to implement equal priority for the two interrupts in this code above. thanks.
 
tinhnho said:
Hi guys,

I have this assemply code which poll 2 low priority interrupts INT1 and INT2
Code:
org 0x0018               ; low priority interrupt vector
btfsc INTCON3,INT1F
goto  ISR_for_INT1    ; service device 1
btfsc INTCON3,INT2F
goto  ISR_for_INT2    ; service device 2
goto  $                    ; trap $

I know that INT1 has higher priority than INT2 (correct me if i'm wrong). What should i do to implement equal priority for the two interrupts in this code above. thanks.

org 0x0018
btfsc INTCON3,INT1F
goto ISR_for_both
btfsc INTCON3,INT2F
goto ISR_for_both
return
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top