Safely getting out of an interrupt


Closed Thread
Results 1 to 16 of 16

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    am I wrong?
    yes , totally


    interrupts are really a special type of gosub, one that can occur not from a set point in code space but one that occurs when an external stimulus occurs.
    secondly , a 14bit core chip has only one interrupt level only
    Warning I'm not a teacher

  2. #2
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    Richard,
    Thanks for responding.
    So, your saying there is more to the interrupt than saving Status, w, saving address, enabling bits, setting or clearing flags? I want to receive an interrupt RX_INT and as soon as the program has jumped to the Label ( _ReciveData), I can stop the interrupt routine, take care of business, then go to somewhere in the program other than the program location of that interrupt. If I use INT_Disable and INT_CLEAR what is left hanging? What else needs to be taken care of? I don't care about the old w, I don't care about the old status, I don't care about the old address. Please explain what i'm missing.
    Thanks,
    Wayne

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,392


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    the problem is that it then becomes a once only event , the pic will never branch to another interrupt.
    Warning I'm not a teacher

  4. #4
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    richard,
    OK, so after I’ve thought about this perhaps its not my program that would have a problem but DT’s interrupt. If it acts as a special gosub then there may be some return address and flags that have to be taken care of. Is that correct? If so, how do you get out of it without using INT_RETURN?

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,392


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    If so, how do you get out of it without using INT_RETURN?
    it can't be done any other way except with a reset
    Warning I'm not a teacher

  6. #6
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    I believe you would have to POP the Stack, which is to remove the Saved Address the Interrupt was called from. Otherwise you'll eventually get Stack Overflow. If you only need that INT once after start-up, may not be an issue.

  7. #7
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    thanks for all the input. I've go to chew on this a while. perhaps DT_Handler macro may give some clues as to what would be required.
    Wayne

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,392


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    imagine driving down the road when ----
    "there's a Howard Johnsons! want to eat some clams?" (an interrupt occured new direction required)
    you turn the stering wheel to head towards the Howard Johnsons (the act of turning the wheel is the interrupt service) when the new direction is established you release the steering wheel car heads to the Howard Johnsons .
    your holding the steering wheel on full lock and asking how can i straighten up without letting the steering wheel return to normal
    its not goint to happen
    apologies to frank zappa (billie the mountain)
    Warning I'm not a teacher

  9. #9
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: Safely getting out of an interrupt

    Now I’m getting hungry! No Eldorado Cadillac. Not going to New York, Neeewwww Yooorrrrk!!! Did get drafted. Frank Zappa, Studebaker Hawk, RIP wherever you are!

Similar Threads

  1. Replies: 0
    Last Post: - 27th August 2004, 07:20

Members who have read this thread : 1

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