Bus topology / routing / resources
I²C needs two lines, while SPI officially defines at least four signals or more if more servants are added. Some informal SPI alternatives only need three wires, that is an SCLK, SS and a bi-directional MISO/MOSI line. Nevertheless, this exercise would require one SS line per servant. SPI lacks further work, logic and/or pins if a multi-master engineering must be built on SPI. The singular problem I²C when building a system is a finite machine address space on 7 bits, overwhelmed with the 10-bits enlargement.
From this point of view, I²C is a clear winner over SPI in sparing pins, board routing and how effortless it is to build an I²C network.
Throughput / Speed
If data must be relocated at ‘high speed’, SPI is apparently the protocol of choice, over I²C. SPI is full-duplex, and I²C is not. SPI does not determine any speed limit. Exercise often go over 10 Mbps. I²C is limited to 1Mbps in Fast Mode+ and to 3.4 Mbps in High-Speed Mode. This last one requires particular I/O buffers, not regularly easily available.
It is usually said that I²C is much more elegant than SPI and that this last one is a very ‘rough’ protocol. People tend to think the two codes are equally elegant and comparable on robustness.
I²C is elegant for it offers very advanced appearances, such as automatic multi-master clashes handling and built-in addressing management, on a very light foundation. It can be very complex, nonetheless and somewhat lacks performance.
SPI, on the other hand, is quite easy to comprehend and to implement and offers a great deal of flexibility for extensions and alternatives. The disparity is where the elegance of SPI lies. SPI should be considered as a good platform for building custom protocol piles for transmission between ICs. Thus, in accordance with to the engineer’s need, using SPI may need more work but offers raised data transfer performance and almost total freedom.
Both SPI and I2C offer favourable support for connection with low-speed machines, but SPI is improved suited to applications in which devices assign data streams, while I²C is improved at multi master ‘register access’ application.