串口通信软件设计.doc

约64页DOC格式手机打开展开

串口通信软件设计,5万字63页有程序代码摘要 串行通信广泛应用于internet、电信、金融、工业控制、服务业、终端连线及其他应用领域,在不同的应用领域,串行通信可以与其他通信方式相结合、与access或mssql数据库相结合、与winsock通信相结合,方便的与sms模块、modem、rabbit 2000潜入式系统、plc通信程序、...
编号:45-4534大小:574.00K
分类: 论文>计算机论文

内容介绍

此文档由会员 王芸 发布

5万字 63页 有程序代码
摘 要
串行通信广泛应用于Internet、电信、金融、工业控制、服务业、终端连线及其他应用领域,在不同的应用领域,串行通信可以与其他通信方式相结合、与Access或Mssql数据库相结合、与WinSock通信相结合,方便的与SMS模块、Modem、Rabbit 2000潜入式系统、PLC通信程序、MATLAB环境等进行通信,所以研究基于windows的串口通信软件设计具有很强应用价值。
本文在研究异步串行通信软件以及通信协议的基础上,给出了基于windows的串行口通信软件设计,配合多线程的程序设计实现了串口通信和数据的实时采集,本文利用CSerialPort类进行串行通信,设计了直接和灵活地对串口控制操作的软件。CSerialPort类是由Remon Spekreijse提供的免费串口类,CSerialPort类支持线连接(非MODEM)的串口编程操作,编写的程序能在windows环境下很好的运行。并且CSerialPort类能方便的利用windows API对其进行扩展和改进,不但可以方便的实现基本串行通信功能,而且可以随意进行功能扩展。

关键词: 串行通信,异步通信,楼宇温度控制


ABSTRACT

Based on the study of asynchronous serial communication software and communication protocol,it give out a serial communication software design.Based on the windows and Real-time data acquisition. By using CSerialPort class Implement the serial communication and give a design of serial operating software CSerialPort is a free class provided by Remon Spekreijse which is support th serial programming operation well.It’s easy to Using windows API to upgrade.
Finally It made a building temperature control system, which connected temperature sensors and the central air-conditioning system through serial data bus. The whole system is simple and efficient.

KEY WORDS serial communication, asynchronous ommunication, building temperature control


目 录
第一章 串口通讯的概念、背景及意义
第二章 设计方案的选择和介绍
2.1常用串行通信软件设计方案
2.1.1利用MSCOMM控件
2.1.2利用WINAPI函数进行编程
2.1.3利用第三方串口通讯控件进行编写 11
2.2利用第三方CSerialPort类进行串口通信编程 12
2.2.1 CSerialPort类介绍 12
2.2.2 CSerialPort类的改进 12
2.3 利用CSerialPort类进行串行通信 15
2.4 小结 16
第三章 串行通信软件设计
3.1编制通信协议和设定软件流程图
3.2软件设计
3.3 VC下串行通信软件设计
3.4 小结与系统扩展
第四章 应用实例:楼宇温度控制系统
4.1 楼宇温度控制系统分析
4.2 系统详细设计
4.3 系统各模块介绍
4.4 数据中心程序设计
4.4.1数据中心与温度传感器通信
4.4.2数据中心与中央空调通信
4.4.3串行通信与TCP/IP相结合
4.4..4数据中心程序设计
4.5 小结
结束语
参考文献
致谢
附录一:修改后的CSerialPort类
附录二:程序核心代码