Hi,
Well, that depends on how you look at it. You can't have interrupts with different priorities. Consider ALL interrupts as high priority.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.
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
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.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?
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".
I think I covered that in [1] above.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?
/Henrik.
Bookmarks