摘 要
单片机在多功能数字钟中的应用已是非常普遍的,人们对数字钟的功能及工作顺序都非常熟悉。但是却很少知道它的内部结构以及工作原理。由单片机作为数字钟的核心控制器,可以通过它的时钟信号进行实现计时功能,将其时间数据经单片机输出,利用显示器显示出来。通过键盘可以进行校时、定时等功能。输出设备显示器可以用液晶显示技术和数码管来显示技术。
本系统利用单片机实现具有计时、校时等功能的数字时钟,是以单片机AT89C51为核心元件同时采用LED数码管显示器动态显示“时”,“分”,“秒”的现代计时装置。与传统机械表相比,它具有走时精确,显示直观等特点。另外具有校时功能,秒表功能,和定时器功能,利用单片机实现的数字时钟具有编程灵活,便于功能的扩充等优点。
关键词:数字钟系统; 单片机; LED液晶显示器
Digital clock system
Abstract
SCM in multi-function digital clock in the application is already very common, people on the digital clock function and are very familiar with the work order. But very few know that its internal structure and working principles. SCM as a digital clock from the core controller, it can achieve the clock signal timing, its time data by the MCU output, use of monitors displayed. Keyboard can be carried out at the school, timing, and other functions. Output devices can be used liquid crystal display monitors and digital technology to display the technology.
The system uses MCU with time, the school features such as the digital clock, SCM AT89C51 is also used as the core components of the LED digital display dynamic display "when" and "points" and "seconds" of the modern time device . Compared with the traditional mechanical watches, it has a precise path that intuitive, and other characteristics. In addition a school function, stopwatch function, and the timer function to achieve MCU use of the digital clock with programming flexibility to facilitate the expansion of functional advantages.
Key words: digital clock system; SCM; LED LCD Monitor
目录
设计任务书………………………………………………………………………….………I
摘要…………………………………………………………………………………….……III
ABSTRACT…………………………………………………………………………….……IV
1. 系统方案…………………………………………………………………………….…..I
系统概述设计任务书……………………………………………………….……………I
摘要……………………………………………………………………………….…….……III
ABSTRACT…………………………………………………………………………………..IV
1. 系统方案………………………………………………………………………….………1
1.1 系统概述………………………………………………………………….…………1
1.2 方案论证…………………………………………………………………………….1
1.3 扩展功能…………………………………………………………………………….2
2. 设计过程………………………………………………………………………………….2
2.1 设计原理………………………………………………………………………… …2
2.2 所需元器件……………………………………………………………………….…2
3. 电路与程序………………………………………………………………………….…….2
3.1 电路设计……………………………………………………………………………2
3.2 程序设计……………………………………………………………………………3
3.2.1 程序流程图………………………………………………………………….3
3.2.2 主要程序分析……………………………………………………………….7
参考文献……………………………………………………………………………6
4. 总结体会…………………………………………………………………………………..16
1、系统方案
1.1 系统概述
本系统可模拟电子时钟,实现时钟,秒表,倒计时定时器功能,主从CPU数据处理、键盘控制与数据显示。主控系统能响应按键,并对其进行相应的处理,再把其对应的结果数据在数码管LED上显示。
具体设计基本任务是:
1.用LED数码管显示时间,且能显示时、分、秒的24小时制的数字钟。
2.具有校时功能,具体方法:设置三个按钮,其中两个按钮分别对“时”、“分”进行校时,另一个按钮则实现对“秒”位清零
系统结构框图如图1.1所示:
CPU主机 |
键盘控制数码管显示 |
数码管显示 |
开关控制数码管显示形式 |
图1.1