目录
一 概述 ...................................................................................... 1
1.1 数字钟简介 .................................................................................................................. 1 1.2 数字钟的发展前景 .................................................................................................... 2 1.3 51 单片机 .................................................................................................................... 3 1.4 汇编语言 ...................................................................................................................... 3
二 课题设计功能要求及总体方案 ......................................... 4
2.1 功能要求 ........................................................................................................................ 4 2.2 设计总体方案介绍 .......................................................................................................... 4
三 数字电子钟硬件系统的设计 ........................................... 6
3.1芯片介绍 ............................................................................................................................. 6 3.2 硬件系统各模块功能简要介绍 .................................................................................... 10 3.3 数字钟原理图 ................................................................................................................ 11
四 数字电子钟软件系统的设计 ......................................... 12
4.1 数字电子钟使用单片机资源情况 ................................................................................ 12 4.2 数字电子钟软件系统各模块功能简要介绍 ................................................................ 12 4.3 数字钟软件系统程序流程框图 .................................................................................... 13
4.3.1 主程序流程框图 ............................................................................................... 13 4.3.2 键扫描子程序流程框图 ................................................................................... 14 4.3.3 显示子程序流程框图 ....................................................................................... 15 4.3.4 加1子程序流程图 ........................................................................................... 16 4.3.5 中断服务子程序流程图 ................................................................................... 16
五 仿真与误差分析 ............................................................. 18
5.1 数字电子钟的设计结论及使用说明 ............................................................................ 18 5.2 设计课题的仿真结果 .................................................................................................... 18 5.3 设计课题的误差分析 .................................................................................................... 20
心得 ............................................................................................ 21
单片机课程设计
参考文献 .................................................................................... 22 致 谢 ........................................................................................ 23 附 录 ........................................................................................ 24
1硬件原理图 .......................................................................................................................... 24 2仿真电路图 .......................................................................................................................... 25 3数字电子钟程序清单 .......................................................................................................... 26
单片机课程设计
摘要:数字钟广泛应用于生活生产中,对其深入了解很有必要,在此用单片机设计了一个简单的数字电子钟。
本设计为基于AT89S52单片机,辅以必要的外围电路,用自制单片机实验板设计了一个简单的数字电子时钟。在硬件方面,除了单片机外,用数码管来进行显示,LED采用动态扫描显示。通过LED能够比较准确显示时、分、秒,三个简单的按键实现对时间的调整。软件方面采用A51汇编语言编程。整个电子钟系统能完成时间的显示,调时,调分,调秒,复位功能。本次设计的电子钟带采用独立式键盘,用共阳数码管显示,因为LED亮度较高,显示醒目所以此电子钟在部分场所推广很大。
关键词 数字电子钟;AT89S52;汇编语言
ABSTRACT: Widely used in digital electronic clock production life, its understanding is necessary, in this single chip design with a simple digital electronic clock.
AT89S52 microcontroller based on the design, combined with the necessary peripheral circuits, a simple digital electronic clock. On the hardware side, in addition to SCM, the use of digital control for display, LED display using dynamic scanning. Can accurately through the LED display hours, minutes, seconds, three simple buttons to adjust the time to achieve. Software exchange with A51。The completion time clock system can display, transfer, the transfer points, transfer seconds, reset. The design of the electronic clock with the use of stand-alone keyboard, digital display with a total positive, because higher brightness LED, so this electronic clock display visible in some places a great promotion.
Key words digital electronic clock; AT89S52; assembly language
相关推荐: