Maker Pro
Maker Pro

Microcontroller interrupt

Amit kumar

Jan 6, 2016
1
Joined
Jan 6, 2016
Messages
1
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.
 

Minder

Apr 24, 2015
3,274
Joined
Apr 24, 2015
Messages
3,274
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.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
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