基于 51 单片机的液晶显示万年历设计摘 要随着社会的进步和进展,电子万年历作为日常计时工具被广泛地应用。此电子万年历在硬件方面主要采纳 STC89C51 单片机作为主控核心,由 DS1302 时钟芯片提供时钟及 1602LCD 液晶显示屏显示。STC89C51 单片机是由宏晶公司公司生产的,功耗小,电压可选用 3。4v~5.5v 电压供电;DS1302 时钟芯片是美国 DALLAS 公司推出的低功耗实时时钟芯片,它可以对年、月、日、星期、时、分、秒进行计时而且 DS1302 的使用寿命长,误差小;对于数字电子万年历采纳直观的数字显示,数字显示是采纳的 1602LCD 液晶显示屏来显示,可以同时显示年、月、日、星期、时、分、秒、温度等信息.此外,该电子万年历在软件方面主要包括日历程序、时间调整程序,显示程序等。所有程序编写完成后,在 Keil 软件中进行调试,确定没有问题后,烧写到单片机上进行测试。本次课程设计主要由时钟芯片 DS1302 和温度传感器 DS18B20 采集数据到单片机进行处理再通过 LCD1602 显示出来,本设计主要讨论了液晶显示器 LCD 及时钟芯片 DS1302,温度传感器 DS18B20 与单片机之间的硬件互联及通信,对数种硬件连接方案进行了详尽的比较。关键词:单片机;DS1302;DS18B20;LCD1602ABSTRACTWith the social progress and development, Electronic calendar is widely used as a daily timing tool 。 The electronic calendar in hardware using STC89C51 microcontroller as the main control center , provided by the DS1302 clock chip and 1602LCD LCD display 。 STC89C51 microcontroller is produced by the macro crystal company, small power consumption, the voltage can be choosen among 3。4V ~ 5.5V for power supply; DS1302 clock chip is a low power real-time clock chip produced by DALLAS, it can be a time of years,months,days,weeks,hours,minutes,seconds, and DS1302 has a long service life. The error is small; for the digital electronic calendar using visual digital display , 1602LCD digital display is used to display LCD screen that can display years , months, days, weeks , hours, minutes and seconds , temperature ...