Reprinted from CSDN: https://blog.csdn.net/an520_/article/details/125479812
UART, SPI, I2C, and other serial communications are very common communication methods in embedded development. The underlying communication principles of these protocols are not difficult, but many beginners struggle to learn them.
Today, I will share some common underlying data transmission principles.
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 showing the connection of the serial port to a PC and the application of RS232.
▲ Debugging MCU via UART on PC
▲ RS-232 communicates with MCU via level conversion chip
2. SPI Serial Communication
SPI: Serial Peripheral Interface. SPI is a common serial synchronous communication protocol with a wide range of applications.
Below is the timing diagram for SPI data transmission:
▲ SPI Data Transmission (1)
▲ SPI Data Transmission (2)
▲ SPI Timing Signals
3. I²C Communication
I²C: Inter-Integrated Circuit, which literally means between integrated circuits, is abbreviated as I²C Bus. I²C mainly distinguishes slave devices by address, and its communication principles are relatively simple.
▲ I2C Bus and Addressing Method
4. Infrared Remote Control
Infrared remote control is quite common in our daily lives, as most household remote controls are infrared. Infrared remote control operates by controlling the pulse width (the duration of high and low levels) to establish communication through infrared wireless signals (it won’t work if blocked, but can reflect).
Infrared remote control is quite common in our daily lives, as most household remote controls are infrared. Infrared remote control operates by controlling the pulse width (the duration of high and low levels) to establish communication through infrared wireless signals (it won’t work if blocked, but can reflect).
▲ Infrared control signals are also a type of serial communication signal
▲ Infrared signal reception and amplification shaping circuit
▲ A circuit that uses an infrared receiver photodiode to control a relay for fish feeding
5. Serial-to-Parallel Conversion Circuit
Serial-to-parallel conversion involves converting serial data into parallel data. This is done by controlling the clock to transmit serial data one bit at a time, and when 8 bits are collected, it becomes parallel data. There are many ready-made chips for this type of converter, and the principle is quite simple.
▲ Serial input, parallel output shift register
▲ Shift register composed of eight D flip-flops
▲ Serial transmission schematic
6. Others
Here are some other principles of serial transmission (waveforms):
▲ PWM Control of LED Brightness
▲ PWM Control of LED Brightness
▲ Amplitude and Frequency Modulated Signals
▲ Phase Modulated Signal
▲ Square Wave Edge Jitter Waveform
Regularly share embedded knowledge in a simple and understandable manner,follow our public account, and bookmark it to improve a little every day.
Disclaimer:
All articles, images, etc. published by this account are copyrighted by the original authors. If there is any infringement, please contact us for deletion.
Follow, like, view, and share to support quality content!