Collection of Commonly Used Communication Protocols in Embedded Systems!

Collection of Commonly Used Communication Protocols in Embedded Systems!

UART, SPI, and I2C are very common serial 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 of these communication methods.

UART Serial Communication

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.

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Debugging MCU via UART on PC

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ RS-232 communication with MCU via level conversion chip

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:

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ SPI Data Transmission (1)

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ SPI Data Transmission (2)

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ SPI Timing Signals

I2C Communication

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

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ I2C Bus and Addressing Method

Infrared Remote Control

Infrared remote control is quite common in our daily lives; most household remote controls are infrared. Infrared remote control communicates 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 control is quite common in our daily lives; most household remote controls are infrared. Infrared remote control communicates 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).

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Infrared control signals are also a type of serial communication signal

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Infrared signal receiving and amplification shaping circuit

Collection of Commonly Used Communication Protocols in Embedded Systems!

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

Serial to Parallel Conversion Circuit

Serial to Parallel Conversion refers to converting serial data into parallel data. Serial data is transmitted bit by bit under clock control, and when it accumulates to a full byte (8 bits), it becomes parallel data. There are many off-the-shelf chips for this type of converter, and the principle is quite simple.

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Serial input, parallel output shift register

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Shift register composed of eight D flip-flops

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Serial transmission schematic

Others

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

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ PWM control of LED brightness

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ PWM control of LED brightness

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Amplitude and frequency modulation signals

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Phase modulation signal

Collection of Commonly Used Communication Protocols in Embedded Systems!

▲ Square wave edge jitter waveform

Source: https://blog.csdn.net/an520

—— The End ——Previous Recommendations:

Why do old electricians pretend to search for faults for two hours when it only takes one minute? Only those who understand can see through it.

How to design a circuit for RS485 direction switching? Introduction of 5 schemes and analysis of their advantages and disadvantages!

How to write your own instructions using S7-200 SMART? It can make me look impressive!

[Case Study] A guide to mastering maintenance techniques for marine Vacon frequency converters!

The little-known history of “Chinese core” pressure sensors!

Share 💬 Like 👍 View ❤️

Support quality content with a “three-link” action!

Every little bit counts, keep learning👇 ClickRead the original text for more valuable content

Leave a Comment