PIC16f877A ,wh hapend two interrupt at the same time?

Status
Not open for further replies.

selva murugesan

Advanced Member level 4
Joined
Mar 30, 2012
Messages
116
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Visit site
Activity points
2,007
hello

i got confused about interrupt happening in microcontroller. what would happen ,when interrupt occurs while interrupt executing?
frequency and time relationship of microntroller?
 

A second, third, and so interrupt will be triggered (limited by stack, around 4 or 8) and the previously executing interrupt will halt until you return from the newly triggered one.

You should read from the link by themask or the datasheets for more details but basically there's code to prevent all interrupts from triggering during an interrupt, or any other time sensitive code. Search for GIE, Global Interrupt Enable.
Also theres "standard" code to save the state of STATUS and W register (on each interrupt so another interrupt does not mess with you state, also called "context").

Hope this help as a reference to the link above.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…