1、 I 目目 录录 摘 要 1 Abstract 2 1 设计原理与方法. 3 1.1 硬件设计原理 3 1.2 程序的结构化设计方法 4 2 硬件电路及其说明 6 2.1 显示电路单元 6 2.1.1 74HC573 资料 6 2.1.2 数码管显示电路 7 2.1.3 显示电路原理图及其说明. 8 2.2 矩阵键盘单元 9 2.2.1 矩阵键盘的原理与检测方式. 9 2.2.2 矩阵键盘电路部分及其说明 10 2.3 单片机最小系统及外围电路 10 2.3.1 MAX232 资料 11 2.3.2 RS232 接口. 12 2.3.3 STC89C52. 13 2.3.4 复位电路 15 2
2、.3.5 振荡电路 15 2.3.6 串口电路 16 2.3.7 最小系统原理图 17 3 仿真软件介绍. 18 3.1 程序设计软件 Protel 18 3.2 程序编写软件 Keil 18 3.3 程序仿真软件 Proteus 18 4 仿真电路测试19 5 实物图及其调试 20 6 小结与体会 22 7 参考文献 23 附录 1:C 语言源程序 . 24 附录 2:元件清单. 34 附录 3:单片机实习日记. 35 1 摘要 单片计算机即单片微型计算机。由 RAM ,ROM,CPU 构成,定时,计数和多 种接口于一体的微控制器。它体积小,成本低,功能强,广泛应用于智能产业和 工业自动化上
3、。而 51 系列单片机是各单片机中最为典型和最有代表性的一种。 这次课程设计通过对它的学习,应用,从而达到学习、设计、开发软、硬的能力。 本次课程设计包括 STC89S52 单片机最小系统包括复位和时钟电路及供电系 统、44 矩阵键盘、独立 6 个 8 段 LED 数码管显示电路。利用相关设计软件进 行原理图设计即利用 Keil 软件编程以及 Proteus 软件仿真来巩固单片机应用、 模拟电路、数字电路课程及学会各种工程软件的使用。 关键关键字:字:单片机 最小系统 矩阵键盘 LED 显示 2 ABSTRACT Single chip computer is the single chip
4、computer. By RAM, ROM, CPU constitute, time, count and multiple interface in the integration of micro controller. Its small size, low cost, the function is strong, widely used in intelligent industry and industrial automation. And 51 series microcontroller is the most typical and various microcontro
5、ller most representative one. This curriculum design through to its study, application, thus achieved the study, design, development, soft and hard ability. The curriculum design, including STC89S52MCU minimum system ( including a reset and clock circuit and power supply system ),4 x4 matrix keyboar
6、d, the independent 6 LED digital tube display circuit . Using circuit design software schematic design, using Keil software and Protues software simulation, we consolidate the MCU application, analog circuit, digital circuit course and learn all kinds of engineering software use. Key Words:MCU minimum system matrix keyboard LED digital tube display 3 1 设计原理设计原理与方法与方法 1.1 硬件硬件设计原理设计原理 本次课程设计是基于 MCS-52 单片机的扩展设计,利用 52 单片机为核心,根 据课程设计的要求先编写程序并在开发板上进行调试, 调试成功之后再进一步设 计硬件电路,最后将硬件电路和编写的程序结合实现