摘 要: 由于电子技术的飞速发展和集成电路的不断更新,家用电子产品在人们生活中扮演着重要的角色。广泛地应用于我们生活的各个方面。其中电子钟最为常见。根据电子市场的调查,它们都存在几个共同的缺点,比如走时误差大、外观过于传统、不能夜视等。为了有效解决上述问题。我们设计了一款以STC89C52单片机作为控制芯片,DS1302为走时依据,并且采用led灯和数码管相组合的计时方式的旋转流动电子钟。总体来说具有以下三个功能:1.整点报时。2.两路闹钟。3.掉电继续走时。本时钟以60个发光二极管模拟传统时钟的秒针走时,正常运行时一秒点亮一个,60秒走完一圈。54391
毕业论文关键词:STC89C52,DS1302,旋转电子钟,掉电走时
Abstract: Due to the rapid development of electronic technology and integrated circuits constantly updated, home electronics in people's lives plays an important role. It’s widely used in all aspects of our lives. Electronic clock which is most common. According to the survey the electronic market, there are several common shortcomings, such as travel time error, look too traditional, not night vision. In order to effectively address the issue. We designed a chip with STC89C52 SCM control, DS1302 is based on travel time, and the use of mobile electronic clock led rotating lights and digital timing combined approach. In a word, it has the following three functions: First of all, chime on every hour. Then, two-way radios. Finally, power-down to go. The clock use 60 light-emitting diodes that simulate the traditional clock second hand walking, Every once in seconds, it can light a light-emitting diode, So, it needs sixty seconds to finish a lap.
Keywords: STC89C52, DS1302, Rotating electronic clock, Power down travel time
目录
1 引言 4
2 功能说明及操作方法 4
2.1 功能说明 4
2.2 具体操作说明 5
3 方案论证与设计 5
3.1 主控部分的方案选择 5
3.2 时钟芯片的方案选择 6
3.3 显示部分的方案选择 6
4 系统硬件电路设计说明 6
4.1 STC89C52RC单片机特点及引脚使用说明 7
4.2 DS1302时钟芯片的性能及引脚使用说明 9
4.3 CD4017译码器的功能及使用说明 10
5 原理图设计部分 11
5.1 数码管工作原理图 11
5.2 CD4017译码器工作原理图 12
5.3 蜂鸣器工作原理图 13
5.4 DS1302工作原理图 13
6 各部分程序的设计 14
6.1 主程序的设计 14
6.2 时钟芯片的程序设计 14
6.3 DS1302初始化函数 16
6.4 闹铃程序的设计 16
6.5 显示程序的设计 17
6.6 定时器1中断程序 18
结论 19
参考文献