目 录
摘要 ...................................................................... III Abstract .................................................................... V 第一章 串行通信的介绍 ...................................................... 1
1.1 串行通信方式 ........................................................ 1 1.2 串行通信的传送方向 .................................................. 2 1.3 串行输入/输出 ....................................................... 2 1.4 串行接口标准 ........................................................ 2 第2章 串口编程技术 ......................................................... 5
2.1 串口实现双机互联系统功能概述 ........................................ 5 2.2 VB串口查询法的实现方法 .............................................. 5 第3章 SPCP通信协议设计 .................................................... 9
3.1 串行通信协议 ........................................................ 9 3.2 SPCP协议的发送格式 ................................................. 13 第4章 双机互联程序的实现 .................................................. 15
4.1 创建标准的项目文件 ................................................. 15 4.2 加入串口通信控件 ................................................... 15 4.3 设计程序主窗体 ..................................................... 16 第5章 程序的测试与运行 .................................................... 21
5.1 软件及硬件测试 ..................................................... 21 5.2 总结 ............................................................... 24 附录 ....................................................................... 25
II
串口实现双机通信
摘要
计算机串口编程在通信软件中有着十分广泛的应用,如电话、传真、视频和控制等。很多行业会涉及到串口通信技术。串行通信中分为异步通信和同步通信两种基本串行通信方式,串行通信在两个设备之间传输,有单工、半双功、全双工三种形式。
在本论文中,串口实现双机互联是通过串口线直接连接两台计算机,按照自定义的串口通信协议(简称为SPCP)进行信息交换。通过VB中MSComm控件处理底层串口通信细节,根据自定义串口通信协议建立连接,实现聊天和文件传输功能。
关键字:VB,串口通信,SPCP,数据交换。
III
IV
serial communication
Abstract
Serial computer programming in the communications software has a very wide range of applications, such as telephone, fax, video and control. Many industries would involve serial communication technologies. Serial communication is divided into asynchronous communications and synchronous communication are two basic serial communication, serial communication between the two transmission equipment, a single-workers, half-duplex, full-duplex three forms.
In this paper, to achieve double-serial-line Internet directly through the serial port to connect two computers, in accordance with the custom of serial communication protocol (referred to as SPCP) for information exchange. VB MSComm control through treatment in the bottom of serial communication details, according to custom serial communication protocol to connect, and chat and file transfer feature.
Keyword: VB, serial communication, SPCP, data exchange.
V
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库基于spcp技术串口实现双机通信在线全文阅读。
相关推荐: