How to avoid interrupt priority

Hi, I'm using two interrupts (interrupt 0, interrupt 1), interrupt 0 handler is getting executed bcoz of its first priority while interrupt 1 is not triggered.
Pls give me a solution so that both the interrupt tasks works simultaneously or with micro seconds delay.
THANKS .

Pls give me a solution so that both the interrupt tasks works simultaneously

That is not possible.

or with micro seconds delay

If both interrupts are triggered at the same time the one with top priority will go first. When it finishes the second one will run. You don't have to do anything special to make this happen, it happens automatically.

That is not possible.

Any solution. Actually I’m working with optical encoders.
So i need a solution so that both motors starts simultaneously and count the rotations at same time.

Feel free to clue us in - you know, with details and stuff.

We're not psychic.

Tanvesh111:
That is not possible.

Any solution. Actually I'm working with optical encoders.

Then if you think you need both interrupt service routines to work at the same time then your project is stuffed and so go and think of something else.

So i need a solution so that both motors starts simultaneously and count the rotations at same time.

But they don't need to work at the same time, they need to both run in the time between pulses from your encoder.

So i need a solution so that both motors starts simultaneously and count the rotations at same time.

or with micro seconds delay.

Can you please explain more about the motor synchronization you need? What are the motors doing and at what speed?

Maybe use the Encoder library? Maybe start with its "TwoKnobs" example...

It sound like you have too much code in your interrupt handlers or you are getting another Int0 interrupt before the Int0 handler returns. If the interrupt rate is in the millions per second you may need faster hardware. They do make quadrature counter chips.