E-mail: info@hyxkiot.com Call: +86 18664368785
Your Location:Home > News > Industry News

What’s the differences between UART, SPI and IIC interface?

Release date:2022-1-5 0:50:23

What’s the differences between the parallel interface and serial interface in data transmission?

 

Parallel interface

Serial interface

Description

Parallel interface means that the parallel port transmits data in parallel, and the data is transmitted through the parallel line, so that the data transmission speed can be improved, but the length of the parallel transmission line is easily limited, because the length increases, the interference will increase, and the data is prone to errors.

Parallel interface is the serial port, which means that data is transmitted on a limited number of IOs in sequence, one by one. There are many types, including: UART, IIC, SPI, CAN, USB (most interfaces of Bluetooth modules), etc., as long as it is a serial transmission interface, it is a kind of serial port. It is worth mentioning that since people were accustomed to calling the UART port as a serial port in the early days, when everyone referred to the serial port, they generally referred to the UART interface in particular. Most Bluetooth module interfaces are serial interfaces

Schematic diagram


Advantage

There are few data lines used, which can save communication costs in long-distance communication

Multiple bits of data can be transmitted at same time, the transmission speed is very high

Disadvantage

Only one bit of data can be transmitted at one time, the transmission speed is low

How many data lines are needed for the number of bits in the memory, so a large number of data lines are required, and the cost is very high

 

 

 

 

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.

Copyright © 2021 Shenzhen Huayang Xinke Electronics Co., Ltd. All rights reserved