您好,欢迎访问三七文档
June2007ChineseJournalofScientificInstrumentV01.28No.71AT89C51In-CircuitProgrammingJiangYoul,TianDil,FangXian92,ZhaoDongzhi3(JCollegeofInstrumentScience&ElectricalEngineering,JilinUniversity,Changchun130026,China;2NationalInstituteofMetrologyP.R.China,Beijing100013,China;3InstituteofGeologyandGeophysics,ChineseAcademyofSciences,Beijing100029,China)Abstract:UsingMCS51seriessingle—chipmicrocomputerasCPU,amainboardwasdesigned,whichimplementsmostfunctionsof8一bitPCI04busandhasanethernetinterface.CombinedwithcommercialPCI04businterfacemodules,anentiretestandcontrolsystemwasconstructed.ComparedwithstandardPC104mainboardbasedX86CPU,theproposedmainboardfeaturessimpledevelopmentandapplication,lowercost,andissuitableforthedesignanddevelopmentoflowspeedcontrolsystems.Thedevelopedmainboardandsystemwereappliedinthecontrolsys—temofZDZmassspectrometer.ThetrendofthetechnologyistodevelopadvancedPCI04mainboardbaseda32一bitmicrocontroller.Keywords:microcontroller;ethernet;embeddedsystem;measurement&controlsystem;1EpigraphThisapplicationnoteillustratesthein-circuitprogrammabilityoftheAtmelAT89C51Flash-basedmicrocontroller.Guidelinesfortheadditionofin-circuitprogrammabilitytoAT89C51applicationsarepresentedalongwithanapplicationexampleandthemodificationstoitrequiredtosupportin-circuitprogramming.AmethodisthenshownbywhichtheAT89C51microcontrollerintheapplicationcanbereprogrammedremotely,overacommercialtelephoneline.Thecircuitrydescribedinthisapplicationnotesupportsfivevoltprogrammingonly,requiringtheuseofanAT89C51.ThestandardAT89C51requires12voltsforprogramming.ThesoftwareforthisapplicationmaybeobtainedbydownloadingfromAtmel’s.CircuitryaddedtosupportAT89C51incircuitprogrammingshouldappearJune2007ChineseJournalofScientificInstrumentV01.28No.72transparenttotheapplicationwhenprogrammingisnottakingplace.EA/VPPmustbeheldhighduringprogramming.Inapplicationswhichdonotutilizeexternalprogrammemory,thispinmaybepermanentlystrappedtoVCC.Applicationsutilizingexternalprogrammemoryrequirethatthispinbeheldlowduringnormaloperation.RSTmustbeheldactiveduringprogramming.Ameansmustbeprovidedforoverridingtheapplicationresetcircuit,whichtypicallyassertsRSTonlybrieflyafterpowerisapplied.PSENmustbeheldlowduringprogramming,butmustnotbedrivenduringnormaloperation.ALE/PROGispulsedlowduringprogramming,butmustnotbedrivenduringnormaloperation.Duringprogramming,AT89C51I/Oportsareusedfortheapplicationofmodeselect,addressesanddata,possiblyrequiringthatthecontrollerbeisolatedfromtheapplicationcircuitry.Howthisisdoneisapplicationdependentandwillbeaddressedhereonlyingeneralterms.2ProgrammingDuringprogramming,thecontrollermustbeisolatedfromsignalssourcedbytheapplicationcircuitry.Abufferwiththreestateoutputsmightbeinsertedbetweentheapplicationcircuitryandthecontroller,withthebufferoutputsthree-statedwhenprogrammingisenabled.Alternately,amultiplexermightbeusedtoselectbetweensignalsources,withsignalsappliedtothecontrollerbyeithertheapplicationcircuitryortheprogrammercircuitry.Nocircuitchangesarerequirediftheapplicationcircuitrycantoleratethestatechangeswhichoccurattheportduringprogramming.Ifthepriorstateoftheapplicationcircuitrymustbemaintainedduringprogramming,alatchmightbeinsertedbetweenthecontrollerandtheapplicationcircuitry.Thelatchisenabledduringprogramming,preservingthestateoftheapplicationcircuitry.3TheAT89C51TheAT89C51applicationshowninFigure1isanimplementationofamovingdisplay.Thisapplicationwasselectedforitssimplicityandabilitytoshowgraphicallytheresultsofin-circuitreprogramming.Thetexttobedisplayedisprogrammedintothecontrolleraspartofitsfirmware,andcannotbechangedwithoutreprogrammingthedevice.Thedisplayedtextispresentedinoneoftwomodesselectedbythefour-positionDIPswitch.Inthefirstmode,onecharacteratatimeentersthedisplayfromJune2007ChineseJournalofScientificInstrumentV01.28No.73therightandmovesquicklytotheleftthrougheachelementofthedisplaytoitsfinalpositionintheassembledmessage.Inthesecondmode,themessagemovesthroughthedisplay,fromrighttoleft,withthedisplayactingasawindowontothemessage.Thismodeisfamiliarasthemethodoftenusedindisplaysofstockprices.TheoutputconsistsoffourDL1414T,four-digit,17-segmentalphanumericdisplayswithintegraldecodersanddrivers.Thisyields16totaldisplayelements,eachcapableofdisplayingdigits0-9,theuppercasealphabet,andsomepunctuationcharacters.ThedisplayablecharactercodesareASCII20H-5FH.Apower-onresetcircuitanda6-MHzcrystaloscillatorcompletetheapplication.Neitherexternalprogrammemorynorexternaldatamemoryisused.In-CircuitProgrammingFigure2showstheapplicationmodifiedforin-circuitprogramming.Itisassumedthattheprogrammer,wheninactive,willneitherdrivenorexcessivelyloadtheapplication.Sincetheapplicationdoesnotuseexternalprogrammemory,EA/VPPonthecontrollerisconnectedtoVCC.Thismeetstherequirementforprogramming.4TheResetCircuitTheresetcircuithasbeenmodifiedbytheadditionoftwotransistors,whichallowRSTonthecontrollertobeforcedhighbytheprogrammer.PSENandALE/PROG,unusedinthebasicapplication,areunderthedirectcontroloftheprogrammer.Programmingrequiresprogrammerac
本文标题:51单片机外文文献
链接地址:https://www.777doc.com/doc-4864684 .html