How many ACKs to expect from I2C.writeto()? #17101
Replies: 1 comment
-
In case anyone else comes looking for an answer, it seems the acknowledgement of the address is not counted in the number of ACKs returned.
So if the device datasheet shows something like this:
Only the ACK after receipt of the Opcode is counted in the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking at the I2C.writeto() method and I see it returns the number of ACKs received. So out of curiosity, I put some print statements in my code.
When I run it, I see this:
However, in the device datasheet, I see this example exchange:
It seems like there should be two ACKs: one to acknowledge the receipt of the address, and another to acknowledge the receipt of the command. At least that's the way the datasheet makes it look. But I only see one ACK returned from I2C.writeto().
Is the ACK for the address implied and not counted in the total?
I'm thinking that a check of the number of ACKs received would be useful in determining if the device indeed got the command. But I'm left wondering how many ACKs there should be.
Beta Was this translation helpful? Give feedback.
All reactions