Interrupt execution method

Hello again :slight_smile:

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 :slight_smile:

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.

That's good to know.
Thanks.

hey use this link its very usefull for using interrupt.