1、 毕业论文设计 题 目: 基于单片机的数字万年历设计 学生姓名: 学生学号: 系 别: 电气信息工程学院 专 业: 通信工程 届 别: 指导教师: 成绩成绩 第 1 页 基于单片机的数字万年历设计 摘 要:本文借助电路仿真软件 Protues 对基于 AT89S51 单片机的电子万年历的设计方法及仿真 进行了全面的阐述。 该电子万年历在硬件方面主要采用 AT89C51 单片机作为主控核心, 由 DS1302 时钟芯片提供时钟、1602LCM 点阵液晶显示屏显示。AT89C51 单片机是由 Atmel 公司推出的,功 耗小,电压可选用 46V 电压供电;DS1302 时钟芯片是美国 DALLAS
2、 公司推出的具有涓细电流充 电功能的低功耗实时时钟芯片,它可以对年、月、日、星期、时、分、秒进行计时,还具有闰年 补偿等多种功能,而且 DS1302 的使用寿命长,误差小;数字显示是采用的 LED 液晶显示屏来显 示,可以同时显示年、月、日、星期、时、分、秒等信息。此外,该电子万年历还具有时间校准 等功能。在软件方面,主要包括日历程序、时间调整程序,显示程序等。所有程序编写完成后, 在 Keil 软件中进行调试,确定没有问题后,在 Proteus 软件中嵌入单片机内进行仿真。 论文主 要研究了液晶显示器 LCM 及时钟芯片 DS1302, 温度传感器 DS18B20 与单片机之间的硬件互联及通
3、 信,对数种硬件连接方案进行了详尽的比较,在软件方面对日历算法也进行了论述。 研究结果 表明,由于万年历的应用相当普遍,所以其设计的核心在于硬件成本的节约软件算法的优化,力 求做到物美价廉,才能拥有更广阔的市场前景。 关键词:单片机;DS1302;DS18B20;LCM1602 Design of the digital Perpetual Calendar based on Single chip microcomputer ABSTRACT:This paper mainly discuss the design and simulation of electronic calender
4、based on A T89S51 with the help of Protues.On the hardware side, the electronic calendar using A T89C51 microcontroller as the main control center, clock provided by the DS1302 clock chip , 1602LED dot matrix LCD display.Atmel Corporation A T89C51 microcontroller is producted by Atmel Corporation, l
5、ow power consumption, voltage can be selected 4V 6V voltage power supply; DS1302 clock chip, launched in the United States with DALLAS small current charging function real time clock chip, low power consumption, it can be years , month, date, day, hour, minute, seconds time, also has a leap year com
6、pensation and other functions, and DS1302 long life, small error; LED digital display is used in LCD displays that can display in , month, day, week, hours, minutes, seconds and other information.In 第 2 页 addition, the electronic calendar is also a time calibration functions. In terms of software, including calendar program, time to adjust procedures, display procedures. All programming is complete, the Keil softwar