1、I 毕业设计毕业设计( (论文论文) )说明书说明书 课题名称:基于单基于单片机的电子片机的电子万年历设计万年历设计 院 (系) : 专 业: 班 级: 学生姓名: 学 号: 指导教师: II 摘摘 要要 电子万年历是一种应用非常广泛日常计时工具,对现代社会越来越重要。此电子万年 历在硬件方面主要采用 STC89C52 单片机作为主控核心,由 DS1302 时钟芯片提供时钟、 1602LCD 液晶显示屏显示。 STC89C52 单片机是由宏晶公司推出的, 功耗小, 电压可选用 4 6V 电压供电;DS1302 时钟芯片是美国 DALLAS 公司推出的低功耗实时时钟芯片,它可以对 年、月、日、星
2、期、时、分、秒进行计时,还具有闰年补偿等多种功能,而且 DS1302 的 使用寿命长,误差小;对于数字电子万年历采用直观的数字显示,数字显示是采用的 1602LED 液晶显示屏来显示,可以同时显示年、月、日、星期、时、分、秒等信息。此外, 该电子万年历还具有时间校准等功能。在软件方面,主要包括日历程序、时间调整程序, 显示程序等。所有程序编写完成后,在 Keil 软件中进行调试,确定没有问题后,烧写到 单片机上进行测试。 此设计主要由时钟芯片 DS1302 和温度传感器 DS18B20 采集数据到单片机进行处理再 通过 LCD1602 显示出来,本论文主要研究了液晶显示器 LCD 及时钟芯片
3、DS1302,温度传感 器 DS18B20 与单片机之间的硬件互联及通信,对数种硬件连接方案进行了详尽的比较,在 软件方面对日历算法也进行了论述。 关键词:单片机;DS1302;DS18B20;LCD1602 III Abstract Electronic calendar is a widely used tool for the daily time, more and more important in modern society. The electronic calendar in terms of hardware as the main control mainly STC89
4、C52 microcontroller core, provided by the DS1302 clock chip clock, 1602LCD LCD display. STC89C52 microcontroller by Hongjing introduced, the power consumption, voltage can be selected 4 6V voltage power supply; DS1302 clock chip introduced in the United States DALLAS low-power real time clock chip,
5、which can be year, month, day, week, hours, minutes and seconds time, but also has leap-year compensation, and other functions, and the DS1302s long life, small error; for digital electronic calendar using an intuitive digital display, digital display is used 1602LED LCD screen to display, you can a
6、lso shows year, month, day, week, hours, minutes, seconds and other information. In addition, the electronic calendar is also a time calibration and other functions. In terms of software, including calendar, time to adjust procedures, display procedures. All programming is completed, the Keil software debugging, make sure that no problem, programmed into the microcontroller for testing. This design mainly by the clock chip DS1302 temperature