I'm using avr-gcc from the Debian Linux repository. I have noticed that the program on a real breadboard is 1000 times slower than it should be.
For example, with the code
#define F_CPU 8000
#include <util/delay.h>
_delay_ms(1000);
the delay is really about a second. However, F_CPU
should be 8000000.
And with F_CPU
8000000, you have to expect 1000 seconds!
What am I doing wrong? How do I achieve the expected speed of execution?