Maker Pro
Maker Pro

Microcontroller interrupt

I am studying microcontroller interrupts.
I am having a question.A microcontroller has number of interrupt sources. So when a particular interrupt comes how a microcontroller decides that the interrupt has come from a that particular source.
 
If you look at the Picmicro lit. it explains interrupts, if a certain process or module requires an interrupt, you set a flag that is unique and applies only to that process.
Interrupts are serviced sequentially, if more than one.
In later Pic's there is a low priority or high priority interrupts, at the choice of the process, in this event the high priority will interrupt the low priority if in effect.
M.
 
It depends on the particular microcontroller.

In the PIC10, 12, 16 AND 18 series, for example, there is a flag for each interrupt. When you get an interrupt, you check all of the flags of expected interrupt sources to see which have occurred. There may be more than one.

In the PIC24 and PIC33 series, there is a different interrupt vector for each type of interrupt and you can write a separate handler for each one, or you can check flags with a single interrupt handler as in the ones above.

Bob
 
Top