基于MFC串口连续通信的简易实现  被引量:2

Simple Implementation of Serial Port Continuous Communication Based on MFC

在线阅读下载全文

作  者:邓启亮[1] 徐立涛[1] 栗旭光 

机构地区:[1]西安电子科技大学物理与光电工程学院,陕西西安710071

出  处:《电子科技》2014年第2期99-100,共2页Electronic Science and Technology

摘  要:设计了一种在MFC中实现与串口连续通信的简易方法,利用微软提供的MSComm控件,仿照MODBUSRTU协议,并根据数据包之间的时间间隔T,将间隔<T的数据作为一个数据包,在定时器中进行数据处理。通过调试发现,计算机的CPU速度越快,数据包越小,数据处理函数则越简单,而时间间隔T可设的值也越小,数据包连续串口通信的效果也就越好。This paper designs a simple method for continuous packets transmission in serial port communication in MFC. This method applies MSComm control provided by Microsoft, models on MODBUS-RTU protocol, takes data whose time interval is less than T as a packet data, and processes the data in the timer. Debugging shows that the faster the CPU of computer, the smaller packets and the simpler data processing function are, and the smaller value of time interval can be set. This means the result of continuous packets transmission in serial port communica- tion will be better.

关 键 词:MFC MSCOMM 串口通信 数据包 

分 类 号:TP391[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象