4 ms·
To be pedantic _delay_ms() takes a double not an int. In AVR_GCC versions before __builtin_avr_delay_cycles was available, in the compiler, if compiled with t
by rpaddock 3y ago
To be pedantic _delay_ms() takes a double not an int.
In AVR_GCC versions before __builtin_avr_delay_cycles was available, in the compiler, if compiled with the Small Model (-Os) passing an int instead of a float ie: _dealy_ms(500.0f) would produce unexpected delays. This was a frequent source of bug reports in the early days of avr-libc. Those older versions relied on odd compile time coercions, and got confused if not passed a float.
I just wanted to mention that in case anyone has old versions of GCC laying around.