-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility of delayMicroseconds #30
Comments
Would be great if would like to look into it! Compatibility is always nice, but let's hope it doesn't affect the "low number" microsecond times.
I'm always open to adding new and clock frequencies to the core! Provide a PR, and I'll test them 👍 |
It should work fine, but I'll have to put delayMicroseconds on the back burner for a while.
Cool, see PR #31! |
I still don't see me having time for extended work on Right now I'm estimating 180 cycles of overhead to remove; please feel free to adjust the source. Larger values make delay return sooner and vice versa. The only downside is that |
Arduino specifies a maximum input value to delayMicroseconds of16383. For several of the functions here, the limit is lower since we multiply by numbers greater than 4 (such as 4.125, 5, 6). These roll over, which produces spurious delays.
It would be relatively easy to fix this by adding NOPs to the busy loop and calling it less times, and I wouldn't mind looking into it. It would mean another test cycle for most of the higher clock frequencies though.
I also have three more exact frequencies, namely 16.5 MHz (favorite for overclocking, and contrary to 16 Mhz millis never jumps by 2), 10 MHz (wouldn't have done it but there were comments that needed fixing) and 6 MHz (there is currently a large gap between 7.37 and 4 MHz). Might do this at the same time so we only have to test everything once.
The text was updated successfully, but these errors were encountered: