1、 I 多功能电子时钟 摘 要 本文是基于 AT89C52 单片机数字钟的设计, 通过多功能电子时钟的设计思路, 详细叙述了系统硬件、软件的具体实现过程。 论文重点阐述了电子时钟硬件中 MCU 模块、时钟模块和键盘模块、显示模块 等的模块化设计与制作;软件同样采用模块化设计思路,包括中断模块、闹钟模 块、时间调整模块的设计,并采用 C 语言编写实现。本设计实现了时间与闹钟的 修改功能,年、月、日和星期的显示功能。并且通过对比实际的时钟,查找出了 误差的来源,确定了调整误差的方法,尽可能的减少误差,使得系统可以达到实 际数字钟的允许误差范围内。本文还涉及到非接触止闹功能,在有效范围内使用 者不需用
2、手去寻找开关而关闭闹钟,该功能使本设计更具有人性化。该时钟还有 重要日子倒计时功能,能够提前几天设定好时间,以避免遗忘重要日子。 关键词:AT89C52 单片机,电子时钟,模块化设计,C 语言 II Multifunctional electronic clock ABSTRACT This article is based on AT89C52 microcontroller digital clock design, through multi-functional electronic clock design ideas, detailed description of the sys
3、tem hardware and software realization process. Paper focuses on the electronic clock hardware MCU module, clock module and keyboard module, display module, modular design and production; software as a modular design concept, including an interrupt module, alarm module, module design time to adjust a
4、nd adopt the C language implementation. The Design and Implementation of the changes of time and alarm functions, year, month, day and week display. And by comparing the actual clock, find out the source of the error, the error method to determine the adjustment, as much as possible to reduce the error, allows the system to achieve the actual number of minutes of allowable error range. This also involves the function of non-contact only trouble in the effective range of users do not need a ha