基于单片机的数字电子秒表的设计与实现

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

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

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

资源描述

沈阳理工大学应用技术学院毕业设计(论文)题目:基于单片机的数字电子秒表的设计与实现系别:信息工程系专业:自动化学生姓名:胡培指导教师:唐朝仁年月日I摘要近年来随着科技的飞速发展,单片机的应用正在不断的走向深入。本文阐述了基于单片机的数字电子秒表设计。本设计主要特点是计时精度达到0.001s,解决了传统的由于计时精度不够造成的误差和不公平性,是各种体育竞赛的必备设备之一。另外硬件部分设置了查看按键,可以对秒表上一次计时时间进行保存,供使用者查询。本设计的数字电子秒表系统采用AT89C52单片机为中心器件,利用其定时器/计数器定时和记数的原理,结合显示电路、LED数码管以及外部中断电路来设计计时器。将软、硬件有机地结合起来,使得系统能够实现五位LED显示,显示时间为0~99.999秒,计时精度为0.001秒,能正确地进行计时,同时能记录一次时间,并在下一次计时后对上一次计时时间进行查询。其中软件系统采用汇编语言编写程序,包括显示程序,定时中断服务,外部中断服务程序,延时程序等,并在WAVE中调试运行,硬件系统利用PROTEUS强大的功能来实现,简单切易于观察,在仿真中就可以观察到实际的工作状态。关键字:单片机;数字电子秒表;仿真IIAbstractWiththerapiddevelopmentofscienceandtechnologyinrecentyears,SCMapplicationsareconstant-depthmanner.Inthispaper,basedonsinglechipdesignofdigitalelectronicstopwatch.Themaincharacteristicsofthisdesigntimingaccuracyof0.001s,tosolvethetraditionalresultofalackaccuracyduetotimingerrorsandunfair,andisavarietyofsportscompetitions,oneoftheessentialequipment.InadditionthehardwarepartofthesetViewbuttononthestopwatchcanbethelasttimetosavetimeforuserqueries.Thedesignofthemulti-functionstopwatchsystemusesSTC89C52microcontrollerasthecentraldevice,anduseitstimer/countertimingandthecountprinciples,combinedwithdisplaycircuit,LEDdigitaltube,aswellastheexternalinterruptcircuittodesignatimer.Thesoftwareandhardwaretogetherorganically,allowingthesystemtoachievetwoLEDdisplayshowsthetimefrom0to99.999seconds,Timingaccuracyof0.001seconds,Beabletocorrectlytimeatthesametimetorecordatime,andthenexttimeafterthelasttimethetimetosearch.automaticallyaddedasecondinwhichsoftwaresystemsusingassemblylanguageprogramming,includingthedisplayprogram,timing,interruptservice,externalinterruptserviceroutine,delayprocedures,keyconsumershakingprocedures,andWAVEinthecommissioning,operation,hardwaresystemusestoachievePROTEUSpowerful,simpleandeasytoobservethecutinthesimulationcanbeobservedontheactualworkingcondition.Keyword:LEDdisplay;High-precisionstopwatch;STC89C52Ⅲ目录绪论.............................................................................................................................11硬件设计......................................................................................................................41.1总体方案的设计...............................................................................................41.2单片机的选择...................................................................................................51.3显示电路的选择与设计...................................................................................81.4按键电路的选择与设计.................................................................................111.5时钟电路的选择与设计.................................................................................121.6复位电路的选择与设计.................................................................................141.7系统总电路的设计.........................................................................................162软件设计....................................................................................................................192.1程序设计思想.................................................................................................192.2系统资源的分配.............................................................................................192.3主程序设计.....................................................................................................202.4中断程序设计.................................................................................................213数字电子秒表的安装与调试....................................................................................263.1软件的仿真与调试.........................................................................................263.2硬件的安装与调试.........................................................................................263.3系统程序的烧录.............................................................................................273.4数字电子秒表的精度调试.............................................................................28结论..............................................................................................................................29致谢..............................................................................................................................30参考文献..........................................................................................................................31附录A资料翻译..........................................................................................................32A.1英文原文........................................................................................................32A.2中文翻译........................................................................................................39附录B程序..................................................................................................................44附录C电路原理图......................................................................................................51附录D硬件实物图......................................................................................................52沈阳理工大学应用技术学院学士学位论文1绪论秒表计时器是电器制造,工业自动化控制、国防、实验室

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

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

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

×
保存成功