基于51单片机信号发生器的设计外文翻译.docx
《基于51单片机信号发生器的设计外文翻译.docx》由会员分享,可在线阅读,更多相关《基于51单片机信号发生器的设计外文翻译.docx(20页珍藏版)》请在冰豆网上搜索。
基于51单片机信号发生器的设计外文翻译
本科毕业设计论文
题目TheSCMandμVision2
所在系电气与信息工程系
学生姓名冉乾乾
专业电子信息工程
班级电信002学号********
指导教师金印彬
2014年5月
TheSCMandµVision2
一、PrincipleofMCU
Single-chipisanintegratedonasinglechipacompletecomputersystem.Eventhoughmostofhisfeaturesinasmallchip,butithasaneedtocompletethemajorityofcomputercomponents:
CPU,memory,internalandexternalbussystem,mostwillhavetheCore.Atthesametime,suchasintegratedcommunicationinterfaces,timers,real-timeclockandotherperipheralequipment.Andnowthemostpowerfulsingle-chipmicrocomputersystemcanevenvoice,image,networking,inputandoutputcomplexsystemintegrationonasinglechip.
Alsoknownassingle-chipMCU(Microcontroller),becauseitwasfirstusedinthefieldofindustrialcontrol.Onlybythesingle-chipCPUchipdevelopedfromthededicatedprocessor.ThedesignconceptisthefirstbyalargenumberofperipheralsandCPUinasinglechip,thecomputersystemsothatsmaller,moreeasilyintegratedintothecomplexanddemandingonthevolumecontroldevices.INTELtheZ80isoneofthefirstdesigninaccordancewiththeideaoftheprocessor,Fromthenon,theMCUandthedevelopmentofadedicatedprocessorpartedways.
Earlysingle-chip8-bitorallofthefour.OneofthemostsuccessfulisINTEL's8031,becausetheperformanceofasimpleandreliableaccesstoalotofgoodpraise.Sincethenin8031todevelopasingle-chipmicrocomputersystemMCS51series.Basedonsingle-chipmicrocomputersystemofthesystemisstillwidelyuseduntilnow.Asthefieldofindustrialcontrolrequirementsincreaseinthebeginningofa16-bitsingle-chip,butnotidealbecausethepricehasnotbeenverywidelyused.Afterthe90'swiththebigconsumerelectronicsproductdevelopment,single-chiptechnologyisahugeimprovement.INTELi960SerieswithsubsequentARMinparticular,abroadrangeofapplications,quicklyreplacedby32-bitsingle-chip16-bitsingle-chiphigh-endstatus,andenterthemainstreammarket.Traditional8-bitsingle-chipperformancehasbeentherapidincreaseinprocessingpowercomparedtothe80'storaiseafewhundredtimes.Atpresent,thehigh-end32-bitsingle-chipfrequencyover300MHz,theperformanceofthemid-90'scloseontheheelsofaspecialprocessor,whiletheordinarypriceofthemodeldroppedtooneU.S.dollars,themosthigh-endmodels,only10U.S.dollars.Contemporarysingle-chipmicrocomputersystemisnolongeronlythebare-metalenvironmentinthedevelopmentanduseofalargenumberofdedicatedembeddedoperatingsystemiswidelyusedinthefullrangeofsingle-chipmicrocomputer.InPDAsandcellphonesasthecoreprocessingofhigh-endsingle-chiporevenadedicateddirectaccesstoWindowsandLinuxoperatingsystems.
Morethanadedicatedsingle-chipprocessorsuitableforembeddedsystems,soitwasuptotheapplication.Infactthenumberofsingle-chipistheworld'slargestcomputer.Modernhumanlifeusedinalmosteverypieceofelectronicandmechanicalproductswillhaveasingle-chipintegration.Phone,telephone,calculator,homeappliances,electronictoys,handheldcomputersandcomputeraccessoriessuchasamouseintheDepartmentareequippedwith1-2singlechip.Andpersonalcomputersalsohavealargenumberofsingle-chipmicrocomputerintheworkplace.Vehiclesequippedwithmorethan40Departmentofthegeneralsingle-chip,complexindustrialcontrolsystemsandevensingle-chipmayhavehundredsofworkatthesametime!
SCMisnotonlyfarexceedsthenumberofPCandotherintegratedcomputing,evenmorethanthenumberofhumanbeings.
Hardwaveintroduction
The8051familyofmicrocontrollersisbasedonanarchitecturewhichishighlyoptimizedforembeddedcontrolsystems.ItisusedinawidevarietyofapplicationsfrommilitaryequipmenttoautomobilestothekeyboardonyourPC.SecondonlytotheMotorola68HC11ineightbitprocessorssales,the8051familyofmicrocontrollersisavailableinawidearrayofvariationsfrommanufacturerssuchasIntel,Philips,andSiemens.Thesemanufacturershaveaddednumerousfeaturesandperipheralstothe8051suchasI2Cinterfaces,analogtodigitalconverters,watchdogtimers,andpulsewidthmodulatedoutputs.Variationsofthe8051withclockspeedsupto40MHzandvoltagerequirementsdownto1.5voltsareavailable.Thiswiderangeofpartsbasedononecoremakesthe8051familyanexcellentchoiceasthebasearchitectureforacompany'sentirelineofproductssinceitcanperformmanyfunctionsanddeveloperswillonlyhavetolearnthisoneplatform.
Thebasicarchitectureconsistsofthefollowingfeatures:
•aneightbitALU
•32descreteI/Opins(4groupsof8)whichcanbeindividuallyaccessed
•two16bittimer/counters
•fullduplexUART
•6interruptsourceswith2prioritylevels
•128bytesofonboardRAM
•separate64KbyteaddressspacesforDATAandCODEmemory
One8051processorcycleconsistsoftwelveoscillatorperiods.Eachofthetwelveoscillatorperiodsisusedforaspecialfunctionbythe8051coresuchasopcodefetchesandsamplesoftheinterruptdaisychainforpendinginterrupts.Thetimerequiredforany8051instructioncanbecomputedbydividingtheclockfrequencyby12,invertingthatresultandmultiplyingitbythenumberofprocessorcyclesrequiredbytheinstructioninquestion.Therefore,ifyouhaveasystemwhichisusingan11.059MHzclock,youcancomputethenumberofinstructionspersecondbydividingthisvalueby12.Thisgivesaninstructionfrequencyof921583instructionspersecond.Invertingthiswillprovidetheamountoftimetakenbyeachinstructioncycle(1.085microseconds).
二、TheIntroductionofAT89C51
一Description
TheAT89C51isalow-power,high-performanceCMOS8-bitmicrocomputerwith4KbytesofFlashprogrammableanderasablereadonlymemory(PEROM).ThedeviceismanufacturedusingAtmel’shigh-densitynonvolatilememorytechnologyandiscompatiblewiththeindustry-standardMCS-51instructionset.Theon-chipFlashallowstheprogrammemorytobereprogrammedin-systemorbyaconventionalnonvolatilememoryprogrammer.Bycombiningaversatile8-bitCPUwithFlashonamonolithicchip,theAtmelAT89C51isapowerfulmicrocomputerwhichprovidesahighly-flexibleandcost-effectivesolutiontomanyembeddedcontrolapplications.
二Functioncharacteristic
TheAT89C51providesthefollowingstandardfeatures:
4KbytesofFlash,128bytesofRAM,32I/Olines,two16-bittimer/counters,one5vectortwo-levelinterruptarchitecture,afullduplexserialport,one-chiposcillatorandclockcircuitry.Inaddition,theAT89C51isdesignedwithstaticlogicforoperationdowntozerofrequencyandsupportstwosoftwareselectablepowersavingmodes.TheIdleModestopstheCPUwhileallowingtheRAM,timer/counters,serialportandinterruptsystemtocontinuefunctioning.ThePower-downModesavestheRAMcontentsbutfreezestheoscillatordisablingallotherchipfunctionsuntilthenexthardwarereset.
PinDescription
VCC:
Supplyvoltage.
GND:
Ground.
Port0
Port0isan8-bitopen-drainbi-directionalI/Oport.Asanoutputport,eachpincansinkeightTTLinputs.When1sarewrittentoport0pins,thepinscanbeusedashigh-impedanceinputs.Port0mayalsobeconfiguredtobethemultiplexedaddress/databusduringaccessestoexternalprogramanddatamemory.InthismodeP0hasinternalPull-upresistor.Port0alsoreceivesthecodebytesduringFlashprogramming,andoutputsthecodebytesduringProgramverification.ExternalPull-upresistorsarerequiredduringProgramverification.
Port1
Port1isan8-bitbi-directionalI/OportwithinternalPull-upresistors.ThePort1outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort1pinstheyarepulledhighbytheinternalPull-upresistorsandcanbeusedasinputs.Asinputs,Port1pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalPull-upresistors.Port1alsoreceivesthelow-orderaddressbytesduringFlashprogrammingandverification.
Port2
Port2isan8-bitbi-directionalI/OportwithinternalPull-upresistor.ThePort2outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort2pinstheyarepulledhighbytheinternalPull-upresistorandcanbeusedasinputs.Asinputs,Port2pinsthatareexternallybeingpulledlowwillsourcecurrent,becauseoftheinternalPull-upresistor.Port2emitsthehigh-orderaddressbyteduringfetchesfromexternalprogrammemoryandduringaccessestoexternaldatamemorythatuse16-bitaddresses.Inthisapplication,itusesstronginternalPull-upresistorwhenemitting1s.Duringaccessestoexternaldatamemorythatuse8-bitaddresses,Port2emitsthecontentsoftheP2SpecialFunctionRegister.Port2alsoreceivesthehigh-orderaddressbitsandsomecontrolsignalsduringFlashprogrammingandverification.
Port3
Port3isan8-bitbi-directionalI/OportwithinternalPull-upresistor.ThePort3outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort3pinstheyarepulledhighbytheinternalPull-upresistorandcanbeusedasinputs.Asinputs,Port3pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseofthePull-upresistor.Port3alsoservesthefunctionsofvariousspecialfeaturesoftheAT89C51aslistedbelow:
Port3alsoreceivessomecontrolsignalsforFlashprogrammingandverification.
RST
Resetinput.Ahighonthispinfortwomachinecycleswhiletheoscillatorisrunningresetsthedevice.
ALE/PROG
AddressLatchEnableoutputpulseforlatchingthelowbyteoftheaddressduringaccessestoext