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

Sending data without a STOP condition behavior. #35

Open
Koepel opened this issue Jan 30, 2022 · 0 comments
Open

Sending data without a STOP condition behavior. #35

Koepel opened this issue Jan 30, 2022 · 0 comments

Comments

@Koepel
Copy link
Collaborator

Koepel commented Jan 30, 2022

This is not an issue, this is just informative.
There is a difference between the Arduino Wire library (for the Arduino Uno) and the SoftwareWire library when writing data to a Target that does not acknowledge to its I2C address (because it is busy with other things).

The difference came up because of this topic on the Arduino forum: https://forum.arduino.cc/t/wire-library-repeated-start/952211/

Simplified code:

Wire.beginTransmission(0x08);
Wire.write( 0xAA);
Wire.endTransmission( false);  // parameter "false" for no STOP

When the Target does not exist or does not acknowledge to its I2C address, then the Arduino Wire library ignores the parameter and sends a STOP. The SoftwareWire library checks the parameter and does not send a STOP.

The idea is that the Controller can claim the I2C bus until the Target is ready.
On the Arduino forum, the question was if the Controller could not send a STOP condition when the Target is not ready, but send a STOP after the data was successful delivered to the Target. That is not possible with either library.

I don't know who is correct. Changing the behavior could violate the I2C standard.

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