单片机串口通信毕业论文.doc
单片机串口通信毕业论文,目录摘要iabstractii1 绪论11.1本课题选取的目的及意义11.2 目前国内外本课题研究状况21.3 本文的主要工作32串行通信理论的有关概念52.1 通信52.2 通信参数62.3工作模式62.4 同步通信与异步通信73 几种常用串行总线协议及方案选取83.1 iic总线传输协议83....
内容介绍
此文档由会员 huangbinbest 发布单片机串口通信毕业论文
目录
摘要 I
Abstract II
1 绪论 1
1.1本课题选取的目的及意义 1
1.2 目前国内外本课题研究状况 2
1.3 本文的主要工作 3
2串行通信理论的有关概念 5
2.1 通信 5
2.2 通信参数 6
2.3工作模式 6
2.4 同步通信与异步通信 7
3 几种常用串行总线协议及方案选取 8
3.1 IIC总线传输协议 8
3.2 SPI总线传输协议 11
3.3 串口通信传输协议 13
3.3.1 80C51单片机的串行口的结构 13
3.3.2 80C51串行口的控制寄存器 13
3.3.3 80C51单片机串行口的工作方式 14
3.4 方案选取 17
4 主从通信系统设计 18
4.1 硬件原理图设计 18
4.2 软件的编写 19
5主从式总线通信系统仿真 22
6 论文总结 24
致谢 25
参考文献 26
附录 27
摘要
在要监控的范围较大或监控点数较多的情况下,就需要把监控工作分散进行,而把监控结果集中管理。这就是所谓的分布式监控。而分布式监控比较常用的一种通信方式就是主从式通信了。本文介绍了一个单片机做主机,两个单片机做从机的小型主从式总线通信系统的设计与实现。系统不仅实现了主从机之间的通信,而且实现了从机之间的通信。
本文以主从式通信系统的分析与设计为主线,首先了解串行通信理论的有关概念,由此引出了多台设备间的串行通信模式,并提出了一个按总线方式将多个RS-232的发送端并联的可行方案。同时也介绍了单片机之间的串行通信设计。主从式通信的程序由两部分组成,一部分是主机的串行通信程序,别一部分是从机的串行通信程序。因此要设计一个协议管理主从机之间的通信。
通信协议的设计主要解决了以下几个问题:1.对于主从式通信系统的设计通过通信协议进行管理,可以对主从机之间的通信进行规范化管理,使整个系统不会陷入混乱通信之中。2.设计了主机向从机发送通信方式的命令格式,从机向主机发送反馈命令的格式,以及通讯握手和发送/接收的具体处理流程
关键字:主从式,多机通信,RS-232串行数据通信
Abstract
As large number of observation points are monitored simultaneously,each of the tasks can be controlled through a distributed control system in order to focus on the result of observation. This is called the Distributed Monitoring. The distributed control is commonly used as a way of master-slave communication. This article describes a microcontroller to be the host and two small microcontroller to be the slave and by this way to design a master-slave bus communication system. System not only realizes the communication between master and slave, but also realizes the communication between the slaves.
This thesis focused on analysis and design of a communications plan for a distributed monitored control system.In the beginning the application background and the layout of the devices are introduced,this leads to the serial communication mode between multiple-device.After the introduction a feasible way to let several RS-232’s TXDbe in parallel via bus is described. Also introduced the design of serial communication between MCU.
Communication protocol designed mainly to solve the following problems:first,for the master-slave communication system design management through communication protocols can be standardized management the master slave communications.By this way, the whole system will not into chaos communications.second, Design of the host machine to send a communication from the command format, feedback from the machine to send commands to the format of the host ,Communication handshake and send / receive the specific processes
Key Words: Master-slave mode, Muliple-computer communication, RS-232 serial date communication