-
Notifications
You must be signed in to change notification settings - Fork 20
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
Comments
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. |
Earlier today I hooked my scope up and found the rise time to 3V is nearly
10us with my module. It has 10k pullups. The datasheet example circuit
has 100pF caps, but the module must be using 1n.
I have been modifying my TM1638 library for the 1637. I've avoided using
delays by polling the clk and dio lines when they get pulled high.
…On Thu, Nov 19, 2020, 00:55 Jason Cox ***@***.***> wrote:
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.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKNZ6XVN7DGQGTSFKN5CCDSQSQL3ANCNFSM4TYSZCCQ>
.
|
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! |
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.
The text was updated successfully, but these errors were encountered: