What makes SPI faster than I2C

I know the basic relationship between I2C and SPI. Because both are synchronous protocols. I wanted to know what makes SPI faster than I2C. If I am not mistaken, using I2C, we can use 400 Kbps, while in SPI we can also reach 10 Mbps. Due to hardware change? This question was asked to me in an interview. Please make me right if I am wrong.

+8
c embedded spi i2c
source share
3 answers

I2C is quite involved, supporting several masters on the bus. This causes significant overhead in the bus protocol, ACK for each byte, and deliberate delays for arbitration of bus access. The maximum bus frequency of 100 kHz in the original specification is also set, 400 kHz, today, additional high-speed modes of 10 kHz and 3.4 MHz are high-frequency, the 2012 specification defines an ultrafast 5 MHz mode.

SPI is much simpler, a single master without a bus protocol is beyond the scope of the chip choice and does not set the maximum bus frequency. If the distances are short, you can go as fast as you dare. Pretty quickly on the interconnect between the chips, located at a distance of less than an inch.

+9
source share

There is an important hardware difference that limits speed on I2C.

SPI: all lines are controlled by the transmitter, both high and low. This minimizes the time required to change the state of the conductor.

I2C: all lines have an open collector, which means that the transmitter only works on the line. When the transmitter releases the line, a resistor connected to Vcc (supply voltage) pulls the light high. However, due to the capacitance of the wire and its components, the wire travels relatively high voltage relatively slowly. Because of this, the clock frequency must be reduced so that the time for the lines is β€œdrift”.

+8
source share
Speed

depends on what type of board you use and how your hardware logic is implemented. There are certain advantages and disadvantages to using one over the other. The choice of which type of bus to use depends on what type of communication you need between the various peripheral devices that you want to connect using them. http://quick2wire.com/articles/i2c-and-spi/

0
source share

All Articles