文档详情

PC机与单片机串行通信系统设计.doc

发布:2015-07-28约4.57万字共45页下载文档
文本预览下载声明
下载后全选后字体改为黑色则能看到全部内容 PC机与单片机串行通信系统设计 宗皛峰 (陕理工计算机科学与技术院(系)计算机科学与技术专业专升本051班,陕西 汉中 723003) 指导教师:李建忠 【摘要】 针对PC机和单片机在数据采集,工业控制中遇到的通信问题。我通过学习,运用串行通信的相关原理,设计了一种以RS-232总线为通信基础的计算机应用系统---PC机与单片机串行通信系统。本系统是以RS-232为接口线路,89s51及单片机学习板为硬件环境,Microsoft公司的Visual Basic作为软件开发工具,利用其提供的各种面向对象的开发工具及串行通信控件MSComm来开发的。在系统的设计中采用模块化设计思路,逐层剖析,进行了用户的需求分析,总体的系统设计,并且进行了详细代码编写,在最后对系统进行了调试。系统主要可以完成PC机和单片机之间手动的数据发送,自动的数据发送,数据传输过程中的奇偶校验,单片机的按键触发,数码管显示等功能。本系统实现了PC机和单片机通过串行总线进行数据传输的功能,并且具有友好的图形用户界面,在现行的大部分系统下的Visual Basic环境均调试成功。 【关键词】 RS-232;串行通信;MSComm;PC机与单片机 Design of The Serial Communication System for PC and Singlechip Zong Xiao-Feng (Grade0,Class01,Major Computer Science and Technology,omputer Science and Technology Dept.,Shaanxi University of Technology,Hanzhong 72300,Shaanxi)Tutor:Li Jian-Zhong Abstract: Aim at the communication problem of pc and singlechip in industial control and date gathering. I have designed a communication system---the serial communication system for pc and singlechip. This system by using RS-232 as interface criterion, the 89s51 single chip as hardware environment. and Visual Basic 6.0 of Microsoft which provides many kinds of oriented objects as development tool, and makes the practicable system which contains the transmissions and reception of data by adopting the top-down design method, modularized design thought, and carrying out feasibility study, demand analysis and overall design of coding and debug. This system can transimitted data from pc to singlechip.The system has a friendly users’ interface and can run successfully in Visual Basic in most system. Key Words: RS-232; Serial Communication; MSComm; PC and Single Chip 目 录 引言 1 1概述 2 1.1 总体开发规则 2 1.2本文的研究内容 2 1.3 PC机与单片机串行通信系统的需求分析 2 1.3.1 PC机与单片机串行通信系统的简介 2 1.3.2 PC机与单片机串行通信系统的用户需求 2 2 PC机与单片机串行通信系统的设计基础 4 2.1 课题的意义 4 2.2串行通信接口 4 2.2.1 串行通信的数据格式 4 2.2.2 RS-232C接口标准简介 5 2.3 MSComm控件的介绍 7 2.3.1工作方式 7 2.3.2属性说明 7 3系统硬件设计 10 3.1 系统组成结构简介 10 3.2系统部件功能表述 10 3.2.1 MCS-51单片机 10 3.2.2电平转换 11 3.2.3按键触发 11 3.2.4数码管显
显示全部
相似文档