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

  • 8
  • 0
  • 约2.87万字
  • 约 38页
  • 2018-09-26 发布于广西
  • 举报

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

PAGE XXXVII 单片机主从控制系统的软硬件设计 摘要:主从控制中,单片机的通信由上位机(单片机)控制。主机向各个从机发送命令或者接受从机反馈的信息,主机有权修改从机的参数,接受从机的数据,还可以查看从机的状态,可以说主机是主从控制的大脑。在本设计中主机用来监视或查看从机的状态,并向从机发送命令,在系统中起着主导地位。我们通过主机的界面可以看到继电器的状态,而且可以修改命令改变继电器组的工作情况。这种控制方式已经在工业中广泛的运用。从机在系统中处于从属地位,是命令的执行者。从机之间不能直接联系,它们之间必须有主机这个桥梁联系[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 Microcomputer Software And Hardware Abstract: In the master - slave control, single - chip microcomputer communication between single - chip computer control. Host sending commands 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 machines State.We can see through the host interface status of the relay, but you can modify the command 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 the command. No direct contact between machines, they must host this bridge between contacts [3]. In design we use the 89C51 single - chip computer as our host,RS485 communication 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 to complete a transfer. Due to transmission line using the differential channels, so its interference suppression - good, a

文档评论(0)

1亿VIP精品文档

相关文档