基于51单片机的电子时钟设计
2017-07-08许珂乐
许珂乐



摘 要: 利用Atmel公司的IEEE1149.7仿真器对电子时钟进行开发,用实验板实现时间、日期、定时及其设定功能,详细对软件编程流程以及调试进行说明,并对计时误差进行分析及校正,提出了定时音与显示相冲突问题及解决方案。由于单片机具有低成本、高性能等特点,在自动控制产品中得到了广泛的应用。整个电路结构简单,可靠性能高,易于推广和移植,具有广阔的应用前景。
关键词: 单片机; IEEE1149.7仿真器; 电子时钟; C语言
中图分类号: TN79?34 文献标识码: A 文章编号: 1004?373X(2017)13?0175?03
Abstract: The IEEE1149.7 simulator developed by Atmel Company is used to develop the electronic clock. The test board is adopted to realize the functions of time, date and timing, and their setting functions. The software programming flow and debugging are described in detail. The timing error is analyzed and corrected. The problem that the timing sound is conflicted with the display, and its solution are put forward. Since the single chip microcomputer (SCM) has the characteristics of low cost and high performance, it is widely used in the automatic control products. The whole design has the advantages of simple circuit structure and high reliability, is easy to popularize and transplant, and has broad application prospect.
Keywords: single chip microcomputer; IEEE1149.7 simulator; electronic clock; C programming language
0 引 言
在日常生活和工作中常常用到定时控制,如扩印过程中的曝光定时等。早期常用的一些时间控制单元都使用模拟电路设计制作,其定时准确性和重复精度不是很理想,现在基本上都是基于数字技术的新一代产品,随着单片机性价比的不断提高,新一代产品的应用也越来越广泛。其功能强大、体积小、质量轻、灵活好用,配以适当的接口芯片,可以构成各种各样、功能各异的微电子产品。
随着电子技术的飞速发展,家用电器和办公电子设备逐渐增多,不同的设备都有自己的控制器,使用起来很不方便。这些具有人们所需的智能化特性产品减轻了人的劳动,扩大了数字化的范围,为家庭数字化提供了可能。根据这种实际情况,设计了一个单片机多功能时钟系统,它有基本的时间功能,还有秒表、闹钟功能,也可扩展为定时对家电等电气产品的自动控制,可以避免多种控制器的混淆,利用一个控制器对多路电器进行控制;……
