[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
myRoutine();
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
http://mail.yahoo.com
- [avr-gcc-list] Timer0 problem on AVR butterfly,
Dave <=