文档详情

单片机串行通信功能设计 毕业论文.doc

发布:2016-05-08约字共33页下载文档
文本预览下载声明
单片机串行通信功能设计 摘 要 现代的单片机测控系统中通常以PC机作为控制中心,单片机将采集到的数据通过串口送给PC机进行各种处理,为保证数据传送的及时性和正确性,就必须建立可靠的通讯。在开发控制系统时,信号的测控及采集均由单片机系统自行完成,然后通过异步串行通信口将信号实时地传送给PC机进行处理。上位PC机使用VB进行串口通信的编程,下位单片机使用C51进行编程。本文详述了使用VB和C51实现PC机和单片机串行通信的开发方法,并简要地介绍了VB通讯控件及其使用方法,给出了调试程序。采用将置于现场MCS一51单片机应用系统挂在主机PC的串行通信上,通过串行通信电路及系统控制软件与PC机和单片机进行数据交换的方式,实现了对现场数据的接收与发送。串行通信系统主机采用标准接口。该系统的通信是由PC机主动进行发信访问,各个MCS一51单片机处于被动通信状态对PC机与单片机数据通信的校验采用奇校验方式。 关键词: 串行通信; VB程序设计 Abstract Modern microcontroller measure-control system usually regard PC as the control center, the microcontroller will send the collected data to a PC for a serial port, to ensure that the transmission of all the timeliness and accuracy data, It must establish reliable communication. In the development of the control system, signal control and collection of microcomputer system itself, then through asynchronous serial communication to the real-time signal transmitted PC.PC using VB programming for serial communication, SCM C51 use for programming. The paper describes using VB C51 and PC machine and MCU development method of serial communication, and briefly introduces the method of using VB communication control is presented, and debugging. Using placed on site MCS a 51 SCM system in the PC host hanging on the serial communication, through serial communication circuit and control system software and PC and MCU exchange data on site, receiving and sending data. Serial communication system is using standard interface host. The system of communication by the PC is active on a visit each MCS kindhearted passive communication 51-series microcomputer. For PC and calibration adopts single-chip data communications parity. Keywords: Single Chip; Serial communication; VB program design; Host computer 目 录 第一章 绪论 1 1.1 单片机技术介绍 1 1.2 课题背景与意义 2 1.3 课题研究内容 3 第二章 串行通信基础 4 2.1串行通信协议 4 2.2通信方式 5 2.2.1串行通信 5 2.2.2并行通信 6 2.3串行通信方式 6 2.3.1异步串行通信方式 6 2.3.2同步串行通信方式 7 2.4串行通信的制式 8 2.4.1单工 8 2.4.2半双工 8 2.4.3全双工 9 2.5波特率 9 2.6串行通信的错误校验 10 2.6.1奇偶校验 10 2.6.
显示全部
相似文档