宝坻中专任广禄基于单片机的多功能万年历设计天津任广禄

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

基于单片机的多功能万年历设计作者:任广禄摘要单片机应用技术飞速发展,纵观我们现在生活的各个领域,从导弹的导航装置,到飞机上各种仪表的控制,从计算机的网络通讯与数据传输,到工业自动化过程的实时控制和数据处理,以及我们生活中广泛使用的各种智能IC卡、电子宠物等,这些都离不开单片机。单片机是集CPU,RAM,ROM,定时,计数和多种接口于一体的微控制器。它体积小,成本低,功能强,广泛应用于智能产业和工业自动化上。而51系列单片机是各单片机中最为典型和最有代表性的一种。本设计以AT89S52单片机为核心,结合DS1302时钟芯片,并采用LCD12864液晶显示。该多功能电子万年历具有时间显示、及具有温度计功能功能。以时、分、秒格式显示时间(精度为1秒)。计算器通过4×4按键对时间、日期进行调整,进行功能切换。同时具有自动调整功能。整机电路使用+5V稳压电源,可稳定工作。在实现硬件电路的基础上,通过软件控制程序实现其功能。关键词:状态显示;时钟;温度;计算器;AT89S52单片机ABSTRACTWiththerapiddevelopmentofmicrocomputerapplicationtechnology,wenowlookatallareasoflife,fromthemissile'snavigationdevicestovariousinstrumentsontheaircraft,fromthecomputernetworkcommunicationanddatatransmission,toindustrialautomation,real-timeprocesscontrolanddataprocessing,andweliveinavarietyofwidelyusedsmartICcards,electronicpets,theseareinseparablefromthemicrocomputer.MicrocomputerisaCPU,RAM,ROM,timing,countingandmultipleinterfacesinoneofthemicrocomputer.Itssmallsize,lowcost,powerful,widelyusedinsmartindustriesandindustrialautomation.The51microcomputerseriesisthemosttypicalofthemicrocontrollerandthemostrepresentativeone.TheAT89S52microcomputerasthecoredesign,combinedwithDS1302clockchipandliquidcrystaldisplayusingLCD12864.Themulti-functionelectroniccalendarwithatimedisplay,andhasathermometerfunctionfunction.Hours,minutes,secondsformattime(anaccuracyof1second).4×4Calculatorbykeysonthetime,date,adjustthefunctionswitch.Alsohasautomaticadjustmentfunction.Machineusingthe+5Vregulatedpowersupplycircuitcanbestability.Intherealizationofhardwarebasedonsoftwarecontrolprogramtoachieveitsfunction.KeyWords:Statusdisplay;Clock;Temperature;Calculator;AT89S52MicrocomputerI目录1绪论...........................................................................................................................11.1多功能万年历设计的背景及意义................................................................11.2总体要求和规划............................................................................................11.2.1方案选择与论证................................................................................11.2.2电路设计最终方案............................................................................21.2.3主要技术指标....................................................................................32主要元器件简介........................................................................................................42.1AT89S52..........................................................................................................42.2温度传感器DS18B20....................................................................................62.3DS1302时钟芯片...........................................................................................83系统硬件电路的设计...............................................................................................93.1系统总体硬件结构设计.................................................................................93.2AT89S52及其外围电路.................................................................................93.2.1温度传感器DS18B20.......................................................................123.2.2液晶显示电路....................................................................................144软件设计.................................................................................................................174.1系统总软件的设计流程...............................................................................174.2DS18B20的软件设计..................................................................................174.3键盘输入的软件设计....................................................................................15测试过程及结果........................................................................................................15.1硬件测试.......................................................................................................205.2软件测试.......................................................................................................205.3测试结果.......................................................................................................20结论.....................................................................................................................21参考文献.....................................................................................................................22附录1:整体电路图..................................................................................................23附录2:源程序..........................................................................................................24致谢........................................................................................错误!未定义书签。1绪论1.1多功能万年历设计的背景及意义随着当今世界经济的快速发展和信息化时代的来临,各种各样的小型智能家电产品陆续出现在我们的生活当中。日历是人们不可或缺的日常用品。但一般日历都为纸制用品,使用不便,寿命不长。电子万年历采用智能电子控制和显示技术,改善了纸制日历的缺陷。本设计以AT89S52单片机为核心,构成单片机控制电路,AT89S52是一种带8K字节闪速可编程可擦除只读存储器(PEROM)的低电压、高性能CMOS8位为控制器。该器件采用ATMEL非易失存储器制造技术制造,与工业标准的80C51和80C52指令集和输出管脚相兼容。结合DS1302时钟芯片和24C02FLASH存储器,完成时间的自动调整和掉电保护,全部信息用液晶显示。时间、日期调整由三个按键来实现,并可对闹铃开关进行设置。日历能显示阳历和阴历年、月、日以及星期、时、分、秒。在显示阴历月份时,能标明是否闰月。此万年历具有读取方便、显示直观、功能多样、电路简单、成本低廉等诸多优点,符合电子仪表的发展

1 / 60
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功