AT89S52外文文献外文翻译、中英对照、英汉互译.doc
AT89S52TheAT89S52isalow-power,high-performanceCMOS8-bitmicrocomputerwith8KbytesofFlashprogrammableanderasablereadonlymemory(PEROM).ThedeviceismanufacturedusingAtmelshigh-densitynonvolatilememorytechnologyandiscompatiblewiththeindustry-standard80S51and80S52instructionsetandpinout.Theon-chipFlashallowstheprogrammemorytobereprogrammedin-systemorbyaconventionalnonvolatilememoryprogrammer.Bycombiningaversatile8-bitCPUwithFlashonamonolithicchip,theAtmelAT89S52isapowerfulmicrocomputerwhichprovidesahighly-flexibleandcost-effectivesolutiontomanyembeddedcontrolapplications.TheAT89S52providesthefollowingstandardfeatures:8KbytesofFlash,256bytesofRAM,32I/Olines,three16-bittimer/counters,asix-vectortwo-levelinterruptarchitecture,afull-duplexserialport,on-chiposcillator,andclockcircuitry.Inaddition,theAT89S52isdesignedwithstaticlogicforoperationdowntozerofrequencyandsupportstwosoftwareselectablepowersavingmodes.TheIdleModestopstheCPUwhileallowingtheRAM,timer/counters,serialport,andinterruptsystemtocontinuefunctioning.ThePower-downmodesavestheRAMcontentsbutfreezestheoscillator,disablingallotherchipfunctionsuntilthenexthardwarereset.VCC:Supplyvoltage.GND:Ground.Port0:Port0isan8-bitopendrainbi-directionalI/Oport.Asanoutputport,eachpincansinkeightTTLinputs.When1sarewrittentoport0pins,thepinscanbeusedashigh-impedanceinputs.Port0canalsobeconfiguredtobethemultiplexedlow-orderaddress/databusduringaccessestoexternalpro-gramanddatamemory.Inthismode,P0hasinternalpullups.Port0alsoreceivesthecodebytesduringFlashprogrammingandoutputsthecodebytesduringprogramverification.Externalpullupsarerequiredduringprogramverification.Port1:Port1isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort1outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort1pins,theyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port1pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.Inaddition,P1.0andP1.1canbeconfiguredtobethetimer/counter2externalcountinput(P1.0/T2)andthetimer/counter2triggerinput(P1.1/T2EX),respectively,asshowninthefollowingtable.Port1alsoreceivesthelow-orderaddressbytesduringFlashprogrammingandverification.Port2:Port2isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort2outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort2pins,theyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port2pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.Port2emitsthehigh-orderaddressbyteduringfetchesfromexternalprogrammemoryandduringaccessestoexternaldatamemorythatuse16-bitaddresses(MOVXDPTR).Inthisapplication,Port2usesstronginternalpullupswhenemitting1s.Duringaccessestoexternaldatamemorythatuse8-bitaddresses(MOVXRI),Port2emitsthecontentsoftheP2SpecialFunctionRegister.Port2alsoreceivesthehigh-orderaddressbitsandsomecontrolsignalsduringFlashprogrammingandverification.Port3:Port3isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort3outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort3pins,theyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port3pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseofthepullups.Port3alsoservesthefunctionsofvariousspecialfeaturesoftheAT89C51,asshowninthefollowingtable.Port3alsoreceivessomecontrolsignalsforFlashprogrammingandverification.RST:Resetinput.Ahighonthispinfortwomachinecycleswhiletheoscillatorisrunningresetsthedevice.ALE/PROG:AddressLatchEnableisanoutputpulseforlatchingthelowbyteoftheaddressduringaccessestoexternalmemory.Thispinisalsotheprogrampulseinput(PROG)duringFlashprogramming.Innormaloperation,ALEisemittedataconstantrateof1/6theoscillatorfrequencyandmaybeusedforexternaltimingorclockingpurposes.Note,however,thatoneALEpulseisskippedduringeachaccesstoexternaldatamemory.Ifdesired,ALEoperationcanbedisabledbysettingbit0ofSFRlocation8EH.Withthebitset,ALEisactiveonlyduringaMOVXorMOVCinstruction.Otherwise,thepinisweaklypulledhigh.SettingtheALE-disablebithasnoeffectifthemicrocontrollerisinexternalexecutionmode.PSEN:ProgramStoreEnableisthereadstrobetoexternalpro-grammemory.WhentheAT89S52isexecutingcodefromexternalpro-grammemory,PSENisactivatedtwiceeachmachinecycle,exceptthattwoPSENactivationsareskippedduringeachaccesstoexternaldatamemory.EA/VPP:ExternalAccessEnable.EAmustbestrappedtoGNDinordertoenablethedevicetofetchcodefromexternalprogrammemorylocationsstartingat0000HuptoFFFFH.Note,however,thatiflockbit1isprogrammed,EAwillbeinternallylatchedonreset.EAshouldbestrappedtoVccforinternalprogramexecutions.Thispinalsoreceivesthe12-voltprogrammingenablevoltage(Vpp)duringFlashprogrammingwhen12-voltprogrammingisselected.XTAL1:Inputtotheinvertingoscillatoramplifierandinputtotheinternalclockoperatingcircuit.XTAL2:Outputfromtheinvertingoscillatoramplifier.SpecialFunctionRegisters:Amapoftheon-chipmemoryareacalledtheSpecialFunctionRegister(SFR)spaceisshowninTable1.Notethatnotalloftheaddressesareoccupied,andunoccupiedaddressesmaynotbeimplementedonthechip.Readaccessestotheseaddresseswillingeneralreturnrandomdata,andwriteaccesseswillhaveanindeterminateeffect.Usersoftwareshouldnotwrite1stotheseunlistedlocations,sincetheymaybeusedinfutureproductstoinvokenewfeatures.Inthatcase,theresetorinactivevaluesofthenewbitswillalwaysbe0.Timer2RegistersControlandstatusbitsarecontainedinregistersT2CON(showninTable2)andT2MOD(showninTable4)forTimer2.Theregisterpair(RCAP2H,RCAP2L)aretheCapture/ReloadregistersforTimer2in16-bitcapturemodeor16-bitauto-reloadmode.InterruptRegistersTheindividualinterruptenablebitsareintheIEregister.TwoprioritiescanbesetforeachofthesixinterruptsourcesintheIPregister.DataMemory:TheAT89S52implements256bytesofon-chipRAM.Theupper128bytesoccupyaparalleladdressspacetotheSpecialFunctionRegisters.Thatmeanstheupper128byteshavethesameaddressesastheSFRspacebutarephysicallyseparatefromSFRspace.Whenaninstructionaccessesaninternallocationaboveaddress7FH,theaddressmodeusedintheinstructionspecifieswhethertheCPUaccessestheupper128bytesofRAMortheSFRspace.InstructionsthatusedirectaddressingaccessSFRspace.Forexample,thefollowingdirectaddressinginstructionaccessestheSFRatlocation0A0H(whichisP2).MOV0A0H,#dataInstructionsthatuseindirectaddressingaccesstheupper128bytesofRAM.Forexample,thefollowingindirectaddressinginstruction,whereR0contains0A0H,accessesthedatabyteataddress0A0H,ratherthanP2(whoseaddressis0A0H).MOVR0,#dataNotethatstackoperationsareexamplesofindirectaddressing,sotheupper128bytesofdataRAMareavailableasstackspace.InfraredInfrared(IR)lightiselectromagneticradiationwithawavelengthlongerthanthatofvisiblelight,measuredfromthenominaledgeofvisibleredlightat0.74microm-etres(µm),andextendingconventionallyto300µm.Thesewavelengthscorrespondtoafrequencyrangeofapproximately1to400THz,andincludemostofthethermalradiationemittedbyobjectsnearroomtemperature.Microscopically,IRlightistypicallyemittedorabsorbedbymoleculeswhentheychangetheirrotational-vibrationalmovements.Infraredlightisusedinindustrial,scientific,andmedicalapplications.Night-visiondevicesusinginfraredilluminationallowpeopleoranimalstobeobservedwithouttheobserverbeingdetected.Inastronomy,imagingatinfraredwavelengthsallowsobservationofobjectsobscuredbyinterstellardust.Infraredimagingcamerasareusedtodetectheatlossininsulatedsystems,observechangingbloodflowintheskin,andoverheatingofelectricalapparatus.MuchoftheenergyfromtheSunarrivesonEarthintheformofinfraredradiation.Sunlightatzenithprovidesanirradianceofjustover1kilowattpersquaremeteratsealevel.Ofthisenergy,527wattsisinfraredradiation,445wattsisvisiblelight,and32wattsisultravioletradiation.ThebalancebetweenabsorbedandemittedinfraredradiationhasacriticaleffectontheEarthsclimate.Objectsgenerallyemitinfraredradiationacrossaspectrumofwavelengths,butsometimesonlyalimitedregionofthespectrumisofinterestbecausesensorsusuallycollectradiationonlywithinaspecificbandwidth.Therefore,theinfraredbandisoftensubdividedintosmallersections.MuchoftheenergyfromtheSunarrivesonEarthintheformofinfraredradiation.Sunlightatzenithprovidesanirradianceofjustover1kilowattpersquaremeteratsealevel.Ofthisenergy,527wattsisinfraredradiation,445wattsisvisiblelight,and32wattsisultravioletradiation.ThebalancebetweenabsorbedandemittedinfraredradiationhasacriticaleffectontheEarthsclimate.Objectsgenerallyemitinfraredradiationacrossaspectrumofwavelengths,butsometimesonlyalimitedregionofthespectrumisofinterestbecausesensorsusuallycollectradiationonlywithinaspecificbandwidth.Therefore,theinfraredbandisoftensubdividedintosmallersections.Heat/HeatingInfraredradiationispopularlyknownas"heatradiation",butlightandelectromagneticwavesofanyfrequencywillheatsurfacesthatabsorbthem.InfraredlightfromtheSunonlyaccountsfor49%oftheheatingoftheEarth,withtherestbeingcausedbyvisiblelightthatisabsorbedthenre-radiatedatlongerwavelengths.Visiblelightorultraviolet-emittinglaserscancharpaperandincandescentlyhotobjectsemitvisibleradiation.Objectsatroomtemperaturewillemitradiationmostlyconcentratedinthe8to25µmband,butthisisnotdistinctfromtheemissionofvisiblelightbyincandescentobjectsandultravioletbyevenhotterobjects(seeblackbodyandWiensdisplacementlaw).Heatisenergyintransientformthatflowsduetotemperaturedifference.Unlikeheattransmittedbythermalconductionorthermalconvection,radiationcanpropagatethroughavacuum.Theconceptofemissivityisimportantinunderstandingtheinfraredemissionsofobjects.Thisisapropertyofasurfacewhichdescribeshowitsthermalemissionsdeviatefromtheidealofablackbody.Tofurtherexplain,twoobjectsatthesamephysicaltemperaturewillnot"appear"thesametemperatureinaninfraredimageiftheyhavedifferingemissivities.ThermographyInfraredradiationcanbeusedtoremotelydeterminethetemperatureofobjects(iftheemissivityisknown).Thisistermedthermography,orinthecaseofveryhotobjectsintheNIRorvisibleitistermedpyrometry.Thermography(thermalimaging)ismainlyusedinmilitaryandindustrialapplicationsbutthetechnologyisreachingthepublicmarketintheformofinfraredcamerasoncarsduetothemassivelyreducedproductioncosts.Thermographic.camerasdetectradiationintheinfraredrangeoftheelectromagneticspectrum(roughly90014,000nanometersor0.914m)andproduceimagesofthatradiation.Sinceinfraredradiationisemittedbyallobjectsbasedontheirtemperatures,accordingtotheblackbodyradiationlaw,thermographymakesitpossibleto"see"onesenvironmentwithorwithoutvisibleillumination.Theamountofradiationemittedbyanobjectincreaseswithtemperature,thereforethermographyallowsonetoseevariationsintemperature(hencethename).Infraredradiationcanbeusedasadeliberateheatingsource.Forexampleitisusedininfraredsaunastoheattheoccupants,andalsotoremoveicefromthewingsofaircraft(de-icing).FIRisalsogainingpopularityasasafeheattherapymethodofnaturalhealthcare&physiotherapy.Infraredcanbeusedincookingandheatingfoodasitpredominantlyheatstheopaque,absorbentobjects,ratherthantheairaroundthem.Infraredheatingisalsobecomingmorepopularinindustrialmanufacturingprocesses,e.g.curingofcoatings,formingofplastics,annealing,plasticwelding,printdrying.Intheseapplications,infraredheatersreplaceconvectionovensandcontactheating.Efficiencyisachievedbymatchingthewavelengthoftheinfraredheatertotheabsorptioncharacteristicsofthematerial.ClimatologyInthefieldofclimatology,atmosphericinfraredradiationismonitoredtodetecttrendsintheenergyexchangebetweentheearthandtheatmosphere.ThesetrendsprovideinformationonlongtermchangesintheEarthsclimate.Itisoneoftheprimaryparametersstudiedinresearchintoglobalwarmingtogetherwithsolarradiation.Apyrgeometerisutilizedinthisfieldofresearchtoperformcontinuousoutdoormeasurements.Thisisabroadbandinfraredradiometerwithsensitivityforinfraredradiationbetweenapproximately4.5µmand50µm.NightvisionInfraredisusedinnightvisionequipmentwhenthereisinsufficientvisiblelighttosee.Nightvisiondevicesoperatethroughaprocessinvolvingtheconversionofambientlightphotonsintoelectronswhicharethenamplifiedbyachemicalandelectricalprocessandthenconvertedbackintovisiblelight.Infraredlightsourcescanbeusedtoaugmenttheavailableambientlightforconversionbynightvisiondevices,increasingin-the-darkvisibilitywithoutactuallyusingavisiblelightsource.Theuseofinfraredlightandnightvisiondevicesshouldnotbeconfusedwiththermalimagingwhichcreatesimagesbasedondifferencesinsurfacetemperaturebydetectinginfraredradiation(heat)thatemanatesfromobjectsandtheirsurroundingenvironment.AstronomyAstronomersobserveobjectsintheinfraredportionoftheelectromagneticspectrumusingopticalcomponents,includingmirrors,lensesandsolidstatedigitaldetectors.Forthisreasonitisclassifiedaspartofopticalastronomy.Toformanimage,thecomponentsofaninfraredtelescopeneedtobecarefullyshieldedfromheatsources,andthedetectorsarechilledusingliquidhelium.ThesensitivityofEarth-basedinfraredtelescopesissignificantlylimitedbywatervaporintheatmosphere,whichabsorbsaportionoftheinfraredradiationarrivingfromspaceoutsideofselectedatmosphericwindows.Thislimitationcanbepartiallyalleviatedbyplacingthetelescopeobservatoryatahighaltitude,orbycarryingthetelescopealoftwithaballoonoranaircraft.Spacetelescopesdonotsufferfromthishandicap,andsoouterspaceisconsideredtheideallocationforinfraredastronomy.Theinfraredportionofthespectrumhasseveralusefulbenefitsforastronomers.Cold,