AVR Libc Home Page | ![]() |
AVR Libc Development Pages | |||
Main Page | User Manual | Library Reference | FAQ | Alphabetical Index | Example Projects |
#define F_CPU 1000000UL // 1 MHz //#define F_CPU 14.7456E6 #include <util/delay.h>
#define
statement should be used.
Functions | |
void | _delay_us (double __us) |
void | _delay_ms (double __ms) |
void _delay_ms | ( | double | __ms | ) |
Perform a delay of __ms
milliseconds, using _delay_loop_2().
The macro F_CPU is supposed to be defined to a constant defining the CPU clock frequency (in Hertz).
The maximal possible delay is 262.14 ms / F_CPU in MHz.
void _delay_us | ( | double | __us | ) |
Perform a delay of __us
microseconds, using _delay_loop_1().
The macro F_CPU is supposed to be defined to a constant defining the CPU clock frequency (in Hertz).
The maximal possible delay is 768 us / F_CPU in MHz.