Menu

Declare On Interrupt only once?

Help
Jonny!!!
2008-08-21
2013-05-30
  • Jonny!!!

    Jonny!!! - 2008-08-21

    If I'm using interrupts in a few places in my program (each in a different subroutine), Should i put

    On Interrupt PortABChange Call Get_Passcode

    at the start of each subroutine that uses interrupts? Or do I declare it before any of the subroutines?

     
    • Hugh Considine

      Hugh Considine - 2008-09-13

      Put it where you want the program to start responding to the interrupt. If you want to stop it from responding to a particular interrupt, you can write

      On Interrupt PortABChange Ignore

      To re-enable that particular interrupt, set the sub again. One limitation, it's only possible to have one subroutine to handle a particular interrupt.

       
    • Nobody/Anonymous

      So I can only use this On Interrupt command with this particular interrupt only in one subroutine? Or can i call it in each subroutine that is looking for that particular interrupt? I'm confused.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.