[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] T/C1 CTC mode strange behavior...

From: George Kalovyrnas
Subject: Re: [avr-gcc-list] T/C1 CTC mode strange behavior...
Date: Fri, 19 Sep 2003 18:00:33 +0300

When the interrupt occurs, the timer rolls over and counts starting from 0
The problem is that you use the Clear On Compare Match (CTC1 flag). If you
clear this flag (on setup)
the counter would continue to count beyond 384.

> Hello everybody...
> I use the big guy (a.k.a. AT90S8535) mC. I'm setting up an ISR for the
> clear on compare match interrupt of the Timer1. I also set the OCR1A
> value to 384 and I launch the timer with initial value zero, and no
> So far, so good...
> When I check the value of the TCNT1 inside from the ISR, it seems that it
> equals to 356 (which is of course < 384). What's going on here???
> Regards,
> --
> John Yannakopoulos.
> PS: My setting is as follows: AVR AT90S8535 mC, avr-gcc in a linux
>     avr-libc, and in-system programming using uisp.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]