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

USI I2C Slave @ 8MHz talking to Arduino Wire Library - Protocol Error #2

Open
jmount1992 opened this issue Apr 4, 2018 · 0 comments

Comments

@jmount1992
Copy link

Thanks for the USI I2C library, great help. However, I found when in USI I2C Slave mode that if your Microcontroller is running at 8MHz or lower you will need to reduce the Arduino's Wire Library default (100kHz) I2C SCL frequency. Else the timing in the ACK section can be a bit dicey.

To change the Arduino's Wire Library default I2C SCL frequency you need to call Wire.setClock(<SCL_FREQ>) where SCL_FREQ is anywhere between 31000L to 400000L (31kHz to 400kHz). See begin section here .

This was an extremely annoying bug to hunt down.

Hope this makes sense and helps others.

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

1 participant