您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 基于51单片机八路抢答器的设计
..编号:课程设计说明书(专业工程设计)题目:基于51单片机八路抢答器的设计院(系):信息与通信学院专业:微电子科学与工程学生姓名:伦海威学号:1300240120指导教师:李琦2016年12月17日..摘要随着科学技术的发展和普及,各种各样的竞赛越来越多,其中抢答器的作用也就显而易见。目前很多抢答器基本上采用小规模数字集成电路设计,使用起来不够理想。因此设计一更易于使用和区分度高的抢答器成了非常迫切的任务。现在单片机已进入各个领域,以其功耗小、智能化而著称,所以若利用单片机来设计抢答器,便使以上问题得以解决.针对以上情况,本文设计出以STC89C52RC单片机为核心的八路抢答器。我们采用了数字显示器直接指示,自动锁存显示结果,并自动复位的设计思想,它能根据不同的抢答输入信号,经过单片机的控制处理并产生不同的与输入信号相对应的输出信号,最后通过LED数码管显示相应的路数,即使两组的抢答时间相差几微秒,也可分辨出是哪组优先按下的按键,它充分利用了单片机系统的优点,具有结构简单、功能强大、可靠性好、实用性强的特点。本设计是以八路抢答为基本理念。考虑到依需设定限时回答的功能,利用51单片机及外围接口实现的抢答系统,利用单片机的定时器/计数器定时和记数的原理,将软、硬件有机地结合起来,使得系统能够正确地进行计时,同时使数码管能够正确地显示时间。用开关做键盘输出,扬声器及LED指示灯发出提示。同时系统能够实现:在抢答中,只有开始后抢答才有效,如果在开始抢答前抢答为犯规;满时后系统计时自动复位及主控强制复位;按键锁定,在有效状态下,按键无效非法。【关键词】STC89C52RC;共阴数码管;按键;蜂鸣器..ABSTRACTWiththedevelopmentandpopularizationofscienceandtechnology,avarietyofcompetitionsmoreandmore,inwhichtheroleoftheResponderwillbeobvious.Atpresent,alotofanswerbasicallyusingsmall-scaledigitalintegratedcircuitdesign,useitisnotideal.Sodesignamoreeasy-to-useandhigh-definitionoftheResponderhasbecomeaveryurgenttask.NowMCUhasenteredvariousfields,withitspowerconsumptionissmall,intelligentandknown,soiftheuseofsingle-chipdesigntoanswer,sothattheaboveproblemscanberesolved.Inviewoftheabove,thisdesigntoSTC89C52RCsinglechipasthecoreoftheeight-.Weusethedirectdisplayofdigitaldisplay,automaticallylatchthedisplayresults,andautomaticallyresetthedesign,itcananswerinaccordancewiththedifferentinputsignals,throughthemicrocontrollercontrolandproducedifferentinputsignalcorrespondingtotheoutputsignal,andfinallythroughLEDdigitaltubeshowsthecorrespondingnumberofroad,evenifthetwogroupsoftheanswertimedifferenceofafewmicroseconds,whichcanbedistinguishedwhichgroupofprioritypressthebutton,whichmakesfulluseoftheadvantagesofSCMsystemwithasimple,powerful,reliableGood,practicalandstrongfeatures.Thedesignisbasedoneight-wayanswerforthebasicidea.Takingintoaccounttheneedtosetthetimelimittoanswerthefunction,theuseof51MCUandperipheralinterfacetoachievetheanswerinthesystem,theuseofsingle-chiptimer/countertimingandcountingprinciple,thesoftwareandhardwareorganicallycombine,makingthesystemcorrectlyTime,whileallowingthedigitaltubetodisplaythecorrecttime.Withtheswitchtodothekeyboardoutput,speakerandLEDindicator.Atthesametimethesystemcanbeachieved:intheanswer,onlyafterthebeginningoftheanswerisvalid,ifinthebeginningtoanswerbeforeansweringforfoul,fulltimeafterthesystemautomaticallyresetandmasterreset.【Keywords】STC89C52RC,commoncathodedigitaltube,button,buzzer..目录引言...............................................................1第一章方案概述..........................................................21.1设计目标...............................................................21.1.1基本功能.............................................................21.1.2主要技术参数.........................................................2第二章硬件设计与原理..................................................32.1总设计框图.............................................................32.2硬件设计分析...........................................................32.2.1单片机主控模块.......................................................42.2.2STC89C52芯片简介....................................................42.2.3封装和引脚说明.......................................................42.2.4数码管显示电路......................................................72.2.5按键输入电路.........................................................92.2.5报警与指示电路.....................................................11第三章软件仿真.........................................................113.1软件调试部分..........................................................113.1.1PROTEUS简介........................................................113.1.2软件调试....................................................123.2PROTEUS仿真图................................................13第四章硬件调试..................................................154.1DXP软件简介..................................................154.1.1原理图......................................................154.1.2PCB图......................................................154.2实物图..................................................................15结论......................................................................16谢辞.....................................................................17参考文献...................................................................18附录一总源程序.............................................................19附录二原理图...............................................................32附录三PCB图................................................................32附录四元件清单.............................................................33..附录五实物图...............................................................33..引言最近几年来,随着科技的飞速发展,单片机领域正在不断的走向社会各个角落,还带动传统控制检测日新月异更新。在实时运作和自动控制的单片机应用到系统中,单片机如今是作为一个核心部件来使用,仅掌握单片机方面知识是不够的,还应根据其具体硬件结构,以及针对具体应用对象特点的软件结合,加以完善。“单片机原理及应用课程设计”是电子类专业的学科基础科,它是继“汇编语言程序设计”,“接口技术”等课程之后开出的实践环节课程。..第一章方案概述1.1设计目标1.1.1基本功能1、同时供8名选手或8个代表队参加比赛,分别用8个按钮K1~K8表示。2、设置一个系统抢答控制开关K0,该开关由主持人控制。3、抢答器具有锁存与显示功能。即选手按动按钮,锁存相应的编号,扬声器发出声响提示,并在七段数码管上显示选手号码。选手抢答实行优先锁存
本文标题:基于51单片机八路抢答器的设计
链接地址:https://www.777doc.com/doc-5822493 .html