five_sec_counter = 5000; // This line is in main(); five_sec_counter is a global variable
// Do this in the interrupt
if (five_sec_counter != 0)
{
if (--five_sec_counter == 0)
; // Action when the delay ends. It could be setting a flag which is periodically checked in main()
}
As long as you're not disabling interrupts.If you have a 5 second delay in the main loop does an interrupt still work? Should think it would but not sure. Does anybody know for sure?