Electronic – Is it possible to have multiple ISR routines for a single timer in micro controller

interruptsmicrocontrollertimer

I have doubt that micro controller will support multiple interrupt routines for a single timer.

For example, single timer which interrupts at 5ms, 10ms, 1s etc. In my design I am using 3 timers: one timer interrupts every 1ms for some status check, other two at 50ms and 1s.

I am curious to know about why can't I have controller which has more than one ISR and also, instead of interrupts at timer overflow, why can't it interrupt at its period match.

Best Answer

There may be some that have this capability, but most don't. You will need to maintain a count of cycles elapsed and delegate to the appropriate routine from there.