2569 views|8 replies

18

Posts

0

Resources
The OP
 

MCU serial communication [Copy link]

This post was last edited by Zhao Wei 0317 on 2018-5-1 10:39 The single-chip microcomputer communication receives characters sent by the computer, changes lowercase letters to uppercase letters, and keeps the rest unchanged, and then sends them to the computer, and displays the characters on the LCD1602 liquid crystal display. Why can't a single character be sent in the end, and strange Chinese characters are displayed?


This post is from 51mcu

Latest reply

The MCU sends and connects to its own receiver. It should not be garbled. If it displays garbled characters, you should check whether there is a problem with the display function.  Details Published on 2018-5-3 09:01
 

4005

Posts

0

Resources
2
 
There is something wrong with your screenshot. It is incomplete.
This post is from 51mcu
 
 
 

18

Posts

0

Resources
3
 
huo_hu posted on 2018-5-1 09:13 There is something wrong with your screenshot, it is incomplete
I changed it a little bit, now it is complete, what is wrong?
This post is from 51mcu
 
 
 

6040

Posts

204

Resources
4
 
Maybe your baud rate is not configured correctly.
This post is from 51mcu
 
 
 

4005

Posts

0

Resources
5
 
The garbled code is mostly caused by the baud rate setting problem. Check it yourself when sending and receiving.
This post is from 51mcu
 
 
 

18

Posts

0

Resources
6
 
I also get garbled code when I send it spontaneously. The baud rate is 2400, not doubled. The serial port debugging group hand is also 2400. The crystal oscillator is 11.0592. What's wrong?
This post is from 51mcu
 
 
 

4005

Posts

0

Resources
7
 
There should be no garbled characters when sending and receiving, because the sending and receiving are the same.
This post is from 51mcu
 
 
 

4177

Posts

9

Resources
8
 
I remember that for 51, the calculation of baud rate is different if the crystal is 11.0592M and the crystal is 12M. You can search for some information on the Internet.
This post is from 51mcu
 
 
 

3471

Posts

11

Resources
9
 
The MCU sends and connects to its own receiver. It should not be garbled. If it displays garbled characters, you should check whether there is a problem with the display function.
This post is from 51mcu
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list