1、单片机实习报告书 I 摘要摘要 本设计是应用 MCS-51 单片机的原理和控制理论设计一个多功能系统,功能 包括矩阵键盘输入,键盘内容显示,温度传感器操纵,温度显示,并实现双机通 信以显示同样的内容。硬件系统包括单片机最小系统, ISP 下载模块,矩阵键盘, 独立键盘,温度传感器模块,数码管,流水灯等。除了课设规定的要求外,还加 入一些有趣的扩展功能,如:利用 led 灯指示单片机工作状态,从机普通模式、 空闲模式可选,用于节电。通过设计,加深对 51 单片机的理解,掌握实际的应 用,增强动手能力。 设计包括硬件设计、软件编程,仿真,制作实物,撰写报告等步骤。 关键词关键词: 51 单片机单片
2、机 多功能系统设计多功能系统设计 单片机编程单片机编程 单片机实习报告书 II Abstract This design is the application of the principle of the MCS-51 microcontroller and control theory to design a multi-functional system features include the matrix keyboard input, keyboard content display and manipulation of temperature sensor, temperatu
3、re display, and dual-machine communication in order to display the same content. The hardware system including the minimum microcontroller system,ISP download module, matrix keyboard, separate keyboard, the temperature sensor module, digital tube, LED. In addition to the specified class-based requir
4、ements, but also added some interesting extended features, such as: the use of led lights indicating microcontroller working condition, optional from ordinary machine mode, idle mode, for power saving. This design is due to deepen the understanding of the 51 microcontroller design, mastering practic
5、al applications, and enhancing the practical ability. The design includes hardware design, software programming, simulation, making hardware, writing reports and other steps. Keywords: 51 microcontroller, multi-functional system design,microcontroller programming 单片机实习报告书 3 目录目录 摘要.I Abstract II 目录
6、3 一 项目要求与说明 . 4 二 方案论证 . 5 三 硬件电路设计 5 1 MCU 控制器简介 . 5 2 单片机最小系统. 6 3 矩阵键盘 . 6 4 DS18B20 温度检测电路 . 7 4.1 DS18B20 温度传感器特性 . 7 4.2 DS18B20 操作时序 . 8 5 数码管显示电路. 10 6 流水灯. 10 7 串行口电路.11 四 软件设计 . 12 1 系统软件开发工具 . 12 2 系统流程图 12 2.1 主机程序流程图 12 2.2 从机程序流程图 13 3 软件编程 . 13 4 软件实现功能说明 . 14 4.1 主机矩阵键盘功能. 14 4.2 从机独立键盘功能. 14 五 仿真分析 . 15 1 数据输入与显示功能仿真. 15 2 温度检测与显示功能仿真. 16 3 数据通信功能 16 六 心得体会 . 17 参考文献. 18 附件 A 单片机系统原理图 . 19 附件 B 单片机系统实物. 20 附件 C 主机程序 . 21 附件 D 从机程序 . 32 单片机实习报告书 4 一一 项目要求与说明项目要求与说明 1)完成完成包含如下系统功