Questions on Darrel's Instant Interrupts


Results 1 to 11 of 11

Threaded View

  1. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Questions on Darrel's Instant Interrupts

    Hi,
    I'm using a 16F193x chip, so I know I can't have high priority interrupts. Only with 18F chips you can have those. So, my next questions are very simple, I hope.
    Well, that depends on how you look at it. You can't have interrupts with different priorities. Consider ALL interrupts as high priority.

    Your code doesn't make real sense because you're declaring two interrupts, INT_INT and TMR0_INT but then you enable TMR0_INT and TMR1_INT

    1) When either one of the interrupt handlers is servicing it's interrupt, what happens to the other counter? Does it stop until the other interrupt handler is over, or does it keep counting?
    Since TMR0 and TMR1 are hardware timer/counters they will "count" no matter what the software is doing (short of disabling the TMR/Counter of course). If one of them overflows and trips its interrupt while the other ISR is executing the "new" interrupt will be flagged and serviced when the current ISR is finished. DT-Ints handles this for you.

    However, if there would've been TWO or more interrupts triggered from the same source during the time that another interrupt is serviced the "new" interrupt will only be serviced once. For example, your timer interrupt fires and the ISR for that interrupt is executed. While the timer ISR is executing the external interrupt fires, this is then flagged to be executed as soon as the timer ISR is done. But before the code gets to servicing the external interrupt it fires again - this second external interrupt request will then be "lost".

    2) And, what happens if an interrupt counter overflows while the other interrupt handler is been serviced? Does that counter goes back to zero and starts counting again, or it just waits until the other handler is over?
    I think I covered that in [1] above.

    /Henrik.
    Last edited by HenrikOlsson; - 15th November 2013 at 08:22.

Similar Threads

  1. Darrel's interrupts in a 7 segment display
    By ardhuru in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th August 2014, 02:06
  2. Are Darrel's Instant Interrupts and SSPWM mutually exclusive?
    By Andy Wood in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th September 2013, 06:54
  3. instant Interrupts
    By Timmoore in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th October 2009, 06:07
  4. DT Instant Interrupts help
    By perides in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 26th November 2008, 18:41
  5. Instant Interrupts Questions
    By JosueCas in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 4th April 2006, 15:54

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