Serial communication methods such as ART, SPI, and I2C are very common in embedded development. The underlying principles of these communications are not difficult, but many beginners struggle to understand them.
Today, I will share some common underlying data transmission principles of these communication methods.
1UART Serial Port
UART: Universal Asynchronous Receiver/Transmitter. The UART serial port is the most common type of serial communication. Below is an animation showing the connection of the serial port to a host computer and the application of RS232.
▲ Debugging MCU via UART on PC▲ Communication between RS-232 and MCU through level conversion chip
2SPI Serial Communication
SPI: Serial Peripheral Interface. SPI is a common serial synchronous communication protocol with wide applications.
Below is the timing diagram for SPI data transmission:
▲ SPI Data Transmission (1)▲ SPI Data Transmission (2)▲ SPI Timing Signal
3I²C Communication
I²C: Inter-Integrated Circuit, literally meaning between integrated circuits, is short for I²C Bus. I²C mainly distinguishes slave devices through addresses, and its communication principle is relatively simple.▲ I2C Bus and Addressing Method
4Infrared Remote Control
Infrared remote controls are quite common in our daily lives; most household remote controls use infrared. Infrared remote control communicates by controlling pulse width (the duration of high and low levels) and establishes a communication link via infrared wireless signals (it won’t work if blocked, but can reflect).▲ Infrared control signal is also a serial communication signal▲ Infrared signal reception and amplification shaping circuit▲ A circuit using infrared reception photoelectric tube to control a relay for fish feeding
5Serial to Parallel Conversion Circuit
Serial to parallel conversion means converting serial data into parallel data, transmitting serial data bit by bit through clock control, and accumulating (8 bits) to form one parallel data. There are many ready-made chips for this converter, and the principle is very simple.▲ Shift register with serial input and parallel output▲ Shift register composed of eight D flip-flops▲ Serial transmission schematic
6Others
Here are some other principles of serial transmission (waveforms):▲ PWM control of LED brightness▲ PWM control of LED brightness▲ Amplitude and Frequency Modulation Signals
▲ Phase Modulation Signal▲ Square Wave Edge Jitter WaveformDisclaimer:This article is reprinted from Electronic Product World. If there are any issues regarding the content, copyright, or other matters, please contact the staff via WeChat (prrox66), and we will address the issue promptly!Submissions/Recruitment/Advertising/Course Collaboration/Resource Exchange, please add WeChat: 13237418207
What is the function of the microcontroller startup file .s
Simulating the Linux automatic initialization process on STM32
Scan the code to add customer service WeChat, remark “Join Group” to pull you into the official technical WeChat group of Fanyi Education, and communicate with various electronic technology experts about technical issues and insights~