[Top][All Lists]

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

[avr-gcc-list] Timer0 problem on AVR butterfly

From: Dave
Subject: [avr-gcc-list] Timer0 problem on AVR butterfly
Date: Fri, 10 Feb 2006 15:28:22 -0800 (PST)

Hello All,

I'm having trouble with timer0 on my AVR butterfly.
I'm trying to start the timer right before a routine
and read it once the routine is done. I'm hoping to
print the counted ticks on the LCD, but haven't had
luck at all. The following is my code:

TCCR0A = 1; // system clock frequency will be used
TCNT0 = 0; // initial value for timer
t = TCNT0;

LCD_putc(0, t); // write t on digit 0

Is there something wrong with my code? Are there any
examples you can direct me to? Thank you.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

reply via email to

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