Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Another C-ish question

2009-03-24 by David VanHorn

I frequently end up using a bunch of timers in a 1mS ISR, that are
decremented to zero by the ISR, and set by some other task.

The code would end up looking like this:

if (0 < Timer1) Timer1--;
if (0 < Timer2) Timer2--;
and so on.

Is there a more efficient way to handle those?
Generally they will be living in SRAM, but I wouldn't rule out them
living in registers for small apps.


-- 
There is no computer problem which cannot be solved by proper
application of a sufficiently large hammer.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.