Common Embedded Communication Protocols Explained

I am Lao Wen, an embedded engineer who loves learning.
Follow me to become even better together!

Compiled by | strongerHuang

WeChat Official Account | strongerHuang

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

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

1UART 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, as well as the application of RS232.
Common Embedded Communication Protocols Explained
▲ Debugging MCU via UART on PC
Common Embedded Communication Protocols Explained
▲ RS-232 communication with MCU via level conversion chip

2SPI Serial Communication

SPI: Serial Peripheral Interface.
SPI is a commonly used serial synchronous communication protocol with very wide applications.
Below is the timing diagram for SPI data transmission:
Common Embedded Communication Protocols Explained
▲ SPI Data Transmission (1)
Common Embedded Communication Protocols Explained
▲ SPI Data Transmission (2)
Common Embedded Communication Protocols Explained
▲ SPI Timing Signals

3I²C Communication

I²C: Inter-Integrated Circuit, literally meaning between integrated circuits, is commonly referred to as I²C Bus.

I²C mainly distinguishes and identifies slave devices via addresses, and its communication principle is relatively simple.

Common Embedded Communication Protocols Explained
▲ I2C Bus and Addressing Method

4Infrared 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 it establishes a communication link via infrared wireless signals (it won’t work if blocked, but can reflect).

Common Embedded Communication Protocols Explained
▲ Infrared control signals are also a form of serial communication signal
Common Embedded Communication Protocols Explained
▲ Infrared signal receiving and amplification circuit
Common Embedded Communication Protocols Explained
▲ A circuit for feeding fish using an infrared receiving phototransistor to control a relay

5Serial-to-Parallel Conversion Circuit

Serial-to-parallel conversion refers to converting serial data into parallel data, controlled by a clock signal to transmit one bit of serial data at a time, which forms a parallel data set (8 bits).

There are many off-the-shelf chips for this converter, and the principle is quite simple.

Common Embedded Communication Protocols Explained
▲ Shift register with serial input and parallel output
Common Embedded Communication Protocols Explained
▲ Shift register made of eight D flip-flops
Common Embedded Communication Protocols Explained
▲ Serial transmission schematic

6Others

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

Common Embedded Communication Protocols Explained
▲ PWM control of LED brightness
Common Embedded Communication Protocols Explained
▲ PWM control of LED brightness
Common Embedded Communication Protocols Explained
▲ Amplitude and frequency modulation signals
Common Embedded Communication Protocols Explained
▲ Phase modulation signals
Common Embedded Communication Protocols Explained
▲ Square wave edge jitter waveform
Disclaimer: The material in this article comes from the internet, and the copyright belongs to the original author. If there are copyright issues, please contact me for removal.
-END-
Recommended reading: Click the image below to jump to read

Leave a Comment