The I2C bus was designed by Philips in the early ’80s to allow easy communication between components which reside on the same circuit board. Philips Semiconductors migrated to NXP in 2006.
The name I2C translates into “Inter IC”. Sometimes the bus is called IIC or I²C bus.
The original communication speed was defined with a maximum of 100 kbit per second and many applications don’t require faster transmissions. For those that do there is a 400 kbit fastmode and – since 1998 – a high speed 3.4 Mbit option available. Recently, fast mode plus a transfer rate between this has been specified. Beyond this, there is the ultra fast mode UFM, but it frankly is no real I2C bus.
I2C is not only used on single boards but also to connect components which are linked via cable. Simplicity and flexibility are key characteristics that make this bus attractive to many applications.
Most significant features include:
For Example, a popular I2C device RTC IC - DS1307 is having 0x68 as its 7 bit Address. This 7 bits will be MSB 7 bits of 8 bit address required for Read / Write. The LSB (R/~W) will be HIGH for Read and LOW for Write Operation. Therefore, to write into DS1307 - 8 Bit Address will be 0xD0 (0b 11010000) and to read from DS1307- 8 Bit Address will be 0xD1 (0b 11010001) - Note that MSB 7 Bits represent 0b1101000 => 0x68 with LSB (R/~W) = 1 for Read ( 0xD1) and with LSB (R/~W) = 0 for Write ( 0xD0) Operation.
For Programs related with I2C Implementation, refer Sample Program Page in this site.
The Serial Peripheral Interface (SPI) is a synchronous serial communication interface specification used for short-distance communication, primarily in embedded systems. The interface was developed by Motorola in the mid-1980s and has become a de facto standard. Typical applications include Secure Digital cards and liquid crystal displays.
SPI devices communicate in full duplex mode using a master-slave architecture with a single master. The master device originates the frame for reading and writing. Multiple slave-devices are supported through selection with individual slave select (SS) (sometimes called chip select (CS)) lines.
Sometimes SPI is called a four-wire serial bus, contrasting with three-, two-, and one-wire serial buses. The SPI may be accurately described as a synchronous serial interface, but it is different from the Synchronous Serial Interface (SSI) protocol, which is also a four-wire synchronous serial communication protocol. The SSI protocol employs differential signaling and provides only a single simplex communication channel. SPI is one master and multi slave communication.