Skip to content
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

superfuous delay #4

Open
nerdralph opened this issue Nov 17, 2020 · 3 comments
Open

superfuous delay #4

nerdralph opened this issue Nov 17, 2020 · 3 comments

Comments

@nerdralph
Copy link
Contributor

Only one delay per clock phase is needed, so the one on line 538 can be deleted.
https://github.com/jasonacox/TM1637TinyDisplay/blob/master/TM1637TinyDisplay.cpp#L538
Keep the delay on line 546.

Also the default of 100us seems excessive. The datasheet v2.4 lists 500kHz for Fmax, which means 1us per clock phase. I'd suggest a default bit delay value of around 5us, which would still leave a large safety margin.

@jasonacox
Copy link
Owner

That makes sense, but when I drop the bitdelay to 5 or 10us, the Arduino Uno is unable to drive the display. When I have more time, I'll investigate.

@nerdralph
Copy link
Contributor Author

nerdralph commented Nov 19, 2020 via email

@jasonacox
Copy link
Owner

I'm impressed! Makes sense. I've seen a few other TM1637 libraries that use aggressive timing that caused stability issues over time for my project on some modules I use. I may have over engineered the delays, but they are stable. I'll revisit when I get time. Thanks for all the feedback and PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants