外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx
- 文档编号:6199845
- 上传时间:2023-01-04
- 格式:DOCX
- 页数:16
- 大小:94.20KB
外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx
《外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx》由会员分享,可在线阅读,更多相关《外文文献及翻译基于STC89C52单片机的多路抢答器设计.docx(16页珍藏版)》请在冰豆网上搜索。
外文文献及翻译基于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
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 外文 文献 翻译 基于 STC89C52 单片机 抢答 设计