1 湖南文理学院课程设计 课程名称: 单片机课程设计 设计题目: 电子万年历 教学院部: 电气与信息工程学院 专业班级: 自动化 0 9 1 0 1 班 指导教师: * * * 学生姓名: * * 学 号: ************ 完成时间: 2 0 1 2 年 6 月 1 2 日 报告成绩: 评阅意见: 评阅教师 日期 2 摘要: 电子万年历是一种非常广泛日常计时工具,对现代社会越来越流行。它可以对年、月、日、周日、时、分和秒进行计时,还具有闰年补偿等多种功能,而且DS1302 的使用寿命长,误差小。对于数字电子万年历采用直观的数字显示,可以同时显示年、月、日、周日、时、分、秒等信息,还具有时间校准等功能。该电路采用 AT89C52 单片机作为核心,功耗小,能在 3V 的低压工作,电压可选用3 到 5V 电压供电。 万年历的设计过程在硬件与软件方面进行同步设计。硬件部分主要由AT89C52单片机,液晶显示电路,复位电路,时钟电路,稳压电路电路以及串口下载电路等组成。在单片机的选择上使用了 AT89C52 单片机,该单片机适合于许多较为复杂控制应用场合。显示器使用液晶 LCD1602。软件方面主要包括日历程序、液晶驱动程序,显示程序等。程序采用汇编语言编写。所有程序编写完成后,在 Keil C51 软件中进行调试,确定没有问题后,在 Proteus 软件中嵌入单片机内进行仿真。 关键词 时钟电钟,DS1302,液晶 LCD1602,单片机 Abstract: Electronic calendar is a very extensive daily timing tool for modern society is more and more popular. It can be to year, month, day, Sunday, when, minutes, and seconds for the time, also has a leap year compensation and other functions, and the DS1302 long service life and small error. For digital electronic calendar using intuitive digital display, can also shows that year, month, day, Sunday, when the information such as, minutes and seconds, still have time calibration etc. Function. The AT89C52 single chip microcomputer as circuit adopts core, power consumption is small, can be in 3 V of low-pressure work, voltage can choose 3 to 5 V voltage power supply. The design process of the calendar ...