1 / 38
文档名称:

毕业设计(论文)-单片机主从控制系统的软硬件设计.doc

格式:doc   页数:38
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

毕业设计(论文)-单片机主从控制系统的软硬件设计.doc

上传人:3346389411 2013/2/28 文件大小:0 KB

下载得到文件列表

毕业设计(论文)-单片机主从控制系统的软硬件设计.doc

文档介绍

文档介绍:单片机主从控制系统的软硬件设计
摘要:主从控制中,单片机的通信由上位机(单片机)控制。主机向各个从机发送命令或者接受从机反馈的信息,主机有权修改从机的参数,接受从机的数据,还可以查看从机的状态,可以说主机是主从控制的大脑。在本设计中主机用来监视或查看从机的状态,并向从机发送命令,在系统中起着主导地位。我们通过主机的界面可以看到继电器的状态,而且可以修改命令改变继电器组的工作情况。这种控制方式已经在工业中广泛的运用。从机在系统中处于从属地位,是命令的执行者。从机之间不能直接联系,它们之间必须有主机这个桥梁联系[3]。
在设计中我们选用了89C51单片机作为我们的主机,从机也为89C51单片机(我们本着可得,性价比采用此选择)。RS485通信接口的信号传输是用两根线之间的电压表示逻辑1和0的。因为发送端两根传送线,而且接受接收端也是两根传送线,这样RS485接受和发送仅需要2根线就完成了传输。由于传输线采用了差动信道,所以它的干扰抑制性好,又由于它的阻抗低无接地问题。传输距离可高达1200m,传输速度可达1Mbps。比较上面的数据,考虑工业要求,我们采用了RS485方式。主从控制的下位机也为8051系列,我们采用的是89C51。89C51是一个低功耗、高性能的含有4k字节快擦可编程/擦除只读存储器的8位CMOS单片机。允许写入程序,在8051系列中,其最大的优点是性价比高。便于改写我们采用了飞利浦公司的8051产品[2]。
主机与从机间的通信协议采取自定义的方式。每一次通信以主机向从机发送一个命令帧开始,从机收到命令帧后,向主机回送一个响应帧。发送和接收以文本方式进行。
关键词:主从控制单片机 89C51 RS485 通信协议
Design Of Master - slave Control System In single-chip puter Software And Hardware
Abstract: In the master - slave control, single - chip munication between single - puter control. Host mands to individual machine or accept information from feedback, the host has permission to modify machine parameters, accept the data from the machine. In the design of the hosts to monitor or view from the machine's can see through the host interface status of the relay, but you can modify mand change relay group work. This method of control has been widely used in industry. From the machine in a subordinate position in the system, is the performer of mand. No direct contact between machines, they must host this bridge between contacts [3].
In design we use the 89C51 single - puter as our host,munication interface signal transmission is expressed as voltage between two lines because the end of the logical 1 and 0 two transmission lines, but also the receiving end are two transmission lines, RS485 accept and send only 2 wires required plete a transfer. Due to transmission line using the differential channels, so its interference suppression - good, also because of its low impedance grounding problem - free. Transmission distance up to 1200m, transfer r