Dynamic Demonstration of Common Communication Protocols in Embedded Systems

Source: CSDN: https://blog.csdn.net/an520_/article/details/125479812, copyright belongs to the author, please contact for removal! Because it is a good article, I hope to share it with more people!

UART, SPI, I2C and other serial communications are very common communication methods in embedded development. The underlying communication principles of these protocols are actually not difficult, but many beginners struggle to understand them.

Today, I will share some common underlying data transmission principles of these communication methods.

1. UART Serial Port

UART: Universal Asynchronous Receiver/Transmitter. The UART serial port is the most common type of serial communication. Below is an animation of the serial port connection to a host computer and RS232 application.

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Debugging MCU via UART on PC

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ RS-232 communication with MCU through level conversion chip

2. SPI Serial Communication

SPI: Serial Peripheral Interface. SPI is a common serial synchronous communication protocol, widely used in various applications.

Below is the timing diagram for SPI data transmission:

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ SPI Data Transmission (1)

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ SPI Data Transmission (2)

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ SPI Timing Signal

3. I²C Communication

I²C: Inter-Integrated Circuit. The term literally means communication between integrated circuits, abbreviated as I²C Bus. I²C mainly distinguishes slave devices through addressing, and its communication principle is relatively simple.

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ I2C Bus and Addressing Method

4. Infrared Remote Control

Infrared remote controls are quite common in our daily lives, as most household remote controls are infrared. Infrared remote control achieves communication by controlling pulse width (the duration of high and low levels) and establishes a communication link through infrared wireless signals (it cannot work if blocked, but can reflect).

Infrared remote controls are quite common in our daily lives, as most household remote controls are infrared. Infrared remote control achieves communication by controlling pulse width (the duration of high and low levels) and establishes a communication link through infrared wireless signals (it cannot work if blocked, but can reflect).

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Infrared control signal is also a serial communication signal

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Infrared signal receiving and amplification shaping circuit

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ A circuit using an infrared receiver to control a relay for fish feeding

5. Serial to Parallel Conversion Circuit

Serial to parallel conversion means converting serial data into parallel data, controlled by a clock to transmit serial data bit by bit, assembling (8 bits) into one parallel data. There are many ready-made chips for this type of converter, and the principle is very simple.

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Serial In, Parallel Out Shift Register

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Shift Register composed of eight D flip-flops

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Serial Transmission Schematic

6. Others

Here are some other principles of serial transmission (waveforms):

Here are some other principles of serial transmission (waveforms):

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ PWM Control of LED Brightness

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ PWM Control of LED Brightness

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Amplitude Modulation and Frequency Modulation Signals

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Phase Modulation Signal

Dynamic Demonstration of Common Communication Protocols in Embedded Systems

▲ Square Wave Edge Jitter Waveform

Leave a Comment