2010InternationalConferenceonIntelligentComputationTechnologyandAutomationDesignandImplementofResponderBasedonFreescaleHCS12SingleChipMicrocomputerChengQiming,ChengYinman,WangMingmei,ChangLinCollegeofElectricPowerandAutomationShanghaiUniversityofElectricPowerChangyang2588road,Yandpudistrict,Shanghai200090,ChinaE-mail:chengqiming@sina.comAbstract—An8-channelresponderbasedonFreescaleHCS12singlechipmicrocomputerisdesigned.Therespondercandisplaythenumberofthefirstplayercorrectly.Italsocancountthescoresandshowtheplayerwiththehighestscore.Thesystemincludesfourmodules:CPU12,theSCIserialcommunication,digitaldisplaytubeandtimer.Whencompetitionsignalinput,itisbeencaughtandthencauseinterruption,thetimerisusedtotimeaccurately,theserialportisusedtosendandreceivethestartanswersignal,judgmentsignalandothersignals,thedigitaldisplaytubeisusedtoshowthescoresofthecurrentplayer.LCDdisplaytubeshowssubjectsandanswers.Sothebasicfunctionsoftheresponderareachieved.Keywords--responder;singlechipmicrocomputer;timer;inputcapture;interruptionI.INTRODUCTIONResponderisalsoknownasthefirstsignaldiscriminator,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.FUNCTIONOFRESPONDERThebasicfunctionsofresponderdesignedinthispaperare:(1)Thesystemcanlimitthecompetitiontimeandanswertimeofthealarm;1ThisworkissupportedbyLeadingAcademicDisciplineProjectofShanghaiMunicipalEducationCommission(ProjectNumber:J510301,J510303)978-0-7695-4077-1/10$26.00©2010IEEEDOI10.1109/ICICTA.2010.1281127(2)Thesystemcanidentifytheanswersignalandidentifytheplayer’snumber;(3)Thesystemcancalculatescoreforeachplayeranddisplaythescores.Respondercanaccommodate8playersnumbered1to8.Inaddition,LEDdigitaltubesaredesignedtodisplaythelatcheddata.Afterracehostclearsthesystem,ifparticipantspressswitch,andafteransweriscertificatedwhetheritiscorrectornot,thenumberoffirstplayertoanswerinactionisimmediatelyshownbydigitaltubes.Respondershouldhaveastrongabilitytodistinguishplayerstoanswerintheaction,itsresolutionreachesatleastafewms.III.IDEASOFRESPONDERDESIGNAftertherequirementsandfunctionsofresponderareanalyzed,thefollowingcircuitsarerequiredingeneral:ARespondercircuitThecircuithastwofunctions:oneistoidentifythenumberoftheplayerwhopressbutton,andtosavethenumber;theotheristoprohibittheotherplayersfrombuttoningortomakeotherbuttonsnotavailable.BTimingcircuitsHostcansetcompetitiontimeandanswertimebythetimepre-set-circuit.Ifnobodycananswerquestionwithinthesettime,allplayerswillnotgetscore,thenthehostwillannouncetheanswer.Besides,ifsomeonegetsthechancetoanswerthequestion,butdoesnotgivetherightresultbeforetheallowabletime,heorshewon’tgetthescore,theovertimesignalwillbealsosend,thehostwilldeclaretherightanswer.FreescaleHCS12containstimermodule,thetimermodulecanbedirectlyused.COvertimecircuitHCS12willsendovertimesignalwhentimegoesbeyondthesettime,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.Th