Are the I2C and SPI protocols implemented in the integrated circuits?

For I2C, enter image description here

There must be some circuit to be able to process the start bit, device address, internal register Address, Data and stop sent from the Master to the Slave

From my very limited understanding of electronics, the circuit would maybe be a shift register, slave address checker circuit built into the slave integrated circuit, MUX's for registers address

Does protocol mean that the implementation of rules for communication in the logic circuit is up to the user or manufacturer?

  • 3
    \$\begingroup\$ I2C is a interface with a protocol. SPI is only an interface, it is not a protocol. \$\endgroup\$ – Oldfart Aug 10 '19 at 20:06
  • 1
    \$\begingroup\$ I really do not understand, ive read a few articles and books. Some saying its a protocol, some saying its a physical circuit. If everyone adopted a universal naming system it would save a lot of uneccesary computation power \$\endgroup\$ – user222854 Aug 10 '19 at 20:07
  • \$\begingroup\$ Could you explain what an "interface with a protocol" means? Since they are very high level terms capable of hundreds of different instantiations \$\endgroup\$ – user222854 Aug 10 '19 at 20:08
  • \$\begingroup\$ Interface to me means an entity you access through another entity(interface). Protocol means to me abstract axioms for communication. Where the axioms can be represented concretely in an electornic circuit \$\endgroup\$ – user222854 Aug 10 '19 at 20:11
  • 2
    \$\begingroup\$ The problem with SPI is, that was never official defined. It was one of those 'de-facto' standards which sprung into life. I2C is an official defined interface with timing, levels and a protocol how to use and interpret it. \$\endgroup\$ – Oldfart Aug 10 '19 at 20:11

My feeble attempt at definition would be that an interface is what you use to exchange information over.

The protocol is how you interpret the information you get and how you are expected to respond.


  • Interface (computing), a point of interaction between hardware, software, or a combination of the two.

  • Communication protocol: a defined set of rules and regulations that determine how data is transmitted in telecommunications and computer networking

Note that for SPI there is no interpretation (and no standardization) . It just pumps data through the interface.
This leads to problems as SPI interfaces can electrically be compatible but behave very different.

e.g. an 12 bit DAC can work with 12 clocks cycles and be write only.
There is no way that would be able to talk to an EEPROM where you need an address, data read, data write, sector erase etc.

| improve this answer | |
  • \$\begingroup\$ Thank you, but i think the rules still need to be implemented in a physical circuit. Where the circuit can receive a certain combination of bits and respond with another combination of bits complying with the communication protocol \$\endgroup\$ – user222854 Aug 10 '19 at 20:34

I2C has a well defined (clear) protocol and hence most of the needed logic is built in hardware. SPI on the other hand has only hardware interface defiend but not the complete protocol(no standards available).

I only want to give a feel about the already implemented sections in ahrdware. this is just an example from STM32 MCU. y enter image description here SPI interface block

| improve this answer | |

On the slave side, you need a simple state machine for I²C.

It doesn't have to be a full fledged microcontroller, just a program counter, a ROM and some conditional logic triggered by certain columns of that ROM which load the program counter with predefined values if the condition is met. I think it's possible to implement an I²C slave for a simple 8-bit PIO in 64x8 bit ROM.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy