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

Using boards faster than 30MHz #1

Open
lucien-laborderie opened this issue May 14, 2020 · 1 comment
Open

Using boards faster than 30MHz #1

lucien-laborderie opened this issue May 14, 2020 · 1 comment

Comments

@lucien-laborderie
Copy link

lucien-laborderie commented May 14, 2020

Hello,
I'm currently working with a Teensy 4.0 and a 4051 to read height pushbuttons, and I came across a bug using this library :

When pressing a button, multiple channels read as pressed, however the bug disappears when the sketch is loaded with the 24MHz clock speed.
It seems like the board is too fast for the Mux, which doesn't have the time to switch between inputs. The bug disappeared when adding a 1 millisecond delay in Mux.cpp, in the setChannel function, which seems to confirm this.

I would like to share my sketch without other people having to modify the library, are there any ways to do that ?
Let me know your thoughts on this !

(I'm French so please excuse me for any weird phrasing or mistakes...)

@stechio
Copy link
Owner

stechio commented Jul 3, 2020

Hi Lucien,

merci pour ton rapport.

Despite your successful fix, that alleged lag is worth some investigation: I would prefer a solid, generalized solution (sort of automatic calibration) to an arbitrary delay (1ms fit your case, what about other boards? maybe that's not enough/too much...).

In the meantime, feel free to share your fix forking this repo, or (if it's more practical for you) posting your relevant code snippet directly into this thread, thanks!

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