New answers tagged

0

My assumption is that the senders on the bus don't have the same bit-timing as my device. But even if this is the case, the maximum errors detected should be 255, right? Acknowledge timeout does not cause bus-off.


3

There isn't anything in the i2c protocol that solves this problem. You can make it work, but you will use some software to do it. Since i2c was designed for hardware communication, usually involving fixed size registers, nothing was provided to handle variable-length data. I found this out myself and have had to solve the same problem you are considering. ...


10

But I wonder how does this handshaking takes place between a Master and Slave when the Slave is sender and the Master is receiver and only the Slave (sender) knows when there is no more data to send to the receiver? This isn't supposed to happen. i2c is a very defined protocol and each slave device should be known to each master. Typically, the master ...


2

I'm going to digest your entire post little by little... Let us say a Slave or Master is sending multiple bytes to the receiver on I2C bus and the number of bytes is not defined before hand. But it should be defined. If random information was being sent or received, you'll never be able to interpret it. So then how will the sender tell the receiver ...


4

Let us say a Slave or Master is sending multiple bytes to the receiver on I2C bus and the number of bytes is not defined before hand. So then how will the sender tell the receiver that it has no more data to send? If Master is the sender, then he knows how many bytes have to be sent. Master will signal the end of his data transfer by sending a STOP ...


4

Those are the two options. If slave receiver does not accept more data it can NAK the byte, but master is still responsible for sending the stop condition. For a slave transmitter, it can't signal anything to stop, it must be known beforehand, or it could be encoded in the data, e.g. text string is terminated with a zero so slave can transmit zeroes until ...


Top 50 recent answers are included