What’s the differences between the parallel interface and serial interface in data transmission?
What is UART/SPI/IIC?
UART
UART is Universal Asynchronous Receiver/Transmitter, it’s the most commonly used communication technology of the single-chip microcomputer, and is usually used for the communication between the single-chip microcomputer and the computer and between the single-chip microcomputer and the single-chip microcomputer.
SPI:
SPI is Serial Peripheral Interface, it is a synchronous serial data transmission standard as well as a high-speed, full-duplex, and synchronous communication bus, which is widely used in many devices.
IIC:
IIC is also known as I2C, a two-wire serial bus structure used to connect microcontrollers and their peripherals. The main advantage of the IIC bus is its simplicity and effectiveness.
What’s the difference between UART, SPI and IIC?
1. UART need two wires, one for sending and one for receiving, it can communicate in full duplex, and the number of wires is relatively small. Data is transmitted asynchronously, and the timing requirements for both parties are relatively strict, and the communication speed is not very fast. It is most used in multi-machine communication.
2. Compared with UART, SPI interface has one more synchronous clock line. UART’s disadvantage is SPI’s advantage. The timing requirements of the communication parties are not strict. Different devices can be easily combined, and the communication speed is very high. It is generally used for high-speed data communication between internal components of the product, such as large-capacity memory.
3. The IIC interface is also a two-wire interface. It transmits data between two wires through a complex logical relationship. The communication speed is not high and the program is more complicated to write. In general single-chip microcomputer systems, it is mainly used to connect with small and easy memories such as 24C02.
SPI and UART can achieve full duplex, but I2C cannot; I2C is a bit slower than SPI, and the protocol is a bit more complicated than SPI, but the connection is less than standard SPI.