1、 集散系统的设计与模拟集散系统的设计与模拟 Design and Simulation of Distributed Control System 申请学位: 工学学士学位 院 系: 计算机学院 专 业: 自动化 1 摘要摘要 该设计是一个基于串行通信的集散控制系统。 该集散控制系统由 PC 与 2 个单片机组成,其中 PC 作为上位机对单片机进行控制和监视,采用 Visual Basic 编制界面。两片 AT89C52 单片机作为下位机,用来接收上位机指令并实现相应 功能。通信基于 USB 通用串行总线标准,线路由 USB-hub 中转扩展。可以实现 PC 和单片机之间主从式半双工通信。本文
2、详细讨论了硬件电路的设计方法、主 从式通信协议设计方法、主机人机交互界面的设计方法、下位单片机驱动的设计 方法以及开发环境 keil uVision2、 Visual Basic6.0 的使用方法, 通过以上各种方法, 最终实现了 PC 对多个单片机的集散控制。 关键词关键词 PC;单片机;集散系统;通信 2 Abstract: This distributed control system based on serial communication protocol is composed of a PC and two MCUs. PC is used as master, whose i
3、nterface is programed by Visual Basic, and MCUs are used as slave so as to receive the single order from the master.The design of communication protocol and corresponding design of hardware and software of PC and multiple MCUs is described in the article. All the designs mentioned above get together
4、 to realize the DCS at last. This article also introduces how to use the editor softwares such as keil uVision2 and Visual Basic 6.0 .Some pictures and charts are given in order to make this article more vividly to read and more easily to understand. Keywords: PC;MCU;DCS;serial communication 3 目录目录 第一章第一章 序言序言 1 第二章第二章 系统总体设计系统总体设计 2 2.1 系统概述 2 2.2 系统概图 2 2.3 系统总体运行图 3 2.4 系统功能模块 4 2.5 系统设计步骤 4 第三章第三章 系统硬件设计系统硬件设计 5 3.1 硬件结构 5 3.2 上位机 PC 与 USB 集线器 . 5 3.3 芯片 PL2303 6 3.4 单片