Difference between I2c and SPI

Differences between SPI and I2C:

SPI supports full duplex communication with higher throughput than I2C. It is not limited to 8-bit words so you can send any message sizes with arbitrary content and purpose. The SPI interface does not require pull-up resistors, which translates to lower power consumption. However, I2C is simpler by having fewer lines which means fewer pins are required to interface to an IC. When communicating with more than one slave, I2C has the advantage of in-band addressing as opposed to have a chip select line for each slave. I2C also supports slave acknowledgment which means that you can be absolutely sure that you’re actually communicating with something. With SPI, a master can be sending data to nothing at all and have no way to know that. In general SPI is better suited for applications that deal with longer data streams and not just words like address locations. Mostly longer data streams exist in applications where you’re working with a digital signal processor or analog-to digital converter. For example, SPI would be perfect for playing back some audio stored in an eeprom and played through a digital to analog converter DAC. Moreover, since SPI can support significantly higher data rates comparing to I2C, mostly due to its duplex capability, it is far more suited for higher speed applications reaching tens of megahertz. And since there is no device addressing involved in SPI the protocol is a lot harder to use in multiple slave systems. This means when dealing with more than one node, generally I2C is the way to go.
SPI interface:

Difference between I2c and SPI

Differences between SPI and I2C:

SPI supports full duplex communication with higher throughput than I2C. It is not limited to 8-bit words so you can send any message sizes with arbitrary content and purpose. The SPI interface does not require pull-up resistors, which translates to lower power consumption. However, I2C is simpler by having fewer lines which means fewer pins are required to interface to an IC. When communicating with more than one slave, I2C has the advantage of in-band addressing as opposed to have a chip select line for each slave. I2C also supports slave acknowledgment which means that you can be absolutely sure that you’re actually communicating with something. With SPI, a master can be sending data to nothing at all and have no way to know that. In general SPI is better suited for applications that deal with longer data streams and not just words like address locations. Mostly longer data streams exist in applications where you’re working with a digital signal processor or analog-to digital converter. For example, SPI would be perfect for playing back some audio stored in an eeprom and played through a digital to analog converter DAC. Moreover, since SPI can support significantly higher data rates comparing to I2C, mostly due to its duplex capability, it is far more suited for higher speed applications reaching tens of megahertz. And since there is no device addressing involved in SPI the protocol is a lot harder to use in multiple slave systems. This means when dealing with more than one node, generally I2C is the way to go.
SPI interface:

RTC (ds1307) Interface for PIC 16f877A

I have tested a time operated switch with RTC 1307 and PIC 16f877A. You can replace the LED with a relay. If you dont have a battery at testing time yo must ground the PIN 3 of 1307. You can avoid the capacitors also, but must use the pullup resisters.

RTC (ds1307) Interface for PIC 16f877A

I have tested a time operated switch with RTC 1307 and PIC 16f877A. You can replace the LED with a relay. If you dont have a battery at testing time yo must ground the PIN 3 of 1307. You can avoid the capacitors also, but must use the pullup resisters.

Build Your Own PIC 16F877A Project Board


Finally we have tested the General purpose PIC 16F877A Project board. This has been archived under the supervision of Prof.Sunil.TT, Shri. Manoj, Shri Dabilulal and Hri Suresh are also participated in this project.



Features :
  • Connectors provided for PortA, PortB, PortC, PortD and PortE.
  • All Port Connectors having Vcc and Ground, No External power required for extension Boards.
  • Provision for connecting ICSP Programmer (you can see it in previous post).
  • One LED And One switch are provided for testing board with out external components.
  • Provided external wire soldering facility in all PORT lines, VCC and GND.



The following add on boards are tested

LCD board
Board with 8 LED
Board with 4 LEDs and 4 Switches.
Real Time Clock with RTC 1307 (I2C)
External EEPROM with 24C21 (I2C)
PWM LED dimming
L293 Motor Controller

All the programs are written in Mikroc 8.0 , Circuits and Programs will publish soon

Build Your Own PIC 16F877A Project Board


Finally we have tested the General purpose PIC 16F877A Project board. This has been archived under the supervision of Prof.Sunil.TT, Shri. Manoj, Shri Dabilulal and Hri Suresh are also participated in this project.



Features :
  • Connectors provided for PortA, PortB, PortC, PortD and PortE.
  • All Port Connectors having Vcc and Ground, No External power required for extension Boards.
  • Provision for connecting ICSP Programmer (you can see it in previous post).
  • One LED And One switch are provided for testing board with out external components.
  • Provided external wire soldering facility in all PORT lines, VCC and GND.



The following add on boards are tested

LCD board
Board with 8 LED
Board with 4 LEDs and 4 Switches.
Real Time Clock with RTC 1307 (I2C)
External EEPROM with 24C21 (I2C)
PWM LED dimming
L293 Motor Controller

All the programs are written in Mikroc 8.0 , Circuits and Programs will publish soon