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.

[SOLVED] SPI and I2C communication protocol

Status
Not open for further replies.

gopi the king

Junior Member level 2
Joined
Nov 20, 2012
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Coimbatore, Tamil Nadu, India
Activity points
1,421
hai,

i attend an interview, in that interview they ask

1. maximum how much node can connect to a I2C bus and SPI bus

2. what is the maximum distance we can connect in both I2C and SPI communication protocol

3. what is maximum and minimum speed for both protocol and how they can be configured

answer this question as much as detail. thanks in advance.
 

I2C is a well defined protocol. It's maintained by NXP (previously Philips)
You can find the specs here:

Speeds, number of slaves, etc...

SPI on the other hand isn't a well defined protocol and isn't considered a standard. The number of "slaves" is limited by the number of Chip Select signals distributed by the master. Also, some versions of SPI don't use Chip Select at all, instead they implement data layer arbitration. Therefore, the number of slaves can be unlimited...
The speed (as well as distance) is highly dependent on the physical layer implementation.

Please note that the interviewer may be asking his question with regard to a specific implementation of the MOTOROLA SPI protocol - in this case you may find the specs here:
**broken link removed**
Other (many other) implementations of SPI exist.
 
thank u so much for your information. sure i will go through the specification sheet.

- - - Updated - - -

I2C specification sheet, in a place they mention that 10 cm. i con't understand, exactly what telling . after that they didn't mention anything about distance. can u please explain that ???

they mention 10 cm in ( 60 page number of the specification sheet)

for SPI, in that specification sheet, they didn't mention any thing about maximum distance between transmitter and receiver .... i don't have any idea to answer this question.......help me ....
 

I2C has been defined by Philips when it was a major TV manufacturer. It gained popularity as an interconnect medium for IC devices in TV sets...
Today, you'll rarely see it being used to interconnect devices not on the same PCB board - so the length question becomes somewhat irrelevant.

You have to understand that there isn't an absolute maximum distance above which things are guaranteed not to work.
The maximum distance has less to do with the protocol at question and more with proper engineering practices while designing the PCB.

Today, you also rarely see implementations that come close to the maximum limit for the number of slaves.
The supported communication speeds are well defined in NXP's document.
In general, if you use more slaves and longer distances, the "negative" effects can be mitigated by lowering the value of the pull-up resistors.

In general, SPI is capable of reaching higher speeds than I2C. At very short distances or when using differential line drivers I've seen implementations that clock at above 100MHz.
When the physical layer is implemented with single ended drivers (not differential) at distances <10cm it's safe to assume that anything less then ~30MHz will work properly (given that the interconnecting devices can support such speeds).
 
you cannot use them more than 2 meters. maximum devices in i2c is 128 and for spi, there is no limition, but you have to prepare a pin for each slave device to control it by server. so your limitations are based on hardware not software.
 
you cannot use them more than 2 meters.
Where is that information taken from?
maximum devices in i2c is 128
At the simple (7 bit addressing mode only 112 slaves can be used - not the whole 128...)
A 10 bit addressing mode is also available. This enables the use of more then 1000 slaves.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top