can't reproduce documented overflow behavior of _delay_ms()

2020-01-23 Thread Britton Kerin
On a 16 MHz Arduino Mega 256, this code: __builtin_avr_delay_cycles (100.0); // Compiles, so we apparently have it debug_led_on (); _delay_ms (29.0); debug_led_off (); assert (0); leaves the debug led on for about 269 s. Same for larger arguments to _delay_ms (e.g. 35.0). Th

Re: what are the correct high/low maximums for _delay_ms()/_delay_us()

2020-01-23 Thread Britton Kerin
On Thu, Jan 23, 2020 at 1:25 PM Joerg Wunsch wrote: > > As Britton Kerin wrote: > > > I guess the high-res maximums are 262.14 ms / F_CPU in MH for > > _delay_ms() and 768 us / F_CPU in MHz for _dalay_us() regardless of > > the availability of __builtin_avr_delay_cycles(), but > > the way the _del

Re: what are the correct high/low maximums for _delay_ms()/_delay_us()

2020-01-23 Thread Joerg Wunsch
As Britton Kerin wrote: > I guess the high-res maximums are 262.14 ms / F_CPU in MH for > _delay_ms() and 768 us / F_CPU in MHz for _dalay_us() regardless of > the availability of __builtin_avr_delay_cycles(), but > the way the _delay_ms() and _delay_us() descriptions are written this > is not ent

what are the correct high/low maximums for _delay_ms()/_delay_us()

2020-01-23 Thread Britton Kerin
I guess the high-res maximums are 262.14 ms / F_CPU in MH for _delay_ms() and 768 us / F_CPU in MHz for _dalay_us() regardless of the availability of __builtin_avr_delay_cycles(), but the way the _delay_ms() and _delay_us() descriptions are written this is not entirely clear. Am I correct? If so,