1、 摘摘 要要 多功能数字钟的应用非常普遍,由单片机作为数字钟的核心控制器,通过它 的时钟信号进行实现计时功能,将其时间数据经单片机输出,利用显示器显示出 来。本设计具有计时、校时等功能的数字时钟,是以单片机 AT89C51 为核心元件 同时采用 LCD 显示器动态显示“时”、“分”、“秒”、“年”、“月”、“日” 的现代计时装置。另外具有校时功能,秒表功能,和定时器功能,利用单片机实 现的数字时钟具有编程灵活,便于功能的扩充等优点。 关键词关键词:多功能、AT89C51、LCD Abstract The application of multi-function digital clock v
2、ery general, by single chip microcomputer as the core controller, digital clock through its clock signal timing function, will realize its time data SCM outputs, using monitors displayed. This design has the timing, reset function of digital clock, is single-chip microcomputer AT89C51 as the core el
3、ement also adopts LCD display dynamic display “hour“ minutes“ and “second“, “year“, “month“, “day“ modern timing device. Another is reset function, stopwatch function, and timer function, using the microcomputer digital clock with programming flexible, facilitate function expansion, etc. Keywords: m
4、ulti-function, AT89C51, LCD 目 录 摘 要 . 1 Abstract 1 一、设计意义和方案 3 1.1 任务要求 3 1.2 设计意义 3 1.3 设计方案 3 二、硬件设计. 4 2.1 单片机的介绍及特点 4 2.1.1 单片机的特点 . 4 2.2 单片机选择 5 2.2.1 单片机的引脚说明 . 5 2.2.2 定时/计数器 8 2.3 显示方案 8 2.4 时钟电路 9 2.5 复位电路 9 三、软件设计10 四、仿真原理图 11 五、系统测试 11 5.1 硬件测试. 11 5.2 软件测试.12 六、总结.12 参考文献.13 附录14 程序完整代码.14 一、设计意义和方案 1.1 任务要求 通过单片机内定时器控制走时,准确持续走时,调时不影响走时。 在 LCD 液晶显示屏上显示时、分、秒及两个小数点。 含有闹钟功能,可以选择闹钟开关,可以设定闹铃时间。 到达闹钟时刻蜂鸣器警报,可以关掉警报。 1.2 设计意义 用单片及制作数字钟是单片机的一个典型应用。 数字钟是采用数字电路实现 对“时、分、秒” 数字显示的计时装置,