"Robert L Cochran" wrote: > [EMAIL PROTECTED] butterfly]$ avr-gcc -I. -I/usr/avr/include -std=c99 -g > -mmcu=atmega169 -Os -fpack-struct -fshort-enums -funsigned-bitfields > -funsigned-char -Wall -Wstrict-prototypes -Wa,-ahlms=blinky.lst -c > blinky.c -o blinky.o > In file included from blinky.c:4: > /usr/lib/gcc/avr/4.1.2/../../../../avr/include/util/delay.h:84:3: > warning: #warning "F_CPU not defined for <util/delay.h>" > > What values for F_CPU do I need?
The Butterfly is setup to run on the internal oscillator, which can run up to 8MHz (depends upon the voltage supplied to the part), and the way it is shipped, it is configured with the clock prescale set to 8, so that results in a 1MHz clock. If you have not modified the CKSEL and CKDIV8 fuses, and you do not mess with the clock prescaler register(s) in your code, then that is what you are working with, and you need to set F_CPU to 1000000 (or 1MHz). Look at the section on system clock source in the datasheet for the ATmega169 where it describes all of the fuse and register settings that impact the part. -Preston _______________________________________________ AVR-chat mailing list AVR-chat@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-chat