View previous topic :: View next topic |
Author |
Message |
fredbor Guest
|
16F628 and multi interrupt... |
Posted: Fri Jan 23, 2004 2:07 pm |
|
|
I am using a 16F628.
I have two interruption, one with the timer0 every 200 µs and one with the port B. what happens when the two occur. Which has the priority and what appens when there is an interup on portb when we are in the timer0 isr?
Thank you |
|
|
Guest
|
Re: 16F628 and multi interrupt... |
Posted: Thu Dec 29, 2005 1:22 am |
|
|
fredbor wrote: | I am using a 16F628.
I have two interruption, one with the timer0 every 200 µs and one with the port B. what happens when the two occur. Which has the priority and what appens when there is an interup on portb when we are in the timer0 isr?
Thank you |
|
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Thu Dec 29, 2005 3:06 am |
|
|
The PIC16F628 interrupt handling is non rentrant. When an interrupt occurs, interrupts are disabled by the PIC while the interrupt is being processed. If another interrupt condition occurs while inside the handler, the appropriate interrupt flag bit is set but not acted upon. When the interrupt handler completes processing of the original interrupt condition the PIC will return from interrupt automatically re-enabling interrupts. In the case where another interrut flag has been set and the interrupt condition has been enabled, the PIC will immdeiately pass control to the interrupt handler.
This process will repreat until all outstanding interrupts have been processed. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
DragonPIC
Joined: 11 Nov 2003 Posts: 118
|
|
Posted: Thu Dec 29, 2005 8:56 am |
|
|
if both happen at the same time, priority may be set by the #PRIORITY Directive. You can also view priorty in the compiled list file where interrupt flags are checked. _________________ -Matt |
|
|
|