tags: SPI communication I2C communication UART communication CAN communication SPI、I2C、UART、CAN
SPI (Serial Peripheral Interface) is a synchronous serial data transmission standard proposed by Motorola, which is widely used in many devices.









The UART is an asynchronous transfer interface that does not require a clock line and is identified by the start and stop bits and the baud rate.


CAN, known as the "Controller Area Network", is the controller area network, and is one of the most widely used fieldbuses in the world. Initially, CAN was designed as a microcontroller communication in an automotive environment, exchanging information between the vehicle's electronic control unit ECUs to form an automotive electronic control network. For example, the engine management system, the gearbox controller, the instrumentation equipment, and the electronic trunk system are all embedded in the CAN control device.
In a single network consisting of a CAN bus, theoretically many nodes can be attached. In practical applications, the number of nodes is limited by the electrical characteristics of the network hardware. For example, when using the Philips P82C250 as a CAN transceiver, 110 nodes are allowed to be attached to the same network. CAN provides data transfer rates of up to 1 Mbit/s, making real-time control very easy. In addition, the hardware's error detection feature also enhances the CAN's immunity to electromagnetic interference.
CAN bus features:
1) It can work in multi-master mode. Any node on the network can actively send information to other nodes on the network at any time, regardless of master-slave, and the communication mode is flexible.
2) Nodes on the network can be divided into different priorities to meet different real-time requirements.
3) Using a non-destructive bit arbitration bus structure mechanism, when two nodes simultaneously transmit information to the network, the node with the lower priority actively stops the data transmission, and the node with the higher priority can continue to transmit the data without being affected.
4) It can be point-to-point, point-to-multipoint and global broadcast to receive data in several transmission modes.
5) The direct communication distance can be up to 10km (rate below 4Kbps).
6) The communication rate can be up to 1MB/s (the distance is up to 40m).
Both SPI and I2C communication methods are short-distance, communication between chips and chips or between other components such as sensors and chips. SPI and IIC are on-board communication, IIC sometimes also communicates between boards, but the distance is very short, but more than one meter, such as some touch screens, mobile phone LCD screens, many of the film cables use IIC, I2C can be used to replace the standard parallel Bus, various integrated circuits and functional modules that can be connected. I2C is a multi-master bus, so any device can work like a master and control the bus. Each device on the bus has a unique address that can operate as a transmitter or receiver depending on their capabilities. Multiplex microcontrollers can coexist on the same I2C bus. These two lines are low speed transmissions.
The UART is used for communication between two devices, such as the communication between the device and the computer. Such communication can be done over long distances. UART speed is faster than the above two, up to about 100K, with computer and equipment or computer and computing communication, but the effective range will not be very long, about 10 meters, UART advantage is wide support, programming structure Quite simply, with the development of USB, the UART is gradually going downhill.
The CAN communication distance is up to 10 km (set at 5 Kbps), or the maximum communication rate is 1 Mbps (set communication distance is 40 m).
The number of nodes on the CAN bus can reach 110. The communication medium can be selected from twisted pair, coaxial cable, and fiber.
CAN uses non-destructive bus arbitration technology. When multiple nodes send data at the same time, the node with lower priority will actively exit the transmission, and the node with high priority can continue to send, saving the bus. Arbitration time.
CAN works in a multi-master mode, and any node on the network can actively send information to other nodes on the network at any time.
CAN uses the message identifier to identify nodes on the network, so that the nodes are divided into different priorities, and the nodes with high priority enjoy the priority of transmitting messages. The message is a short frame structure, the short transmission time makes it less susceptible to interference, and CAN has a good validation mechanism, which ensures the reliability of CAN communication.
reference:
UART UART: Universal Asynchronous Receiver/Transmitter, is a kind of asynchronous receiver/transmitter. It converts the data to be transmitted between serial communication and parallel communication. ...
As shown below Some features should be added UART has a long transmission distance because there is no clock line, up to 15m, but the speed is very slow SPI supports full-duplex communication, simple ...
1. What is a communication protocol To put it in the vernacular, the communication protocol is the rule agreed upon by both parties during communication. To make an analogy, just like you communicate ...
SPI: High-speed synchronous serial port. 3 ~ 4 line interface, send and receive independence, can be synchronously UART: Universal asynchronous serial port. Complete two-way communication according to...
Serial communication Articles directory Serial communication 1.SPI 1. Introduction to the four data cables: 2. Data transmission: 3. Clock polarity and clock phase 4. Advantages and disadvantages: 5. ...
Serial communication UART, I2C, SPI Article Directory Serial communication UART, I2C, SPI 1.SPI 1. Introduction of four data lines: 2. Data transmission: 3. Clock polarity and clock phase 4. Advantage...
A correlation term: 1.1 serial: In a computer bus or other data channel, each transmission a byte of data, and continuously over a single communication process 1.2 Parallel: multi-bit data is simultan...
When we are in DIY electronic products, in addition to the function of each module and equipment, we also need to consider the communication between them. The modules in electronic products are just l...
table of Contents USB bus UART I2C bus SPI bus GPIO(RK3399) FMC reference USB bus USB1.1: ——-low speed mode (low speed): 1.5Mbps ——-full speed mode (full speed): 12Mbps USB2.0:...
1. Communication 1. The concept of communication We call the information exchange between the computer and the outside world communication. 2. Classification of communication methods There are two bas...