8051 microcontroller 8051 microcontroller
Forums

Moderators: Ajay Bhargav, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph, ExperimenterUK, DavesGarage, majoka
Author Post
RUSHI D.
Tue Apr 28 2009, 12:13AM

Registered Member #5507
Joined: Wed Jan 16 2008, 04:23AM
Location (Home Town): Mumbai
Posts: 307
hi frnz...!

can u pls list down d differences between SPI and I2C protocols...

regards
rushi d.
Back to top
shyam
Tue Apr 28 2009, 01:50AM


Registered Member #2984
Joined: Mon Aug 06 2007, 02:33PM
Location (Home Town): pune
Posts: 858
I2C =>less no. of pins only one line for data transfer
SPI=>two lines required for data transfer
I2C is slower than SPI.
Back to top
RUSHI D.
Tue Apr 28 2009, 03:14AM

Registered Member #5507
Joined: Wed Jan 16 2008, 04:23AM
Location (Home Town): Mumbai
Posts: 307
thanx shyam...

but i want detailed differences like if we r compairing their speeds den mention d max speeds they can achieve

any more difference...

regards
rushi d.
Back to top
Ajaz
Tue Apr 28 2009, 03:32AM
Registered Member #18005
Joined: Tue Apr 28 2009, 03:13AM
Location (Home Town): Hyderabad
Posts: 1
There are a lot of difference from the protocol point of view. But Hardware wise it same as mentioned by shyam.

1. In I2C lot of s/w manipulation has to be done. where as in SPI programmer need to handle only SS pin if SPI is used between multiple ics.

2. I2C can reach only till 384kbps based on CCLK. Whereas SPI can go till CCLK/4. i.e., if CCLK=12MHz, Then SPI speed is 3MHz.

3. There are atleast 30-40 situation which programmer is suppose to handle in I2C for effective and efficient communication. where as in SPI only SS is suppose to be managed and data is supposed to be placed in SPDAT.

4. In SPI since both the MOSI(Master Out Slave In) and MISO(Master In Slave Out) uses a single buffer care should be taken to transfer the data.

5. I2C can be used in a situation where shrinking of the pcb is more important than speed and SPI is vice-versa

 RUSHI D. like this.
Back to top
Ajay Bhargav
Tue Apr 28 2009, 03:41AM
Rickey's World Admin


Registered Member #1
Joined: Fri Feb 24 2006, 07:56AM
Location (Home Town): Punjab, India
Posts: 12587
I2C can go upto 4Mhz SPI can go upto 70Mhz
 RUSHI D. like this.
Back to top
RUSHI D.
Tue Apr 28 2009, 03:42AM

Registered Member #5507
Joined: Wed Jan 16 2008, 04:23AM
Location (Home Town): Mumbai
Posts: 307
thanx ajaz 4 ur reply

but i did not get 3rd pt..

can u explain..?
Back to top
Ajay Bhargav
Tue Apr 28 2009, 03:57AM
Rickey's World Admin


Registered Member #1
Joined: Fri Feb 24 2006, 07:56AM
Location (Home Town): Punjab, India
Posts: 12587
He mens to say that, incase of I2C programmer has to take care of right sequence of data transfer on bus like address, start, stop, ack, nak etc...
where as in case of SPI just SS (slave select) is to be managed and data read/write is done from SSPDAT register.

these names may vary from controller to controller
Back to top
RUSHI D.
Tue Apr 28 2009, 08:47AM

Registered Member #5507
Joined: Wed Jan 16 2008, 04:23AM
Location (Home Town): Mumbai
Posts: 307
k got it...
thanx ajay
Back to top
DavesGarage
Tue Apr 28 2009, 02:10PM

Registered Member #14254
Joined: Tue Jan 20 2009, 11:14AM
Location (Home Town): Carlsbad, CA. USA
Posts: 668
A very valuable tool to discovering what things mean and what things do is the Google search engine.

If you type into this search engine the phrase "SPI interface", your first website shown is:
http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

This is a pretty good description of the SPI interface, and some of what it can do...

Likewise, if you type in "I2C interface", you get this website:
http://en.wikipedia.org/wiki/I%C2%B2C

Give it a try, and see for yourself...

Hope this helps,
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

© 2010 Rickey's World
Render time: 0.1204 sec, 0.0109 of that for queries. DB queries: 65. Memory Usage: 2,872kB