I started using DT's Interrupt Routine.

I have

- a switch
- a led

I now want to count from a given number z (between 7200 seconds and 180 seconds) to zero. While this happens, the led should flash. Say z is at it's beginning then the led's on and off-time equals 800ms. Then this should gradually decrease to 50ms when it's 1 or zero.
At all this time the code should watch for the switch to be pressed. If it is, the counting and flashing should stop. When the switch is pressed again, it should continue counting and flashing.

I tried so much. I tried using a while...wend loop, put the counting in and started the interrupt with the flashing led before. That did not work - it never took z seconds. Then I put the flashing light in the main routine and the counting in the interrupt routine. Still issues.

I guess this has been done before. How would you approach this?

I'd be happy if you shared some code.