基于AT89C51单片机的抢答器设计.docx

上传人:聆听****声音 文档编号:253243 上传时间:2023-04-28 格式:DOCX 页数:8 大小:404.23KB
下载 相关 举报
基于AT89C51单片机的抢答器设计.docx_第1页
第1页 / 共8页
基于AT89C51单片机的抢答器设计.docx_第2页
第2页 / 共8页
基于AT89C51单片机的抢答器设计.docx_第3页
第3页 / 共8页
基于AT89C51单片机的抢答器设计.docx_第4页
第4页 / 共8页
基于AT89C51单片机的抢答器设计.docx_第5页
第5页 / 共8页
基于AT89C51单片机的抢答器设计.docx_第6页
第6页 / 共8页
基于AT89C51单片机的抢答器设计.docx_第7页
第7页 / 共8页
基于AT89C51单片机的抢答器设计.docx_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

基于AT89C51单片机的抢答器设计.docx

《基于AT89C51单片机的抢答器设计.docx》由会员分享,可在线阅读,更多相关《基于AT89C51单片机的抢答器设计.docx(8页珍藏版)》请在冰点文库上搜索。

基于AT89C51单片机的抢答器设计.docx

theprincipleofsimplifiedEIAofconstructionprojectsintheregion.Intermsofland,linkedtotheimplementationofurbanandruralconstructionlandincreaseanddecrease,replacementindicatorsforpriorityareasproject.Charges,intotheprojectsofwater,electricity,administrativechargesandpreferentialpolicies.Intheareaoftaxation,andsettledinareasofindustryanditsproductioncompany,within5yearsafterthecompletionoffiscalincentivestoenterprises.Intermsoffinancing,integrationofland,tax,financialandotherresources,andconstruct"Governmentcredit+businesscredit"creditsystem,establishmentofmarketization,commercializationandmodernizationoftheinvestmentandfinancingplatform;effectiveBank-enterprisedocking,encouragesprivatecapitalintothePark,toraiseindustrydevelopmentfund.5,optimizetheenvironmentandserviceindustries.Tocreate"policylowlands,Highlands,integrityofserviceland,developmentland"asthegoal,tooptimizetheareaunderdevelopmentenvironment.Alladministrativelawenforcementdepartmentstoappointafull-timepersonnelstationedinareasdedicatedtocoordinatingandsolvingproblemsassociatedwithbusinessesinthissector.Whentherearesubstantialissues,sectorleadersarrangedtopersonallyintervene,in-person,in-personpushtangibleareabuildingagreenlight,easyline.Tofurtherreduceandstandardizeadministrativeexaminationandapprovalitems,simplifyexaminationandapprovallinks,improveefficiency;accordingtothe...

 Sincetheeducationalpracticeofthemasslineoftheparty,himselfseriouslyintheeducation,practicalcontrolcentral"eightrules"andopposing"thefourwinds"andpracticing"threeSuns",andcheckthespiritofJiaoYulu,ideology,solicitopinionsbasedonoutstandingproblemscheckedswing,carefulanalysisandreflection.Willnowcheckreportisasfollows:

first,adherencetotheparty'spoliticaldiscipline,eightinthecentralprovision,changethestyleofthebasicsituationof1,incompliancewiththeparty'spoliticaldisciplines.  Conscientiouslyabidebytheparty'spoliticaldiscipline,abidebytheConstitutionandtherulesandregulationsoftheparty,inthepolitical,ideologicalandmaintainhighlyconsistentwiththeCPCCentralCommitteeontheaction,thereisnoviolationoftheparty'spoliticaldisciplineproblems.2,intheimplementationofthecentralauthoritiesoftheeightprovisions.Improvingresearch,improvingresearchmethods,buttherearelessgrass-rootsunits,primaryfirst-handaninadequategraspoftheproblem,whichistobestrengthenedinthefuture.Second,construction,strictlyinaccordancewiththeprovisionstostreamlineandimprovethequalityofmeetingsoftheConference.Third,streamliningfilebriefs,cultureinvolvesallaspectsofpropagandaandideology,sometimesduetothepracticalneedsofinventionnotifications,thisareaneedsfurther

基于AT89C51单片机的抢答器设计

硬件设计:

一、项目要求:

基于AT89C51单片机设计制作一个抢答器,晶振采用12MHZ,具体设计要求如下:

1.设计一个智力竞赛抢答器,可同时供8名选手参加比赛,编号为1、2、3、4、5、6、7、8,各用一个按钮。

2.给节目主持人设置一个控制开关,用来控制系统的清零和抢答开始

3.抢答器具有所锁存功能、显示功能和声音提示功能。

抢答开始后若选手按动抢答按钮,编号立即锁存,并在LED数码管上显示选手编号,同时亮灯伴随声音提示。

此外要封锁输入电路,禁止其他选手抢答,最先抢答选手的编号一直保持到主持人将系统请0.

二、框图设计:

基于AT89C51单片机抢答器由控制核心AT89C51单片机、复位电路、电源电路、选手按键、主持人按键、声音提示和数码显示等部分构成,系统框图如图示

电源电路

AT89C52

单片机

声音提示

数码显示

复位电路

选手按键

主持人按键

基于AT89C51单片机抢答器系统框图

本项目需要通过学习和查阅资料,掌握和了解如下知识:

l+5V电源原理及设计

l单片机复位电路工作原理及设计

l单片机晶振电路工作原理及设计

l按键电路设计

l蜂鸣器驱动电路设计

l数码管特性及使用

lAT89C51单片机引脚

l单片机汇编语言及程序设计

电路原理图:

其工作原理为:

电源电路为单片机以及其他模块提供标准5V电源。

晶振模块为单片机提供时钟标准,使系统各部分协调工作。

复位电路模块为单片机系统提供复位功能。

单片机作为主控制器,根据输入信号对系统进行相应的控制。

选手按下相应的键,蜂鸣器发出提示音,直到按键释放。

数码管显示最先按下选手的编号。

选手回答完毕,主持人按下准备按钮,数码管清零,蜂鸣器停止发声,可以进入下一题的抢答。

基于AT89C51的单片机抢答器元件清单如下:

序号

元件名称

规格

数量

用途

1

51单片机

AT89C51

1个

控制核心

2

晶振

12M立式

1个

晶振电路

3

集成电路

74LS245(8路总线接收/发送器)

1个

驱动

4

八段数码管

一位共阴极

1个

显示电路

5

三极管

9015

1个

蜂鸣器机器驱动电路

6

起振电容

30pF瓷片电容

2个

晶振电路

7

复位电容

10uF/10V

1个

复位电路

8

复位电阻

10K欧

1个

复位电路

限流电阻

500欧

1个

限流电路

9

喇叭

8欧/05W

1个

蜂鸣器及其驱动电路

10

按键

1个

主持人按键

按键

8个

选手按键

11

电源

5V/05A

1个

提供+5V

软件设计:

上电复位后数码管清零,P2.0置高电平,蜂鸣器不发声,循环扫描P3口,看是否有按键按下,如果有按键按下,则转入判断是哪个选手按下按键,并在数码管上显示选手号;P2.0置低电平,蜂鸣器发生,主持人按键按下,系统重新进入主程序继续进行下一轮抢答。

程序流程图如下

开始

初始化

有选手按键

判断选手

显示选手号

蜂鸣器发生

主持人按键按下

程序流程图:

小结:

1.程序调试参考了好多资料,也请教了同学,最后编程问题都得到了解决

2.在Protus中画图失败,以至于不能仿真出来结果

3.理论联系实际,培养自学能力,和动手能力,学会了怎么更好的处理知识和实践相结合的问题

4.为以后有关单片机只是的学习积累宝贵经验

附:

源程序代码如下:

ORG0000H

JMPBEGIN

TABLE:

;共阴极数码管显示代码表

DB3FH,06H,5BH,4FH,66H,;01234

DB6DH,7DH,07H,7FH;6789

DELAY:

MOVR5,#20

LOOP4:

MOVR6,#50H

LOOP5:

MOVR7,#100H;延时20*20ms

DJNZR7,$

DJNZR6,LOOP5

DJNZR5,LOOP4

RET

BEGIN:

MOVP2,#0FFH;P2口置高电平,准备接收信号

MOVR4,#0

MOVA,R4;R4位标志值送A寄存器

AGIN:

MOVDPTR,#TABLE

MOVCA,@A+DPTR

MOVP1,A

LOOP1:

MOVA,P3;接受P3口的抢答信号

CPLA

JZLOOP1

LOOP2:

RRCA;有抢答信号则逐次移动判断哪一位抢答

INCR4

JNCLOOP2

;***************

MOVA,R4

MOVCA,@A+DPTR;找到相应位显示代码

MOVP1,A

LOOP3:

JNBP2.2,BEGIN;若主持人按下复位键信号,则转向主程序

CPLP2.0;若没有按复位信号键,则通过P2.2口给出高低信号驱动蜂鸣器

LCALLDELAY;调用延时子程序

SJMPLOOP3;P2.2口反复间隔0.4s变化,驱动蜂鸣器

END

程序仿真:

Protus中画电路图

发包人指定专人负责协调施工中的有关事宜,并监督施工进度、安全与文明施工。

发包人对承包人施工中违规操作有权做好处理决定或经济处罚。

streamlining.Fourarestandardvisits,exceptasrequiredtoparticipateintraining,nootheractivity.Fiveistoimprovenewsreporting,forpropagandaworkstrictlyaccordingtotheregulations.Sixisstrictlyyourpresentationpublishedstrictlyaccordingtotheregulations.  Sevenisstrictlythrift,requiredtheuseofvehiclesandofficespaceandcorporatehospitality.3,changethestyle.  Propagandaandideologicalworkofthenewsituationandnewrequirementsofthenewtasks,haddonealotoffruitfulwork,hasmademanyachievements,butfurtherclosertothegrassroots,closetoreality,closetothemassesandalsoinadequateinnovationmustcontinuetoimprove.Second,the"fourwinds"someoutstandingissues1,opposeformalism.Onetheoryisthathedidn't,withlessclosecontact.Theoreticalstudyofconsciousnessisnothighenough,systemperformanceisnotstrongenough;morepassivelearning,activelearningfewgeneralitiesandlearnmore,delvingintoless.Especiallybasedonrationalthinkingonmajorissues,applyingtheorytoguidetheworkdoneisnotgoodenough,notreallyunderstandandgraspthespiritandessenceofthescientificOutlookondevelopment,didnottrulyachievemastery,toapply,toacertainextent,affectthedevelopmentandimplementationofideasandinitiatives.Second,workarrangements,andlesssupervision.Propagandaandideologicalworkistheobjective,whichneedstokeepthecontinuityeffortsdeployed,butstressedintheworktime,lesssupervision.Forexample,colorweekendsinthesummertheatricalactivities,citysquareperformances,urgingtownships,communitiesandruralareasshowstheimplementationisinadequate,insufficientculturalaneducationalroletoplay.Thirdbaseenough,mastergrass-lessreal.Propagandaandideologicalworkinthenewsituationofcharacteristicsandregularityofenough,deepenoughforgrass-rootspublicopinionDynamicssurvey,forgrass-rootstypicallydriveless.Forexample,ruralcultureteamactive,...I'mnotactivelytaketheinitiativetotakeup,thelackofspiritofdaringto,resultinginsomejobhadalotofpower,butnotangibleresults.Third,innovation,lackofmotivation.Emancipationdidnotend,innovationdoesnotexist.  Inpracticalwork,notyourhead,previousworkexperience,lackofinnovationinitiatives,studyonthecharacteristicsofpropagandaandideologicalworkunderthenewsituationthrough,gripongrassrootsideologicaltrendsandchangesarenotdeep,topromotenewinitiativesandexplorenewmethodsofideologicalandculturalworkisnotmuch,andsomelackofrelevanceandtimeliness.4,discipline,lowering,andhardworkarelacking.Whileworkingandenterprisingspiritdown.Norealsolutiontotreatyourselfright,correctlytreatpasthonors,theircomplacency,andworktoseetheirscoresmore,lesscheckinghisownshortcomings,liketolistentothepraise,satisfiedface,onlinepromotion,therearetypical,andlackofhighstandardsandstrictrequirements,theeffectisreal.Secondharddriveless.Onhardand

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2