当前位置:网站首页>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
边栏推荐
- Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?
- 機器學習基礎:用 Lasso 做特征選擇
- Final consistency of MESI cache in CPU -- why does CPU need cache
- 96% of the collected traffic is prevented by bubble mart of cloud hosting
- 3D game modeling is in full swing. Are you still confused about the future?
- Introduction to graphics: graphic painting (I)
- String: LV1 eat hot pot
- Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends
- Remember another interview trip to Ali, which ends on three sides
- Jenkins continuous integration environment construction V (Jenkins common construction triggers)
猜你喜欢

On Valentine's day, I code a programmer's exclusive Bing Dwen Dwen (including the source code for free)

Idea if a class cannot be found, it will be red

What are the conditions for the opening of Tiktok live broadcast preview?

A brief talk on professional modeler: the prospect and professional development of 3D game modeling industry in China

LV1 tire pressure monitoring

The boss said: whoever wants to use double to define the amount of goods, just pack up and go

Chapter 3.4: starrocks data import - Flink connector and CDC second level data synchronization

Network byte order

Solve the problem that the tabbar navigation at the bottom of vantui does not correspond to the page (window.loading.hash)

Node solves cross domain problems
随机推荐
Push technology practice | master these two tuning skills to speed up tidb performance a thousand times!
Fudan released its first review paper on the construction and application of multimodal knowledge atlas, comprehensively describing the existing mmkg technology system and progress
1day vulnerability pushback skills practice (3)
Unity writes a character controller. The mouse controls the screen to shake and the mouse controls the shooting
Global and Chinese market of thin film deposition systems 2022-2028: Research Report on technology, participants, trends, market size and share
Advanced learning of MySQL -- Application -- index
Keep an IT training diary 055- moral bitch
VRRP+BFD
[untitled] the relationship between the metauniverse and digital collections
What are the conditions for the opening of Tiktok live broadcast preview?
60 year old people buy medical insurance and recommend a better product
C learning notes: C foundation - Language & characteristics interpretation
Bugku Zhi, you have to stop him
Valentine's Day - 9 jigsaw puzzles with deep love in wechat circle of friends
Love and self-discipline and strive to live a core life
Global and Chinese markets for electroencephalogram (EEG) devices 2022-2028: Research Report on technology, participants, trends, market size and share
2006 translation
Imperial cms7.5 imitation "D9 download station" software application download website source code
Global and Chinese markets of advanced X-ray inspection system (Axi) in PCB 2022-2028: Research Report on technology, participants, trends, market size and share
Talking about custom conditions and handling errors in MySQL Foundation