# Things to do with ISR

I have an ISR that increments a counter every 5ms if the switch is pressed.

If the counter becomes 200 then do Reset. I plan to add more functions to be called from the counter value.

After a few encounters with ISRs, I have got the expert advice from this site to keep ISR short.

Then how should I keep the ISR properly or near to perfection.

I trust calling ISR that do long routines is a bad architecture. But then how can I call long routines from the value of flags in ISR if it is kept in another source files other than main.c?

-