So I’ve setup an ISR using Timer 1.
What I can’t seem to get is right is the physical amount of time per count.
I’ve tried all sorts of prescalers, using the CS10,11, and 12 bits.
Those are divisions of the I/O-clk, and i can’t find anywhere for the atmel 168 what that clock is.
I’ve setup CTC, but it still seems that I need to reset TNT1 = 1 and OCR1A = num_max_counts after every ISR loop or the behavior is different
I’m setting my TMR1A = 0x00 and my TMR1B = (1 << CS10) [or 11 or 12 as i play with prescalers]
Any help here or example scripts would be appreciated that show for a given timer setup exactly how much time passes for each count. I’m doing some numerical integration and its vital i get this.
FWIW i’m taking care of the analogRead outside the interrupt, and my main loop() function has no delay statements. I am running a serial connection at 9600 baud.