[quote:8d1edba9f7="i.dobson"]Saving all the registers costs approx. 30 machine code commands. Depending on your clock speed the delay caused, may be just too much for your measurement.[/quote:8d1edba9f7]
At clock speeds of 16 MHz and 200 Hz measured frequency, the uC is bored to death, saving the registers is no issue there. NOSAVE however is no option, if the user doesn't know exactly what he does.
But, the shown code has tons of problems, tcnt1 is never reset, interrupt requests are steadily produced, executed as soon interrupts are globally re-enabled, a.s.o.
↧