interrupt priority

hi,

I am having arduino mega 2560 board
As we know, there are 6 interrupts

if more than one interrupt occur at the same time, is there any default priority serving the interrupt??

Is there any possibility to change the priority of the interrupt??

if so, can anyone tell me the code??

There are dozens of interrupts, you are referring to the 6 hardware interrupt pins. The other I/O pins can be configured to generate an interrupt as well. Many other parts of the CPU also generate interrupts e. g. timers, counters, serial comms, EEPROM write circuitry etc.
Priority of the pins is given in the processor data sheet. Priority can not be changed. You need to connect your hardware according to the needs: the button for the ejector seat should have higher priority than the button for the interior lights :smiley:
If more than one interrupt is activated the highest priority interrupt will be serviced first. The others are remembered by means of a flag in the processor and are services in order of priority.

Why do you want to change the priority?

Bear in mind that once one interrupt is being serviced another one has to wait for it (the ISR) to finish regardless of priority.

Not strickly true you can reset the Processor Interrupt flag and the ISR routines can be intererupted..

Not that I am prompoting thids sort of technique its not for the novice..

hi

is there any default interrupt (priority interrupt pin in arduino)???

if there please tell me??

Your question does not make sense. There are two or more external interrupts pins on the Arduino. How many depends on which Arduino you have.

Some pins can be used with pin change interrupts. How many and which ones depend on which Arduino you have.

Various kinds of interrupts have different priorities, as they should have. The clock ticking MUST have higher priority than any other kind of interrupt.

What, exactly, is it you want to do with interrupts? Is the use of interrupts even reasonable?

Why does the priority of the interrupt matter? Why do you (think you) want to change it?

In what way did the previous answer to the same question, by you, not satisfy you?

Please do not cross post, it just enrages people and wastes time.