Discussion in "General help Guidance and Discussion" started by    RUSHI D    Apr 28, 2009.
Tue Apr 28 2009, 12:13 AM
#1
hi frnz...!

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

regards
rushi d.
Tue Apr 28 2009, 01:50 AM
#2
I2C =>less no. of pins only one line for data transfer
SPI=>two lines required for data transfer
I2C is slower than SPI.
Tue Apr 28 2009, 03:14 AM
#3
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.
Tue Apr 28 2009, 03:32 AM
#4
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.
Tue Apr 28 2009, 03:41 AM
#5
I2C can go upto 4Mhz SPI can go upto 70Mhz
 RUSHI D. like this.
Tue Apr 28 2009, 03:42 AM
#6
thanx ajaz 4 ur reply

but i did not get 3rd pt..

can u explain..?
Tue Apr 28 2009, 03:57 AM
#7
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
Tue Apr 28 2009, 08:47 AM
#8
k got it...
thanx ajay
Tue Apr 28 2009, 02:10 PM
#9
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,

Get Social

Information

Powered by e107 Forum System

Conversation

ExperimenterUK
Sat Sep 13 2014, 12:34 PM
jaimin1212,Pimpalkhare Create a thread for your question
jaimin1212
Sat Sep 13 2014, 02:35 AM
i want to make self balancing robot using MPU6050 using atmega8.. please help to get data of gyro and accelerometer from this sensor through atmega8.
Thu Sep 11 2014, 09:00 AM
Sunil Pimpalkhare
Hello sir, I am trying to make Wearfin project https://www.youtube.com/watch?v=iZ6PVBvQf-g so can u help me in teaching how to built the program???
Thu Sep 11 2014, 02:21 AM
hariom panday
plz hlp me in my project
iec.naga
Tue Sep 09 2014, 01:19 AM
spi
Mon Sep 08 2014, 08:14 AM
fameem
water changing in fish tank automatically using microcontoller with timer. send idea to me
dexter_a
Sat Sep 06 2014, 11:09 AM
hello guys
Sat Sep 06 2014, 10:10 AM
munaxa
plx guide me
Sat Sep 06 2014, 10:09 AM
munaxa
hi i want to buy plx guie me
ajay_bhargav
Sat Sep 06 2014, 03:10 AM
@Ben, Its hard to undrstand the context like this. If you can post in forum with some example code we might answer you better.

Downloads

Comments

deepbhadani
Fri Sep 19 2014, 01:08 PM
desaiakshay92
Fri Sep 19 2014, 12:45 AM
Fiddu
Thu Sep 18 2014, 02:28 AM
piku_123
Tue Sep 16 2014, 11:29 AM
qudor
Tue Sep 16 2014, 11:06 AM
sara_seecs
Tue Sep 16 2014, 10:53 AM
akshar
Fri Sep 12 2014, 12:45 PM
iec.naga
Tue Sep 09 2014, 01:09 AM

Online

Guests: 34, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 01:37 AM

Members: 37517
Newest member: deepbhadani
Forum Activity
kirangowle Avatar
Posted By kirangowle
Sat Sep 20 2014, 12:35 AM
Hello All,I want to connect normal speaker (as a s...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed Sep 17 2014, 12:59 AM
I think its important to list out the features of ...
ajay_bhargav Avatar
Posted By ajay_bhargav
Wed Sep 17 2014, 12:45 AM
you need to put a wait condition in ISR till the s...
akshar Avatar
Posted By akshar
Mon Sep 15 2014, 04:41 AM
sir,i used microcontroller 89v51rd2 in circuit. No...
bobparihar Avatar
Posted By bobparihar
Mon Sep 15 2014, 02:24 AM
i am programming interrupt 0 using 8051my task is....
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Sep 13 2014, 12:23 PM
There may not be an exact equivalent .You will hav...
akshar Avatar
Posted By akshar
Sat Sep 13 2014, 03:18 AM
Sir, Good Morning,Thank you for making me a member...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Sep 11 2014, 12:52 AM
which compiler are you using? I suggest XC8 with M...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Sep 11 2014, 12:49 AM
I always prefer Olimex Dev boards when it comes to...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Sep 11 2014, 12:44 AM
master will always lower down the Chip select... s...