0
\$\begingroup\$

I have a one I2C controller with 14 I2C target devices connected on the bus.

I want to clarify the order of things that happen on the I2C bus.

Let say the controller sends an ADDRESS. All the target devices will hear, then target A will respond with ACK since the address matched.

Then the controller will detect that it got an ACK and send some bytes. Let's say the controller sends bytes X, Y, and Z onto I2C bus.

Is it possible, during the sending of bytes X, Y, and Z, that if byte X, Y, or Z matched one of the other target device addresses then that target would respond to it?

For example, byte Y coincidentally matched the target B address, then during the transmit of byte Y, target B also responds with ACK, even though we expect only target A to hear it?

Null
7,81618 gold badges38 silver badges49 bronze badges
asked Feb 16, 2019 at 10:41
\$\endgroup\$
1
  • 1
    \$\begingroup\$ No, because there is also something called 'stop'. The bus is reserved for the transaction unitl a STOP occurs. \$\endgroup\$ Commented Feb 16, 2019 at 10:44

2 Answers 2

2
\$\begingroup\$

To expand on the comment from @Oldfart: all I2C transactions starts with a START condition. This signals the bus target devices to listen for a 7-bit address. Once those seven bits, plus the R/W bit are sent, the targets stop listening for addresses and, unless they saw their address, start ignoring all bytes that go by on the bus.

This continues until the controller sends a STOP condition. At that point, all of the targets wake up and start looking for another START condition.

(There is also a way to stack transactions to a single target, called a repeated START. This happens when a START is sent without a STOP to terminate the previous transaction. This start is followed by an address but only the targets that was already communicating actually listens for its address. This is used to combine reads and writes within a single transaction.)

I should add that START and STOP conditions are signalled on the bus in ways that will never occur during normal data. This way, it is impossible to mistake data for a STOP, assuming the bus is functioning correctly.

tim
9307 silver badges13 bronze badges
answered Feb 16, 2019 at 12:15
\$\endgroup\$
1
\$\begingroup\$

As long as all targets have different addresses, there is no confusion as the address byte is the first byte sent after the start condition.

TonyM
25.1k4 gold badges41 silver badges67 bronze badges
answered Feb 16, 2019 at 21:13
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.