Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SPI VS I2C Bus difference

Status
Not open for further replies.

Bjtpower

Full Member level 5
Joined
Dec 24, 2015
Messages
297
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
3,893
Hello all

I am confused in the fundamental of SPI and I2C Bus communications.

From my understanding

i2c is open drain so that may devices can be connected by the pull up resistors.

But SPI is not a Open drain but it can drive also many devices.
Only thing is that Pin required to map the N slave require N Controllers pins (MOSI AND MISO WILL BE COMMON)

Then what is another difference which makes i2c and spi bus.

Confused

Marx
 

The main difference is on the protocol level. SPI transmits bytes in both directions simultaneously (full duplex), I2C involves a specific scheme to transmit addresses and set the data direction.

Most I2C devices have maximum speed of 400 kHz, SPI can achieve higher speed.
 

The main difference between them is speed I2C is practically limited to 400Khz where as SPI can go up to beyond 25Mhz, also you need fewer wires with I2C.
 

I2C has a few versions. The common version uses open drain and allows several features that SPI lacks.

I2C has devices that know their address. 128 devices or more can be on a bus, in theory at least. SPI requires an chip select per device.
I2C allows multi-master where two ICs can start communications. SPI only allows one master for the bus.
I2C allows pulse-stretching to allow a slave device to denote that the device is still busy. SPI requires a protocol be implemented in software if this can occur.

There is a high-performance I2C mode which replaces the open drain with a bidirectional buffer. This prevents pulse stretching and multi master, IIRC.

SPI is more for high performance. There is even a QSPI standard to allow 100mbps as 4 data lines running at 25MHz.
 
Hi,

The same question is coming up from time to time.


If the link doesn't work...
Use the "advanced search" on "SPI I2C" with the option "..in titles only"

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top