当前位置:网站首页>The difference between MCU serial communication and parallel communication and the understanding of UART
The difference between MCU serial communication and parallel communication and the understanding of UART
2022-07-04 02:52:00 【Huawei SCM Linbei】
If we need to start from a MCU Send a piece of data to another MCU, We can choose two ways of communication , Serial communication or parallel communication .
If the data we want to send is digital 198 Convert to binary , Namely 11000110, If serial communication protocol is used , We only need a data line to send data in bit order , The communication distance can range from a few meters to thousands of meters , Parallel communication protocols can also be used , We need eight data lines to send data directly and in parallel .
Because parallel data cannot carry clock information , To ensure consistent signals , Additional clock signal lines are required , And the communication speed is fast , But the corresponding line cost is also higher , The anti-interference ability is also worse , Therefore, the communication distance is very limited .
When we use MCU When communicating , Serial protocols often have simple peripherals 、 Low cost and long communication distance , So it's more popular .
Our commonly used serial protocols are Sbus,PPM,USB,RS232,Morse Code,JTAG,UART,I2C,CAN,SPI,MIDI etc. , Even Morse code is serial communication . Depending on the clock used , We can divide serial communication into synchronous communication and asynchronous communication .
That we use a lot I2C and SPI It's all synchronous communication , Both sides of synchronous communication need to use a clock with the same frequency , The receiver needs to be ready to receive data at all times , Only need assistance bit The string is used as the start and stop identification , So the transmission efficiency is high , You can also communicate one to many .

The typical representative of asynchronous communication is serial port UART. Both sides of asynchronous communication use their own clocks , The receiving method realizes information synchronization by identifying the start bit and end bit in the data packet , Therefore, the data efficiency is low , Only one-to-one communication .

Let's first look at our commonly used serial communication , Three wires are needed , Send data line TX, Receiving data line RX And reference GND You can communicate .

Before communication, both parties should know the baud rate of communication 、 Data length 、 Start bit and stop bit , For example, we need to send 198 This number is converted into binary to 11000110, We can load the data to be sent into data bits , When communicating , We also need a start bit and an end bit .
We usually use high signal to indicate that communication stops , Because in this way, there will be no communication error when the signal is interfered . When the receiver detects that the signal changes from high to low , It means to start communication , You can start reading data .
We also need to configure a parameter , It's baud rate , Our commonly used baud rate is 9600 Porter per second , It means sending every second 9600 A symbol , The length of each symbol is one divided by 9600 be equal to 104 Microsecond .
But in practical applications , When we detect that the data start bit starts reading data , Usually postponed 52 Read data in microseconds , Because the initial data may be unstable , After that, what the receiver has to do is every 104 Collect data every microsecond , Until the eight digit data is read, the data stop bit is read , Even if we use other baud rates to send different data , We also need to read the start bit and stop bit in the same way .
Like to help collect some praise , Thank you for your support and encouragement !
Learn SCM , I'm serious about Warwick North , Children's shoes can come to me if they have any questions , Reply to Lin Bei in time to get very practical dry goods , I will be very satisfied if I can help you grow ! Okay , That's all for this issue , See you next time !
Hua Weilin North
边栏推荐
- Global and Chinese market of handheld melanoma scanners 2022-2028: Research Report on technology, participants, trends, market size and share
- Package and download 10 sets of Apple CMS templates / download the source code of Apple CMS video and film website
- Basé sur... Netcore Development blog Project Starblog - (14) Implementation of theme switching function
- Pytoch residual network RESNET
- Practical multifunctional toolbox wechat applet source code / support traffic master
- 60 year old people buy medical insurance and recommend a better product
- I stepped on a foundation pit today
- The first spring of the new year | a full set of property management application templates are presented, and Bi construction is "out of the box"
- The "two-way link" of pushing messages helps app quickly realize two-way communication capability
- The boss said: whoever wants to use double to define the amount of goods, just pack up and go
猜你喜欢

LV1 tire pressure monitoring

Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram

Tsinghua University product: penalty gradient norm improves generalization of deep learning model

Yyds dry goods inventory override and virtual of classes in C

Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?

Advanced learning of MySQL -- Application -- storage engine

Unity controls the selection of the previous and next characters
![Backpropagation formula derivation [Li Hongyi deep learning version]](/img/ef/f76eae39c4f8716a0030a60c85b09c.gif)
Backpropagation formula derivation [Li Hongyi deep learning version]
![[software implementation series] software implementation interview questions with SQL joint query diagram](/img/8b/8718fea82f83a6169ea5d8c2e5b645.jpg)
[software implementation series] software implementation interview questions with SQL joint query diagram

Li Chuang EDA learning notes IX: layers
随机推荐
Hunan University | robust Multi-Agent Reinforcement Learning in noisy environment
PMP 考試常見工具與技術點總結
Résumé des outils communs et des points techniques de l'examen PMP
Key knowledge of C language
Kiss number + close contact problem
Leetcode 110 balanced binary tree
Love and self-discipline and strive to live a core life
[Yugong series] February 2022 attack and defense world advanced question misc-83 (QR easy)
The "message withdrawal" of a push message push, one click traceless message withdrawal makes the operation no longer difficult
查詢效率提昇10倍!3種優化方案,幫你解决MySQL深分頁問題
[UE4] parse JSON string
POSTECH | option compatible reward reverse reinforcement learning
This function has none of DETERMINISTIC, NO SQL..... (you *might* want to use the less safe log_bin_t
Summarize the past to motivate yourself to move on
Node solves cross domain problems
Idea if a class cannot be found, it will be red
150 ppt! The most complete "fair perception machine learning and data mining" tutorial, Dr. AIST Toshihiro kamishima, Japan
Global and Chinese market for travel wheelchairs 2022-2028: Research Report on technology, participants, trends, market size and share
Talking about custom conditions and handling errors in MySQL Foundation
Dare to climb here, you're not far from prison, reptile reverse actual combat case