Common Communication Protocols in Embedded Systems

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

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

Today, I will share some common low-level data transmission principles of communication.

UART Serial Port

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

Common Communication Protocols in Embedded Systems

▲ Debugging MCU via UART on PC

Common Communication Protocols in Embedded Systems

▲ RS-232 communication with MCU through 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:

Common Communication Protocols in Embedded Systems

▲ SPI Data Transmission (1)

Common Communication Protocols in Embedded Systems

▲ SPI Data Transmission (2)

Common 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 mainly distinguishes slave devices through addresses, and its communication principle is relatively simple.

Common 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 use 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 won’t work if blocked, but can reflect).

Infrared remote control is 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 through infrared wireless signals (it won’t work if blocked, but can reflect).

Common Communication Protocols in Embedded Systems

▲ Infrared control signal is also a serial communication signal

Common Communication Protocols in Embedded Systems

▲ Infrared signal reception and amplification shaping circuit

Common Communication Protocols in Embedded Systems

▲ A circuit for controlling a relay using an infrared receiver to feed fish

Serial to Parallel Conversion Circuit

Serial to parallel conversion means converting serial data into parallel data by controlling the clock to transmit serial data bit by bit, and when it reaches a whole (8 bits), it becomes parallel data. There are many ready-made chips for this converter, and the principle is very simple.

Common Communication Protocols in Embedded Systems

▲ Shift register with serial input and parallel output

Common Communication Protocols in Embedded Systems

▲ Shift register composed of eight D flip-flops

Common Communication Protocols in Embedded Systems

▲ Serial transmission schematic

Others

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

Common Communication Protocols in Embedded Systems

▲ PWM control of LED brightness

Common Communication Protocols in Embedded Systems

▲ PWM control of LED brightness

Common Communication Protocols in Embedded Systems

▲ Amplitude modulation and frequency modulation signals

Common Communication Protocols in Embedded Systems

▲ Phase modulation signal

Common Communication Protocols in Embedded Systems

▲ Square wave edge jitter waveform

This article is sourced from the internet, freely conveying knowledge. Copyright belongs to the original author. If there are any copyright issues, please contact me for deletion.

Note

Due to recent changes in the WeChat public account push rules, to prevent missing articles, you can star and pin this account so that every article pushed will appear in your subscription list.

You may also like:

Easy to Understand | Step-by-Step Guide to Writing Your First Host Computer

General Library for Differential Upgrading Suitable for Embedded Systems!

Sharing a Highly Flexible Protocol Format (with Code Examples)

Sharing Some Practical Code Snippets (Part 2)

Sharing a Bug Localization Method You Might Not Know

Sharing a Method for Modifying Configuration Files

Embedded Miscellaneous Weekly Report Issue 13: lz4

Understanding Embedded Parallel Multithreading Processors!

Reply with 1024 in the WeChat chat interface to obtain embedded resources; reply with m to view article summaries

Leave a Comment