基于VC++串口通信的实现

上传人:飞*** 文档编号:39857263 上传时间:2018-05-20 格式:DOC 页数:50 大小:2.07MB
返回 下载 相关 举报
基于VC++串口通信的实现_第1页
第1页 / 共50页
基于VC++串口通信的实现_第2页
第2页 / 共50页
基于VC++串口通信的实现_第3页
第3页 / 共50页
基于VC++串口通信的实现_第4页
第4页 / 共50页
基于VC++串口通信的实现_第5页
第5页 / 共50页
点击查看更多>>
资源描述

《基于VC++串口通信的实现》由会员分享,可在线阅读,更多相关《基于VC++串口通信的实现(50页珍藏版)》请在金锄头文库上搜索。

1、 毕业设计(论文)题 目:基于 VC+串口通信的实现系 : 电子信息 专 业: 电子信息科学与技术 学生姓名: 朱万里 学 号: 200820101202 指导教师: 刘晓丽(老师) 2012 年 5 月 1 日II摘 要随着科学技术的发展,计算机应用于信息处理的优越性愈来愈明显,世界将由于信息广泛、迅疾的传递而变小。随着现代信息技术的发展以及计算机网络的广泛应用,计算机通信技术已经日趋成熟,串口通信作为一种灵活、方便、可靠的通信方式,被广泛应用于工业控制中,用 PC 机对工程实现实时监控,通常要求 PC 机能在用户界面上具有数据采集、数据处理以及控制信号的产生与传输等功能。同时串行通信还应用

2、于交通控制、分布数据采集系统、通信距离扩展、电力系统数据采集与控制系统、高速公路收费系统、远程控制、保密通信系统和教学实验等等。在数据通信、计算机网络以及工业上的分布式控制系统中,经常需要采用串行通信来达到远程信息交换的目的。当控制计算机与各数控机床相距较远时,一般采用串行通信方式而不采用并行通信方式。这是因为并行通信系统的造价较高、众多的连线不仅容易引入干扰,也容易发生线路故障。串行通信由于接线少、成本低,在数据采集和控制系统中得到了广泛的应用,控制系统中常用的串行通信一般采用 RS-232 串行总线标准,RS-232 是 PC 机与通信工业中应用最广泛的一种串行接口。经过认真考察、分析和论

3、证,在综合考虑各种需求后,我设计了一种能够充分说明串行通信的特点,以及用到了 RS-232 这种最早的串行通信接口的一套在比较艰苦或者不方便的情况下没有网线的时候进行的双机通信系统,在遵守串行通信的基本特点和 RS-232 的基本接口规则下设计了此系统,WINDOWS 下双机点到点的串行通信系统是一个典型的通信系统,它是我们为了实现计算机底层的工作,以及为了用户更好地和系统能够直接相连而提出来的。经过分析我使用了 RS-232C 为接口线路以及 Microsoft 公司的 Visual C+ 6.0 作为开发工具,利用其提供的各种面向对象的开发工具来开发的系统。论述了采用自顶向下的设计方法,模

4、块化设计思路,逐层剖析,进行可行性研究,需求分析,总体设计编码和调试,其开发主要包括数据的发送与接收等方面。形成用户满意的可行系统。引言部分说明了问题的提出:总体开发规则,介绍了一个信息系统的研制过程,WINDOWS 下双机的串行通信系统的简介以及 WINDOWS 下双机点到点的串行通信系统的用户需求。另外讲了 WINDOWS 下双机的串行通信系统的设计基础;课题的意义;串行通信接口以及使用的程序软件Visual C+ 6.0。具体描述了 WINDOWS 下双机的串行通信系统的分析与设计,包括程序模块图,封面设计,主界面设计,主程序调用配置对话框,配置对话框设计等等。接下来讲述了 WINDOW

5、S 下双机的串行通信系统的实现、调试与使用:实现的方法,调试过程中的问题等等。最后进行了总结,当前系统的优点和不足,以及相关知识的展望。本系统具有友好的图形用户界面,在 WINDOWS 98 或 WINDOWS 2000 下的 Visual C+ 6.0 环境下调试成功。关键词: RS-232 串行通信 单线程 多线程ABSTRACTABSTRACTWith the development of science technology, the superiority of computers In processing information is becoming more and more

6、 obvious.And the world is smaller and smaller because of the wide and quick delivery of information.With modern information technology rapidly developed and computer Network widely used, communication technology of computers has been mature with each passing day. As a flexible,convenient and reliabl

7、e method of Communication,serial communication is extensively used in industrial control.using PC to keep watch on projects synchronously calls for the functions of signals in users interfaces. At the same time,serial communication is also used in many other way,such as transporation control, collec

8、ting system of distributive date,expanding the communication distance and so on.In date communication, computer network and distributive controlling system in industry, it usually needs serial communication to achieve the purpose of long-distance exchange of information. When there is a long distanc

9、e between computers and date-controlling machine tools,serial communication is used instead of parallel communication.thats is because the cost of parallel communication system is high and so many wires easily cause disturbance and wire breakdown . So serial communication system is widely used in wi

10、dely used in data-collecting and data-processing just because its low cost and fewer wires. Serial communication of controlling system uses RS-232, which is the most popular interface in computers and communication industry.According to some observation,analyses, demonstrations and consideration of

11、different needs,we design a communication system of two computers which can fully represent the characters of serial communication,using the earliest interface RS-232.This system can be used in arduous circumstances or inconvenient circumstances without network wires. We put forward the serial commu

12、nication syetem of two computers in WINDOWS, which is a typical communication system for the purpose of carring out the work of rock-bottom and connecting users and system straight.After some analyses,the author exploits the system by using RS-232 as interface, criterion and Visual C+6.0 of Microsof

13、t which provides many kinds of oriented objects as development tool,and makes the practicable system which contains the transmission and reception of date by adopting the top-down design method, modularized design thought,and carrying out feasibility study,demand analysis and overall design of codin

14、g and debug. Then the feasible system satisfied by users comes into being.The introduction is about the general rules of development,introducing the designing process of the communication system, serial communication system in WINDOWS 95 and the usersdemand.The following is about the designing base

15、of the serial communication system by two computers in WINDOWS and the soft-ware Visual C+6.0.The next is about the analyses and design of the serial communication systerm and how to adjust and use the serial IVcommunication system.The last is a summary about the advantages and disadvantages of the

16、system and prospects of interrelated knowledge.This system has a friendly usersinterface and can run successfully in WINDOW 98 and in Visual C+6.0 in WINDOWS 2000.Key Words: RS-232 serial communication serial-port based protocal, multithreaV目 录摘 要 IAbstract III1 引言 12 串口通信的原理分析与设计 22.1 串行通信基本概念 22.2 串口硬件设计 32.2.1 系统配置要求 32.2.2 基于 WINDOWS 的 VC+串行通信编程 32.2.3 串口应用设计流程 42.2.4 WINDOWS 下双机的串行通信系统的分析 52.2.5 Windows

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号