BEGINNERS: Interrupts - Why, When and How

The very name ISR (Interrupt Service Routine) says that there is something to serve. Initiation of smoke/fire in an industry is an infrequent case; but, once it is initiated, the service has to be rendered on urgent basis, and the actions must be taken in the ISR. Therefore, returning to the MLP just by raising a flag in the ISR undermines the very good purpose of the interrupt idea.

It MUST be complete before any other interrupt occurs, or you'll start an unenviable journey down the stack & crash road.

The ISR will take as much time as it requires to finish the assigned tasks. No other interrupt will be taken care of by the processor until the present one is finished. In the Arduino Platform, the interrupt structure is disabled when the processor arrives at the ISR. The interrupt structure is automatically enabled when the control returns to MLP (Main Line Program).