最常用的两种串口异步通信协议就是8位数据模式与9位数据模式,本文对这两种通信协议做了详细分析,对不同协议之间能否正常通信也进行了分析,尤其是9位模式发送数据、8位模式接收数据的可行性,对于这种方式从协议上进行了分析,并进行了实验验证。在实际应用中出现通信错误时,从通信波形进行通信协议分析,用接收数据中转的方法来查找与确认是否为通信协议设置的问题。
Abstract
The two most commonly used serial asynchronous communication protocols are 8bit data mode and 9bit data mode.This paper makes a detailed analysis of these two communication protocols.It also analyzes whether the different protocols can communicate normally,especially the feasibility of sending data in 9bit mode and receiving data in 8bit mode.This method has been analyzed from the protocol and verified by experiments.This paper also gives the method of how to analyze the communication protocol from the source of the communication waveform when communication errors occur in practical applications,and how to find and confirm whether it is the problem of the communication protocol setting by using the method of receiving data transfer.
关键词
串口通信 /
串口通信协议 /
MCU /
GPS校时
Key words
serial communication /
serial communication protocol /
MCU /
GPS time calibration
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[1] 曾德康.基于单片机的数据串口通信研究[J].通信电源技术,2019,36(3):194-195.
[2] 刘晓,陈广凯,赵汉青,等.一种基于单片机串口通信的数据缓存处理方法[J].信息通信,2020(4):103-104.
[3] 席东河,马磊娟,杜娟.单片机串口通信的调试方法与技术[J].武汉职业技术学院学报,2010,9(3):75-78.
[4] 郭勇,邝安玄,宋奇衡.某系统内串口通信故障原因分析与处理[J].航空计算技术,2021,51(6):120-123.
[5] 李江全,杨志辉,朱东芹,等.Visual Basic数据采集与串口通信测控应用实战[M].北京:人民邮电出版社,2019.