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

Add support for bitrate #3

Open
chevdor opened this issue Jun 13, 2017 · 2 comments
Open

Add support for bitrate #3

chevdor opened this issue Jun 13, 2017 · 2 comments

Comments

@chevdor
Copy link

chevdor commented Jun 13, 2017

The hardware we talk about here does not really need a high bitrate and 50k (default) is usually enough. However, when used in combination with a display for instance, using the another bitrate becomes interesting. Currently, the bitrate seem to be unexposed/ignored and the default value of 50k is always taken.

I would be good to be able to pass the bitrate as well as in:
var matrix = new Matrix8x8(I2C1, { scl: 5, sda: 4, address: 0x77, brightness: 15, bitrate: 100e3 })

@chalkers
Copy link
Member

Hi @chevdor

Can you explain what does the bitrate does? And show an example or two?

@chevdor
Copy link
Author

chevdor commented Jun 27, 2017

@chalkers the bitrate defines how fast the data is transferred.
A higher bitrate allows ultimately a higher refresh rate. Higher rates are of course more tricky to reach depending on the electronic you have. On the other hand, the ability to LOWER the bitrate can also be nice for challenging environment where it matters more to get the data than how fast it comes.

Raising up the bitrate, I could reach a 'paint' in ~71ms on a SH1106. That´s around 14 fps.

I gave an example with the Matrix8x8 which may not be the best. The issue currently with i2c is that your program will HANG if you don´t get and acknowledge. So lowering the bitrate may help in some case as well.

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