外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx

上传人:b****8 文档编号:11030256 上传时间:2023-02-24 格式:DOCX 页数:20 大小:94.15KB
下载 相关 举报
外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx_第1页
第1页 / 共20页
外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx_第2页
第2页 / 共20页
外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx_第3页
第3页 / 共20页
外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx_第4页
第4页 / 共20页
外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx_第5页
第5页 / 共20页
点击查看更多>>
下载资源
资源描述

外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx

《外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx》由会员分享,可在线阅读,更多相关《外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx(20页珍藏版)》请在冰豆网上搜索。

外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx

外文文献及翻译基于STC89C52单片机的多路抢答器设计

2010InternationalConferenceonIntelligentComputationTechnologyandAutomation

DesignandImplementofResponderBasedonFreescaleHCS12SingleChipMicrocomputer

 

ChengQiming,ChengYinman,WangMingmei,ChangLin

CollegeofElectricPowerandAutomationShanghaiUniversityofElectricPower

Changyang2588road,Yandpudistrict,Shanghai200090,ChinaE-mail:

********************

Abstract—An8-channelresponderbasedonFreescaleHCS12singlechipmicrocomputerisdesigned.Therespondercandisplaythenumberofthefirstplayercorrectly.Italsocancountthescoresandshowtheplayerwiththehighestscore.Thesystemincludesfourmodules:

CPU12,theSCIserialcommunication,digitaldisplaytubeandtimer.Whencompetitionsignalinput,itisbeencaughtandthencauseinterruption,thetimerisusedtotimeaccurately,theserialportisusedtosendandreceivethestartanswersignal,judgmentsignalandothersignals,thedigitaldisplaytubeisusedtoshowthescoresofthecurrentplayer.LCDdisplaytubeshowssubjectsandanswers.Sothebasicfunctionsoftheresponderareachieved.

Keywords--responder;singlechipmicrocomputer;timer;inputcapture;interruption

 

I.INTRODUCTION

Responderisalsoknownasthefirstsignaldiscriminator,whichiswidelyusedinvariouscompetitions.Itcanjudgethenumberofthefirstplayeraccurately,fairlyandintuitively.Currently,avarietyofquizresponderhasemergedonthemarket,inwhichasmallresponderiscommonlydesignedwithsmall-scaledigitalintegratedcircuit.Althoughthetechnologyhasbeenquitemature,butitissimplefunction,lowintelligence,highfault,simpledisplay,lessflexibility,notconvenienceforupgrade,ithasbeenunabletomeetallkindsofrequirementsforintellectualcompetitionsandvarietyshows.Therefore,itisnecessarytodevelopsomekindsofresponderwhicharemoresuitableforapplications.

Inrecentyears,withtherapiddevelopmentofscienceandtechnology,theapplicationsofsingle-chipmicrocomputerarebecomingwidely,whichpromotesthedevelopmentoftraditionalmeasurementandcontroltechnology.Inthispaper,FreescaleHCS12[1-3]isdesignedasacorecomponenttoachieveanintelligentdigitalresponderwith8-channel[4-8],ithassomebreakthroughsontechnology,functionandotheraspects,comparingwiththepastresponder.Itischaracterizedbysimplestructure,powerful,goodreliability,practicability,sothatthecompetitioncanreallycarriedoutonjust,fairandopenrules.

II.FUNCTIONOFRESPONDER

Thebasicfunctionsofresponderdesignedinthispaperare:

(1)Thesystemcanlimitthecompetitiontimeandanswertimeofthealarm;

1ThisworkissupportedbyLeadingAcademicDisciplineProjectofShanghaiMunicipalEducationCommission(ProjectNumber:

J510301,J510303)

 

978-0-7695-4077-1/10$26.00©2010IEEEDOI10.1109/ICICTA.2010.128

 

1127

(2)

Thesystemcanidentifytheanswersignalandidentifytheplayer’snumber;

(3)Thesystemcancalculatescoreforeachplayeranddisplaythescores.

Respondercanaccommodate8playersnumbered1to8.Inaddition,LEDdigitaltubesaredesignedtodisplaythelatcheddata.Afterracehostclearsthesystem,ifparticipantspressswitch,andafteransweriscertificatedwhetheritiscorrectornot,thenumberoffirstplayertoanswerinactionisimmediatelyshownbydigitaltubes.Respondershouldhaveastrongabilitytodistinguishplayerstoanswerintheaction,itsresolutionreachesatleastafewms.

III.IDEASOFRESPONDERDESIGN

Aftertherequirementsandfunctionsofresponderareanalyzed,thefollowingcircuitsarerequiredingeneral:

ARespondercircuit

Thecircuithastwofunctions:

oneistoidentifythenumberoftheplayerwhopressbutton,andtosavethenumber;theotheristoprohibittheotherplayersfrombuttoningortomakeotherbuttonsnotavailable.

BTimingcircuits

Hostcansetcompetitiontimeandanswertimebythetimepre-set-circuit.Ifnobodycananswerquestionwithinthesettime,allplayerswillnotgetscore,thenthehostwillannouncetheanswer.Besides,ifsomeonegetsthechancetoanswerthequestion,butdoesnotgivetherightresultbeforetheallowabletime,heorshewon’tgetthescore,theovertimesignalwillbealsosend,thehostwilldeclaretherightanswer.FreescaleHCS12containstimermodule,thetimermodulecanbedirectlyused.

COvertimecircuit

HCS12willsendovertimesignalwhentimegoesbeyondthesettime,thissignalwillbetransferredtothePCcomputerbytheserialport.Thenextquestionwillbeproceededtoanswer.

DScorescountanddisplaycircuit.

Whenhostpressestheanswerkey,itistimetostarttoanswer,ifoneplayerpressestheanswerkey,hisorhernumberwillberecorded,hisorherscorewillbecountedanddisplayedontheLEDdigitaltubes.

Bedsidethecircuitsdesignedabove,somenecessarylogicdesignsarealsonecessary.Thelogicdesignsareasfollowing:

First,thehostwillreadthequestionwhichwillshowintheLCD;next,thePCcomputerwillsendletter“k”,whichmeansthatplayisbeginningtocompetition.Atthesametime,timingcircuitstartstowork,ifnobodygetsthechancetoanswerthequestionwithinpermittedtime,microcontrollerwillsendtheword“chaoshi”toPCcomputer;Ifsomeonepressesthecompetitionkeywithinthespecifiedtime,microcontrollerwillsendhisorhernumber.Ifthetimegoesbeyondthepermittedtime,PCcomputerwillsend“next”whichmeansturningtothenextquestion,thenextquestionwillbeautomaticallyshowedtoanswer.Ifsomeplayergetsthechancetoanswerthequestion,hisorhernumberandscoreswilldecrease1automaticallyandshowinthedigitaltubes,thenmicrocontrollersends“next”togoonthenextquestion.Ifthescoreisfewthan0afterdecreasing,playeriseliminated.TherightanswerwillshowontheLCD.Finally,ifallthequestionsaredone,microcontrollerwillsend“e”toendthegame,thenthescoresofallplayerswillbecomputed,thehighestonewillbeshownonthedigitaltubes.

IV.DESIGNOFRESPONDERHARDWARE

Responderhardwareisfirstlydesigned;ResponderhardwareistakendirectlyfromthehardwareresourcesofFreescaleHCS12developmentboarddevelopedbySuzhouUniversity.ThedevelopmentboardtakesMC9S12DG128asthecore,usingmodulardesignapproach,itextractspartofI/Oresources,anditalsoprovideseachmodulewithacorrespondinginterfacecircuit.ItalsoprovidesA/Dinputchannels,PWMlow-passfiltercircuits,16-keykeyboardinputchannels,8-bitdigitalI/Ocircuits,SPII/Ocircuits,SCI

communicationcircuits,I2CbusI/Oexpansioncircuitsandsoon.

Inthispaper,thehardwaremodules,thepinconnectionsandthecorrespondinginterfacesofthedevelopmentboardarelistedandunifiedtoredesignbyactualneedsofthesystem.Figure1showsthehardwarestructurediagramoftheselectedpartofdevelopmentboard.

 

Figure1.Diagramofhardwarestructure

 

ASelectionofhardwaremodules

Theresponderdesignedinthispaperisrelativelysimple,theI/Oportsandthemodulesinvolvedarenotmany.

(1)Thesystemusespush-buttonswitchasthecompetitionkey,whichisgenerallyusedasaswitchinput,thereare0and

1.Here,thesystemneedknowwhetherthebuttonisswitchedbysomebody,thesystemneednotcareabouttheswitchonoroff.

(2)Timermoduleisindispensableintimingcircuit.Here,thetimermodule'sfunctionsaretolimittime,andtocapture

inputsignals.Thiswillbefollowedsomeofthecircuitdesigndescribedindetail.

(3)LEDdigitaltubesareusedtoshowtheparticipant’snumberandscoresinthedisplaycircuit.Thesystemrecordstheplayer'snumberandthecorrespondingscore,andthentransmitstotheLEDdigitaltubesthroughI/Oports.LCDisachievedbyexternalconnectionmodule;itisusedtodisplayquestionsandanswers.

(4)LEDsmalllightisusedtoshowwhethersomebodypressesthecompetitionbutton.Ifplayeranswer,thesmalllightwillbebright,otherwise,itwillnotlight.

(5)SCImoduleisnecessaryinserialcommunicationport.SincethesignalthatstartstoanswerneedstobesendbyPCcomputer,ifthereisnoserialcommunicationport,thewholesystemwillbeparalyzed.ThefunctionofSCImoduleisthat

receivesthesignaltoHCS12,andthensendstheplayer’snumbertoPC.

BDesignofhardwarecircuits

1)Competitioncircuitdesign

Competitioncircuitcapturescompetitionsignalsbymeansofinputcapturing;therewillbeainterruptiononcethepush-buttonswitchjumps.8push-buttonswitchesareconnectedwith8channels,sothesystemcanknowwhichplayercompetestoanswerthequestionbyreadingcorrespondingchannel.Inthispaper,the8channelsconnectwithinputcapturechannelsPT0~PT7ofHCS12.

2)Timingcircuit

AstheHCS12hasitsowntimingmodule,timingcircuitdon’tneedtobedesigned,andinternaltimingmoduleofHCS12canbedirectlyused.

3)Overtimeremindingcircuit

SmalllightorbuzzercouldconnectwithanyI/Oport,butthesystemshouldensuretheselectedI/OportshavenotconflictwiththeI/Oportsoccupiedbythemodule.Oncethespecifiedtimeisover,I/Oportsendahighlevel,andtheLEDsmalllightison.Inthispaper,thefirstpinofPAportischosenasthealarmsignalport;thispinisconnectedtothetestingofsmalllight.

4)Electroniccounteranddisplaycircuit

Thescoringscorescanberesolvedbyprogramming,butthedisplayingscoresneedshardwareconnection,LEDdigitaltubesandLCDareconnectedwithcorrespondingI/OportsofHCS12,externalLCDmoduleshouldhavethefunctionofdisplayingChinesecharacters.

5)Communicationconnect

Thedevelopmentboardhasa9-pincableofRS

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

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1