i am learning atmega 8 microcontroller.
i am having a problem in using the delay function
i have seen some programs
some define # define F_CPU 1000000Ul
i want to ask which clock frequency they define, external clock or internal clock.
also what if i do not define it in my program, which clock will it be using internal clock or external clock.
maybe it's defined at the makefile... (at winavr you have a makefile generator which comes with a 8MHz F_CPU defined value)... but I think it's not used in very simple programs... just when you add the #include <utils/delay.h> or maybe the baudrate calculator... If you don't use any of them... I think the program doesn't take in account the F_CPU constant (but i'm not sure... for me, it's always defined at the makefile)
Also! if you are plannig to make a huge program with many C files... it's better to have just one F_CPU define... again.. at the makefile... so it doesn't mess with multiple F_CPU values at individual files...