Hello, If I disable the C51 INT0 just after entering the INT0 interrupt service routine and enable it just before exiting the ISR, would I be doing the right thing? Is this recommended so that interrupts are not missed out? warm regards, Sundeep M S
Until you return from your INT0 interrupt service routine, it won't be interrupted by another INT0 (or same priority) interrupt, so no need to disable it. If another one interrupt occurs while you are in the interrupt service routine, it will be captured into E0 flag, and your interrupt service routine will be called again immediately after return. On the other hand, if your interrupt routine takes too much time, you WILL miss exact number of INT0 state changes that occur until return. Regards, --PA