Alternatives

I2C Alternatives

There are numerous ways to establish a connection between devices and whilst I2C is the ideal solution for many applications the following briefly describes and compares some alternatives.

SPI

SPI is a synchronous serial connection implemented by one clock line, one data line in each direction and an optional chip- select signal. In its most simple form, only one data line (either input or output) is present. Unlike the I2C bus, SPI is based on push/pull technology which allows running at much higher speeds than I2C. An SPI interface is not exactly a bus since there is no way to address different devices by an address. Data is sent synchronized by the clock line which is driven by the master. Using a different chip-select line for each device it is, however, possible to share wires between components. Speed and simplicity are the advantages of SPI and therefore, it is popular for applications like EEPROM/Flash programming, display control, sensor data acquisition etc.

Serial

By far the most often used interconnection is the UART (Universal Asynchronous Receiver/Transmitter) in various forms. It is based on a fixed baud rate which must be guaranteed and which is best achieved using dedicated hardware. Except for some special protocols, UARTS do not allow different devices on one bus either. But one huge advantage of them is the ability to serve as master and slave at the same time, i.e. allow a free bi-directional communication without the need to define master/slave roles.

CAN

The CAN bus was originally developed for automotive applications but it has found its way into almost all industrial areas. The CAN protocol is quite complex allowing for data integrity checks, device addressing, error recovery and several advanced features. There is, however, a large number of hardware CAN controllers available which hide this complexity from the developer. CAN can use the same physical layer as a UART allowing to bridge larger distances than an I2C or SPI connection.

1-Wire®

Dallas Semiconductors is the inventor of 1-Wire