Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

New answers tagged

0

What happens is that then rising edges are slightly slower. It might not be a serious issue, but it does make difference depending on this being one-off hobby project or official product that goes through compliance testing which might fail. Sometimes specifications define something because otherwise there would be too varying implementations that are not ...


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. ...


1

As I read the datasheet, you get a total of 8 serial ports that you can configure any way you like.


9

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 ...


3

The I2C interface is a de facto standard that is now controlled by NXP. Search for the NXP "I2C-bus specification and user manual", UM10204. The standard specifies a data bit setup time before the rising edge of the clock and a data hold time after the falling edge of the clock, so a receiver could potentially use either edge of the clock, or could use a ...


2

Data transfer- The state of SDA(high or low) can change only when SCL is low. This means SDA must be stable when SCL high. Sampling is done while the SCL going 0 to 1 state. Changing SDA when SCL is low provides some timing margin for accurate sampling. As for I2C itself is a mutual interface standard. Both sides(TX and RX) can control the SDA line in ...


1

Overall I will have single Slave device (an I2C MCU) and no Master. I want to see if I can make to to send data without any master giving it a command or ACK/NACK or START/STOP signal. That's not possible for an I2C Slave. Any device which did that, wouldn't be I2C-compliant. From this comment: I want to do this only for my test setup. I will see the ...


1

It seems your asking if you MCU can (also) be a Master on the I2C bus. Of course, there can be multiple Master devices on the I2C bus. But then your MCU needs to be paying attention to the bus, so it does not try to send while another Master is sending


1

Fortunately or unfortunately, it's up to you to come up with a protocol for this scenario as you control both sides. Like you say, the slave can only respond to transfers initiated by the master. Your master then needs to poll the slave (ask for data on a recurring schedule), unless you have another way for the slave to communicate when data is ready. (The ...


Top 50 recent answers are included