System clock = 1 MHz
Using a prescaler value of 32 and a count register value of 31 would give 992 timer overflows per second, or 1 overflow every 992 uSec. Then if you either waste or do something else for 7 cycles you'll have 999.
Application note AVR130 explains this pretty well.
REB
arhodes19044 wrote:
I agree that it is a major pain in the neck having powers of 2 as the prescaler, but NOT powers of 2 as the usual crystal freq. In my case I needed a 1 millisecond clock. So, I used a 16 bit clock for my 16MHz crystal. (8 bits would not do). I uses CTC mode with a prescaler of zero, and triggered the interrupt after 16,000 clock cycles. (16e6/16e3 = 1e3). This worked out fine.