Interrupt block with different exit?


+ Reply to Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,656


    Did you find this post helpful? Yes | No

    Default Re: Interrupt block with different exit?

    My question is...Is there a way i can do the jumps to where i want on the code and not being forced to return to where i was when the interrupt was triggered?
    no , the isr must return to the point it was triggered from. if you try manipulating the stack to alter the return address without the proper skillset and understanding it will always result in unpredictable behavior.
    if you structure your code to check frequently for a flag set from the isr that causes different processes to be invoked its possible to simulate the sort of result you are looking for
    Warning I'm not a teacher

  2. #2
    Join Date
    Jul 2024
    Posts
    28


    Did you find this post helpful? Yes | No

    Default Re: Interrupt block with different exit?

    Greetings Richard,

    thanks for the reply.
    I thought that the interrupt would still work (at least the detection part) even if we didn't want to go back to the code.
    In that case i will need to do what you are suggesting and add periodic checks (in the normal code sequence) for a flag change done by the interrupts.

Similar Threads

  1. Exit from an IF/ENDIF loop with a GOTO
    By aratti in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 17th February 2014, 13:05
  2. Capture loop exit
    By spcw1234 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2012, 20:29
  3. ASM block does not compile
    By efarook in forum mel PIC BASIC
    Replies: 2
    Last Post: - 31st May 2008, 21:42
  4. Timer Interrupt to exit a closed loop
    By duncan303 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 16th December 2007, 16:45
  5. block comment?
    By eoasap in forum General
    Replies: 5
    Last Post: - 13th October 2005, 00:32

Members who have read this thread : 11

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts