New answers tagged

3

I don’t think it would be beneficial to twist the SCL and SDA wires together as this would increase crosstalk between them. Nor do I think it’s best to twist them together with GND, as this increases capacitance. Consider an HDMI cable for example. There is an I2C bus embedded on it (DDC) along with ground and 5V. These are run near each other, but not ...


4

A twisted pair would not hurt, or particularly help I2C across a short cable run. You may have issues getting things to work if you're trying for 400kHz+ speeds, but standard 100kHz I2C won't be horribly attenuated by a .5m of cable. However, there are very good reasons why you should not use I2C in any other application besides connecting two devices on the ...


5

SPI can be faster as it is push-pulled lines, in the contrary to I2C that uses pullup resistors. SPI can be daisy-chained, but usually it requires the slave device to be of the same type. SPI will need a CS line for each device, while I2C works by addressing. The SPI software stack is usually simpler than I2C. I2C allows to have many devices on the same ...


2

SPI for bandwidth and full-duplex. Daisy chaining for SPI just makes it easier to grab data from a lot of SPI devices, but only for devices that support it and only for identical devices since their daisy chaining is only made to work with others of their kind. I2C for addressing (you can handle more devices without a chip select line for every device and ...


0

The cable length used is not sufficient to have to apply the line theory. It's just an extra capacity added and it will influence the rise and fall times of the signals. In other words and accordingly, the speed of the signals will have to decrease. Twisted or not don't really benefit. Only EMI are concerned. This is not the case when you use Ethernet cables,...


0

The clock speed could be an issue (or actually the total delay induced by the bus components). You could try to use a lower I2C frequency. Check e.g. https://gist.github.com/ribasco/c22ab6b791e681800df47dd0a46c7c3a for how-to set the I2C clock frequency - its for RPi 2 and 3 but it mostlikely works for version 4 too.


2

SPI and I2C aren't really the same at all, except at a trivial level in that they're both serial and use a separate clock to transfer one bit per clock (and that's not even truly the case with SPI, which can be wider than 1 bit: 2, 4 and 8-bit wide versions are available.) Beyond this, how are I2C and SPI different? As a protocol, I2C requires more ...


0

Beyond the physical layer, you have very low level kernel systems on the CPU level that you would need to write complex driver for, perhaps even rewrite the BIOS. The I2C bus is used for some specific low-level systems and is often not implemented on consumer products, only on high-end motherboard. Since the I2C bus is open drain, can I just tie them all ...


1

The RJ45 cable might be the culprit. In the old days, if you connect the device to the device directly, it required a crossed RJ45 cable. This leads to having crossed, and normal RJ45 and it's sometimes difficult to know which you actually are using. On top of that, there are different pinout standards for those cables, and additionally, you have different ...


1

Since everything is working fine when you connect the green line, it must be a 'hardware error' caused by long distance cable. If you have not checked the I2C line with an oscilloscope yet, you can only assume that your signals reach their destination safe (aka without any signal degradation). So yes I dont trust the 'QwiicBus - EndPoint' just like that. I ...


3

The 2x 10K parallel resistors on each I2C bus line is the same as having a 5K pull-up on each. The 5K resistances are pull-ups to 1.8 V. So the I2C drivers will need to be able to sink 360 uA, which IC pin drivers for I2C chips will. Having separate pull-ups is good if your two boards are ever disconnected from each other. The separate resistors will pull ...


2

Here is a related answer: https://stackoverflow.com/questions/60191137/i2cdetect-does-not-recognize-vl6180x-sensors-behind-tca9548a-i2c-multiplexer Basically, there is some driver magic involved in getting i2cdetect to "see" devices behind a multiplexer. It's possible that the differential i2c somehow breaks that magic. The standard way to use the ...


2

The I2C uses 4.7K pull-up resistors for 5v voltage. Lower that to 1.5kΩ or even less. It will give you much better noise immunity.


5

Both Cables must be at least twisted pairs. Motor cable ought to be shielded. Ground current must not be shared on the same wire. Motor cable must at right angles to I2C. Lower pullup R to 1k if not already. Show block diagram of all physical connections and earth ground. add grounds if unsure, incl. earth gnd Report all changes in question with ...


0

I just using Master Wire.h then compare the waveform then stretching and it work :) :) Only 2us difference { uint8_t byte = 0; uint8_t bit = 0; _delay_us(12); <---- From 10 to 12us SET_SDA_IN(); <--- Already release the SDA so Slave can pull down the SDA line for (bit = 0; bit < 8; bit++) { byte <<= 1; ...


2

I had the same problem as you, I was using TCA9555 IO expander for driving LCD ST7565 & button... I set low RST,A0,RW,E before init and it got solved.


0

I2C is a buss with data addresses. SPI is a buss with physical addresses. I2C as mentioned above is not easy or simple without a hardware controller. For that matter SPI is not simple either without a hardware controller in the context of this discussion. Mainly because it's so fast timing can be difficult to anticipate and each device has it's own protocol ...


Top 50 recent answers are included