Rules | Recent posts | topic RSS | Search | Register  | Log in

Interrupt handling at the same time 8051

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers
Author Message
gandalf_be



Joined: 12 Jun 2003
Posts: 15


Post19 Sep 2003 18:28   Interrupt handling at the same time 8051

Hello ,

Perhaps a stupid question but i wonder if there are 8051 microcontrollers available that can handle two external interrupts, with the same priority ,at the same time ?

This means that if two external interrupts are triggered , the software can handle two different ISRs at the same time .

Regards,

Gandalf
Back to top
svicent



Joined: 11 Jul 2001
Posts: 405
Helped: 20


Post19 Sep 2003 18:40   Re: Interrupt handling at the same time 8051

Not, when two request of the same priority are received simultaneously, an internal polling sequence determines which request is serviced. ISR execution proceeds until the RETI instruction is encountered. Execution continues from where the program was interrupted, then after at least one other instruction (after RETI) has been executed, the second interrupt can be serviced.
Back to top
gandalf_be



Joined: 12 Jun 2003
Posts: 15


Post19 Sep 2003 19:01   Re: Interrupt handling at the same time 8051

Hello ,

I know that is the case with the standard microcontrollers but i m wondering if it is possible with more advanced microcontrollers/microprocessors.

I can imagine that in a real time application you can come in situations where two interrupts must be handeld at the same time.


Gandalf
Back to top
eltonjohn



Joined: 22 Feb 2002
Posts: 1558
Helped: 22


Post19 Sep 2003 21:38   Re: Interrupt handling at the same time 8051

Is hard to follow you ..

Microprocessors are sequential machines .. only very advanced architectectures execute difrentent instructions in the same cycle. but that
is only possible with compiler prediction and data analisis..Even those
machines respond to interrupts in a single thread

The way to treat multiples events ocurring at the same time is not
in the INTERRUPT ROUTINE .. .But in a function that can be called
by a message sent by the service interrupt ..
So is equivalent to always affect a different priority to a different
source of interrupt .. and if both interrupts are called at the same time ..The one with the higher priority is processed first .So what we want to do is just send a notice to some bigger routine and get out that interrupt
service routine .Then we service the other interrupt and send another message to some arbitrer routine that will determine who needs atention first ..

IF REALLY you need attention at the same time to two tasks ..I THINK that
you MEAN TWO CPUS .. THATS THE KIND OF PARALLELISM that you WANT!

PS : Don't SMOKE TOO MUCH that STUFF!
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap