Go Down

Topic: Interrupt execution method (Read 426 times) previous topic - next topic

vikramnayak

Hello again :)

I using a 328p to read two sensor inputs connected to interrupts. The controller takes in about 6000 pulses a second, roughly 6Hz on both interrupts. The interrupt triggers a flag value, but they don't trigger the same value, for ex if sense1() and sense2() are the functions, they don't change the flag x together, it's x and y separately.
My question is, there are times when both inputs are fired together, or are rendered HIGH together.
Do they still successfully run the function, or will some kind of conflict arise since two interrupts are fired together ?

Thanks :)

dc42

If two interrupts are pending at the same time, the mcu will service the one with highest priority. When that ISR has completed, if the other interrupt is still pending (that is, the reason for the interrupt hasn't gone away), then it will service the other one. So both will get serviced.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

vikramnayak

That's good to know.
Thanks.

dut

hey use this link its very usefull for using interrupt.
http://www.gammon.com.au/forum/?id=11488
dut eden rockes

Go Up