编号:毕业设计(论文)说明书课题名称:基于单片机的电子万年历设计院(系):计算机工程系专业:通信工程班级:通信072班学生姓名:黄董学号:200700402056指导教师:袁浩浩2011年05月25日广西工学院2011届毕业论文基于单片机的电子万年历摘要电子万年历是一种应用非常广泛日常计时工具,对现代社会越来越重要。此电子万年历在硬件方面主要采用STC89C52单片机作为主控核心,由DS1302时钟芯片提供时钟、1602LCD液晶显示屏显示。STC89C52单片机是由Atmel公司推出的,功耗小,电压可选用4~6V电压供电;DS1302时钟芯片是美国DALLAS公司推出的低功耗实时时钟芯片,它可以对年、月、日、星期、时、分、秒进行计时,还具有闰年补偿等多种功能,而且DS1302的使用寿命长,误差小;对于数字电子万年历采用直观的数字显示,数字显示是采用的1602LED液晶显示屏来显示,可以同时显示年、月、日、星期、时、分、秒等信息。此外,该电子万年历还具有时间校准等功能。在软件方面,主要包括日历程序、时间调整程序,显示程序等。所有程序编写完成后,在Keil软件中进行调试,确定没有问题后,烧写到单片机上进行测试。此设计主要由时钟芯片DS1302和温度传感器DS18B20采集数据到单片机进行处理再通过LCD1602显示出来,本论文主要研究了液晶显示器LCD及时钟芯片DS1302,温度传感器DS18B20与单片机之间的硬件互联及通信,对数种硬件连接方案进行了详尽的比较,在软件方面对日历算法也进行了论述。关键词:单片机;DS1302;DS18B20;LCD1602I广西工学院2011届毕业论文基于单片机的电子万年历AbstractElectroniccalendarisawidelyusedtoolforthedailytime,moreandmoreimportantinmodernsociety.TheelectroniccalendarintermsofhardwareasthemaincontrolmainlySTC89C52microcontrollercore,providedbytheDS1302clockchipclock,1602LCDLCDdisplay.STC89C52microcontrollerbyAtmelintroduced,thepowerconsumption,voltagecanbeselected4~6Vvoltagepowersupply;DS1302clockchipintroducedintheUnitedStatesDALLASlow-powerrealtimeclockchip,whichcanbeyear,month,day,week,hours,minutesandsecondstime,butalsohasleap-yearcompensation,andotherfunctions,andtheDS1302'slonglife,smallerror;fordigitalelectroniccalendarusinganintuitivedigitaldisplay,digitaldisplayisused1602LEDLCDscreentodisplay,youcanalsoshowsyear,month,day,week,hours,minutes,secondsandotherinformation.Inaddition,theelectroniccalendarisalsoatimecalibrationandotherfunctions.Intermsofsoftware,includingcalendar,timetoadjustprocedures,displayprocedures.Allprogrammingiscompleted,theKeilsoftwaredebugging,makesurethatnoproblem,programmedintothemicrocontrollerfortesting.ThisdesignmainlybytheclockchipDS1302temperaturesensortothemicrocontrollerDS18B20collectdataforprocessingandthenthroughtheLCD1602display,thisthesis,theliquidcrystaldisplayLCDandclockchipDS1302,temperaturesensorandmicrocontrollerDS18B20interconnectionandcommunicationbetweenthehardwareonSeveralhardwareconnectionschemeforadetailedcomparisonofalgorithmsinsoftwareonthecalendarhavealsobeendiscussed.Keywords:SCM;DS1302;DS18B20;LCD1602II广西工学院2011届毕业论文基于单片机的电子万年历目录摘要......................................................................................................................................................................IAbstract................................................................................................................................................................II第1章绪论..................................................................................................................................................11.1课题背景.....................................................................