Shashank Chintalagiri wrote:
> I'm trying to get a 2 microsecond pulse with an ATMega16 running at 8
> MHz. When using Timer0, with un-prescaled clock in CTC mode, I'm
> getting somewhat strange results. With OC0=0x10 I'm getting pulses of
> about 7usec, and with OC0=0x04 _also_ I'm getting pulses of about the
> same durations (7 usec). Can anyone tell me what the problem could be?

At 8 MHz, every instruction takes 0.125 usec, that's 16 instructions in
2 usec! Seems like your interrupts occur before the handling of the old
one was completed as it is just not enough time for the processor.

AS



_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to