摘 要电子万年历是一种非常广泛日常计时工具,对现代社会越来越流行。它可以对年、月、日、周日、时、分、秒进行计时,还具有闰年补偿等多种功能,而且 DS1302 的使用寿命长,误差小。对于数字电子万年历采纳直观的数字显示,可以同时显示年、月、日、周日、时、分、秒和温度等信息,还具有时间校准等功能。该电路采纳 AT89S52 单片机作为核心,功耗小,能在 3V 的低压工作,电压可选用 3~5V 电压供电。本设计是基于 51 系列的单片机进行的电子万年历设计,可以显示年月日时分秒与周信息,具有可调整日期和时间功能。万年历的设计过程在硬件与软件方面进行同步设计。硬件部分主要由AT89C52 单片机,LED 显示电路,以与调时按键电路等组成。在单片机的选择上本人使用了 AT89C52 单片机,该单片机适合于许多较为复杂控制应用场合。74HC164 是 8 位边沿触发式移位寄存器,串行输入数据,然后并行输出。软件方面主要包括日历程序、时间调整程序,公历转阴历程序,显示程序等。所有程序编写完成后,在 wave 软件中进行调试,确定没有问题后,在 Proteus 软件中嵌入单片机进行仿真。最后总在老师同学的帮助以与自己的努力下完成了此次电子万年历的设计。关键词:时钟电钟 DS1302 DS18B20 动态扫描 单片机AbstractE-calendar day time is a very wide range of tools, increasingly popular in modern society. It can be year, month, day, Sunday, hours, minutes, seconds for time, but also has a leap year compensation to a variety of functions, and the DS1302's long life, small error. For the digital electronic calendar using an intuitive digital display can simultaneously display year, month, day, Sunday, hours, minutes, seconds, and temperature and other information, but also a time-calibration and other functions. The circuit uses AT89S52 microcontroller as the core, power consumption, low-voltage work in 3V, the voltage can choose 3 ~ 5V voltage supply.The design is based on 51 series of microcontrollers to the design of electronic calendar, you can display date information on when the minutes and seconds, and weeks, w...