1、目录目录 摘要 .2 Abstract 3 实习任务说明 .4 1 基本原理简介 .5 1.1 STC89C52 结构功能介绍 .5 1.2 基于单片机的数字频率计基本原理6 2 方案论证 .7 2.1 数字时钟方案 .7 2.2 数字温度计方案7 2.3 数字频率计方案7 3 硬件设计 .9 3.1 单片机最小系统9 3.2 矩阵键盘电路 .9 3.3 显示电路 10 3.4 数字时钟电路 . 11 3.5 温度采集电路 . 11 3.6 串口通信 12 3.7 数字频率计电路12 4 软件设计 .14 5 系统仿真 .17 5.1 矩阵键盘数码管显示仿真17 5.2 DS1302 数字时钟
2、仿真 17 5.3 DS18B20 数字温度计仿真 18 5.4 数字频率计仿真18 6 实物调试 .20 7 结果分析与总结 .22 参考文献 .23 附录(一) 整体电路原理图 .24 附录(二) 程序清单 .25 2 摘要摘要 单片微型计算机简称为单片机,又称为微型控制器,是微型计算机的一个重 要分支。随着电子技术的发展,大规模、超大规模集成电路和制造工艺的进一步 提高,单片机以其高可靠性、高性能比、低电压、低功耗等一系列优点,广泛应 用于工业控制系统,数据采集系统,智能化仪器仪表等领域。 本次实习基于 STC89C52RC 单片机的控制系统及相关软件设计平台, 完成了矩 阵键盘扫描、数
3、码管显示、DS1302 数字时钟、DS18B20 温度传感及数字频率计外 围电路的功能仿真实现及硬件设计制作。 关键词:单片机 外围电路 仿真 硬件设计 3 Abstract Single chip computer referred to as a single-chip microcomputer, also known as micro controller, it is one of the important branchof miniature computer. With the development of electronic technology, large scale
4、integrated circuit and manufacturing process further improved, and single chip microcomputer with its high reliability, high performance ratio and low voltage, low power dissipation and so on a series of advantages,itis widely used in industrial control systems, data acquisition system, intelligent
5、instruments, etc. The work of the STC10F04 based on minimum system, the completion of the matrix keyboard, digital-display, digital clock and alarm clock, thermometer and Frequency meterdesign production. The work is based on STC89C52RC MCU control system and related software design platform, It is
6、completed that the function of the buffer circuit simulation and hardware design and production of the matrix keyboard scan, digital tube display, DS1302 digital clock, and the temperature sensor DS18B20 and digital frequency meter. Keywords:MCU peripheral circuit simulation hardware design 4 实习任务说明实习任务说明 (1)利用上述材料完成单片机最小系统的设计、焊接、调试; (2)完成 ISP 下载电路的设计、焊接; (3)完成应用系统扩展电路部分的设计、焊接、调试,应用系统扩展电路的 具体要求如下: 1)键盘、显示电路 利用单片机最小系统、6 个 7 段 LED 数码管、12 个按键,设计制作一个键盘、 显示电路。 可以使用 8279 键盘显示接口电路, 也可以使用单片机的并行接口作为