What Communication Technologies Should You Master for Microcontroller Work?

Recently, a reader asked a question: What communication technologies should one master when working with microcontrollers?With the development of technology, there are more and more communication technologies, but in the embedded field, the common communication technologies are actually not many, such as UART, I²C, SPI, CAN, USB, and TCP/IP, which are the most common.These communication technologies can be simple or complex. Here, from the perspective of a beginner, I will provide an overview of the basic content.

Common Communication Technologies

1. UART

UART: Universal Asynchronous Receiver/Transmitter.

USART: Universal Synchronous/Asynchronous Receiver/Transmitter.

USART can be understood as a communication interface that combines UART and USRT, one for synchronous communication and the other for asynchronous communication.

2. I²C

I²C: Inter-Integrated Circuit, literally meaning between integrated circuits. It is actually an abbreviation for I²C Bus, so it should be called the Integrated Circuit Bus in Chinese. It is a type of serial communication bus.

3. SPI

SPI: Serial Peripheral Interface, a high-speed, full-duplex, synchronous communication bus.

QSPI is short for Queued SPI, an extension of the SPI interface introduced by Motorola, which is more widely used than SPI.

QSPI adds a queuing transmission mechanism based on the SPI protocol, allowing the transmission process to occur without CPU intervention, greatly improving transmission efficiency.

4. CAN

CAN: Controller Area Network.

CAN bus is a widely used field bus with great application prospects in industrial measurement and control and industrial automation.

5. USB

USB: Universal Serial Bus.

USB is an external bus standard used to specify the connection and communication between computers and external devices, and is an interface technology used in the PC field.

6. TCP/IP

TCP/IP: Transmission Control Protocol/Internet Protocol.

TCP/IP is a transmission protocol, mainly referring to the Internet, where TCP/IP is the most important layer of transmission protocol.

Of course, these are just common communication technologies; there are many wired and wireless communication technologies that will not be described in detail here.

Communication Principles

The basic communication principles of these common serial methods are not difficult, and there are many tutorials online. Here, I will consolidate some information for you.

1. UART UART communication generally uses 3 lines, although there is also a single-wire half-duplex mode.UART Connection Method:What Communication Technologies Should You Master for Microcontroller Work?UART Communication Data Format:What Communication Technologies Should You Master for Microcontroller Work?For more detailed content in this section, please refer to the “Communication Tutorial 01” in the serial communication chapter.2. I²C I²C is a serial synchronous communication method, generally using 2 lines (SDA data line, SCL clock line), with one master and multiple slaves.I2C Wiring Method:What Communication Technologies Should You Master for Microcontroller Work?SDA (Serial Data Line) and SCL (Serial Clock Line) are both bidirectional I/O lines, and the interface circuit is an open-drain output. They need to be connected to the power supply VCC through pull-up resistors. When the bus is idle, both lines are high, and the connected external devices are all CMOS devices, with the output stage also being an open-drain circuit, consuming very little current on the bus.I2C generally uses an address + data + ACK method, with the basic data format:What Communication Technologies Should You Master for Microcontroller Work?3. SPI SPI is widely used, typically as an interface bus for sending data between microcontrollers and small peripherals (such as shift registers, sensors, and SD cards). SPI communication mainly uses 3 lines (SCK, MOSI, MISO) for communication:What Communication Technologies Should You Master for Microcontroller Work? However, SPI is also used for multi-slave communication, in which case an additional CS chip select signal line is added.What Communication Technologies Should You Master for Microcontroller Work?Multi-Slave Wiring Method:What Communication Technologies Should You Master for Microcontroller Work? Of course, there are also multi-slave configurations similar to I2C, achieved through addressing:What Communication Technologies Should You Master for Microcontroller Work? The SPI communication protocol is much simpler than I2C, with less data processing involved.4. CAN CAN communication is a more complex local area network compared to the previous three types, with both hardware and software protocols being more complex.5. USB USB is a commonly used serial communication interface in daily life, mainly using 4 lines (D+ D- VCC GND):What Communication Technologies Should You Master for Microcontroller Work? The D- or D+ data line on the USB device side is connected to a 1.5K ohm pull-up resistor. When the device is plugged into a PC, it will pull the voltage of the PC’s D- or D+ terminal high. When the PC detects a high level on the D- or D+ terminal, it knows that a device has been plugged in.If the PC’s D- terminal is pulled high, the connected device is a USB low-speed device; if the PC’s D+ terminal is pulled high, the connected device is a USB full-speed or high-speed device. Whether it is a full-speed or high-speed device will be determined by the handshake between the PC and the USB device.What Communication Technologies Should You Master for Microcontroller Work? USB transmission speeds include: low speed 1.5Mbps (USB1.0 protocol), full speed 12Mbps (USB1.1 protocol), high speed 480Mbps (USB2.0 protocol), and super speed 5Gbps (USB3.0 protocol), etc.What Communication Technologies Should You Master for Microcontroller Work?

END

Source: strongerHuangCopyright belongs to the original author. If there is any infringement, please contact for deletion.Recommended ReadingI used this technology to eliminate thousands of lines of if-else!The Kirin 9000s is not from SMIC, but…The words programmers are most likely to misread, I exploded when I heard status.

→ Follow for more updates ←

Leave a Comment