单片机与PC机串行通信系统硬件及上位机程序设计方案.docVIP

  • 14
  • 0
  • 约1.21万字
  • 约 24页
  • 2017-11-14 发布于江苏
  • 举报

单片机与PC机串行通信系统硬件及上位机程序设计方案.doc

单片机与PC机串行通信系统硬件及上位机程序设计方案

随着计算机技术尤其是单片微型机技术的发展,单片机被广泛应用在工业控制系统中。单片机具有体积小、价格低廉、开发应用方便、可应用于恶劣工业环境的特点,在分布式控制系统中多采用单片机进行数据采集和现场控制。由于单片机的计算能力有限,难以进行复杂的数据处理,因此在功能复杂的控制系统中常采上位机下位机系统,单片机用作下位机进行数据采集和设备控制,而PC机用做上位机进行复杂的数据处理和对单片机的控制。因此如何实现PC机与单片机之间的通信具有重要的现实意义。 论文详细介绍了单片机与PC机通信的软硬件实现。在硬件设计中,单片机系统与PC机系统通过RS-232串行通信端口进行互连,单片机系统将由PC 机传输过来的数据信息动态的显示在LED数码管上。在软件设计中,采用Visual Basic 6.0中的MSComm通信控件设计PC上的串口通信程序。 关键词:单片机;串行通信;VB6.0;RS-232;LED数码管 Design of a serial Communication system between MCU and personal computer Abstract Along with the development of computer, especially the technology of MCU, MCU are widely used in the system of industry control. Small size, low price, the convenience of development and application and high adaptability are its peculiarities, respectiviely. It is usually used in distributed system to collect data and control on the scene. Owing to the limit of calculation, it is difficult to process complex data. Therefore, PC lower level computer system is often applied in functionally complex system. MCU collects data and control equipments as Downside machine, while PC makes complex data processing and the control of MCU. SO how to realize the communication between PC and MCU is practically meaningful. The essay introduces the communication between PC and MCU realized by soft and hard ware in details. IN design of hardware, MCU is connected with PC by the serial port of RS-232 and display the data passed by PC on the LED dynamically. In design of software, program of serial port are designed by MSComm communication control in the language of Visual Basic 6.0. Key Words: MCU; Serial Communication; VB6.0; RS-232; LED 目 录 1 引言 1 1.1 单片机与PC机串行通信研究背景 1 1.2 单片机与PC机串行通信研究目的和意义 1 2 串口通信基础 1 2.1 两种常用接口方式 2 2.1.1 并行接口 2 2.1.2 串行接口 2 2.2 RS-232串行接口标准 2 3 系统总体设计 3 3.1 系统指标设计 3 3.1.1 通信协议设定 3 3.1.2 系统实现描述 3 3.2 总体方案设计 3 4 硬件接口电路设计 4 4.1 主要芯片 4 4.1.1 AT89C51 4 4.1.2 单电源转换芯片MAX232 6 4.1.3 74LS245LED驱动芯片 7 4.2 LED显示器 7 4.2.1 LED显示器工作原理 8 4.2.2 LED显示器接口 8 4.3 系统设计 8 5 PC机程序设计 9 5.1 MSComm控件 9 5.1

文档评论(0)

1亿VIP精品文档

相关文档