[sdiy] arduino timing

Olivier Gillet ol.gillet at gmail.com
Tue Mar 15 11:32:53 CET 2011


> If you can get away with counts of 0xFFFF or less, you can rely entirely on
> a timer. If you need longer delays and need to decrement a variable on every
> counter interrupt 1) you must declare that variable as volatile and 2) keep
> a close eye on the order in which you do things in the ISR. Conditional
> statements can take different times to execute, depending on the condition.

In the event you end up doing this, you'll have to ditch the arduino
Serial library, because it is blocking, so you will spend way too much
in the interrupt handler (an interrupt handler must return quick
enough not to overlap with the next call).



More information about the Synth-diy mailing list