Just to make sure I know what's going on here, you have this line:
If I'm understanding this correctly, isn't this actually 64 microseconds per tick, thus making 28 ticks 1.792 milliseconds? Check my work.Code:#define TCNT3_TICKS 28 // 62.5us each 24 = 1.5ms ... OCR3A = TCNT3_TICKS; // set timer0 compare match register A ... TCCR3B = (1 << WGM32) | (1 << CS32) | (1 << CS30);
System Clock: 16000000 Hz
TCCR3B = 16000000 / 1024 = 15625 Hz
1 tick / 15625 Hz = 64 microseconds/tick
64 microseconds * 28 ticks = 1.792 milliseconds
Is there an errata or something I'm missing? As you know, I've not addressed timers before, so I want to be sure.
Bookmarks