基于单片机的智能定时器

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

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

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

资源描述

西华大学课程设计说明书课程设计说明书课程设计名称:微机控制与接口技术课程设计题目:智能定时器专业:袁世斌学号:312010080608217指导教师:陈立功日期:2013年12月13日成绩西华大学课程设计说明书1摘要本次设计以AT89C51芯片为核心,辅以必要的外围电路,设计了一个简易的电子时钟,它由5V直流电源供电。在硬件方面,除了CPU外,使用四个七段LED数码管来进行显示,LED采用的是动态扫描显示。通过LED能够比较准确显示时、分。三个简单的按键实现对时间的调整。软件方面采用汇编语言编程。整个电子钟系统能完成时间的显示,调时,定时闹钟,报警等功能。本设计是以ATMEL公司的AT89C51单片机芯片为系统核心的智能定时控制器设计,论文具体描述了设计的系统硬件和软件的具体实现过程。智能定时控制器在硬件、软件设计上均采用模块化的方法,使得在设计和调试方面取得很大的方便。论文重点阐述了数字钟硬件中MCU模块、按键模块、显示模块等相关模块的模块化设计及制作;软件同样采用模块化的设计,包括中断模块、时间调整模块等设计,并采用简单流通性强的C语言编写实现。本设计实现了年、月、日及时、分、秒的显示和时间修改的功能。通过对比实际的智能定时控制器,查找出误差的来源,确定调整误差的方法,尽可能的减少误差,使得系统可以达到实际智能定时控制器的允许误差范围内,取得了设计的预期效果。关键词:AT89C51数码管模块化数字钟西华大学课程设计说明书2abstractThisdesignUSESAT89C51chipasthecore,supplementedbynecessaryperipheralcircuit,designasimpleelectronicclock,itconsistsof5vdcpowersupply.Intermsofhardware,inadditiontotheCPU,usingfourseven-segmentLEDdigitaltubedisplay,LEDusingadynamicscanningdisplay.ThroughtocompareaccurateLEDdisplay,points.Threesimplebuttonrealizeadjustmentoftime.Softwareusingassemblylanguageprogramming.Canfinishthewholeelectronicclocksystemtimedisplay,adjustment,timingalarmclock,alarm,etc.ThisdesignisbasedonAT89C51chipasthecoreofthesystemofATMELcompanysmarttimingcontrollerdesign,thepaperdescribesthedesignofsystemhardwareandsoftwareoftheconcreteimplementationprocess.Smarttimingcontrollerinhardware,softwaredesignadoptmodularapproach,madeinthedesignanddebugginghasmadealotofconvenience.PaperexpoundsthedigitalclockhardwareofMCUmodule,keysmodule,displaymoduleandotherrelatedmodulesofmodulardesignandproduction;Softwarealsoadoptsmodulardesign,includingtheinterruptmodule,timeadjustmoduledesign,andUSESthe西华大学课程设计说明书3simpleliquiditystrongClanguagetoachieve.Thisdesignhasrealizedtheyears,months,days,minutesandsecondsintimedisplayandthefunctionofthetimechange.Bycomparingtheactualsmarttimingcontroller,findoutthesourceoftheerror,determinethemethodofadjustingerror,reduceerrors,makesthesystemcanachievetheactualintelligencewithinthescopeofpermissibleerrortimecontroller,designtheexpectedresultshavebeenachieved.Keywords:AT89C51digitaltubemodulardigitalclock目录1前言.....................................................................................................................................................32总体设计方案设计...............................................................................................................................52.1要求功能...................................................................................................................................52.2.单片机芯片..............................................................................................................................52.3显示模块...................................................................................................................................52.4时钟芯片的选择........................................................................................................................62.5电路设计方案确定....................................................................................................................63硬件电路设计......................................................................................................................................73.1硬件系统设计的概述................................................................................................................73.2AT89C51单片机........................................................................................................................83.3单片机的定时/中断系统...........................................................................................................93.4显示系统.................................................................................................................................11西华大学课程设计说明书43.5报警电路.................................................................................................................................113.6按键电路................................................................................................................................123.7电源设计................................................................................................................................133.8单片机最小系统.....................................................................................................................143.8.1单片机的复位电路.......................................................................................................143.8.2单片机的复位电路.......................................................................................................143.9单片机系统的晶振电路.............................................................................................................154软件部分设计...................................................................................................................................164.1主程序....................................................................................................................................164.2初始化程序.......................................................................................................................

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

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

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

×
保存成功