




已閱讀5頁,還剩9頁未讀, 繼續免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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),andextendingconventionallyto300m.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/HeatingInfraredradiationispopularlyknownasheatradiation,butlightandelectromagneticwavesofanyfrequencywillheatsurfacesthatabsorbthem.InfraredlightfromtheSunonlyaccountsfor49%oftheheatingoftheEarth,withtherestbeingcausedbyvisiblelightthatisabsorbedthenre-radiatedatlongerwavelengths.Visiblelightorultraviolet-emittinglaserscancharpaperandincandescentlyhotobjectsemitvisibleradiation.Objectsatroomtemperaturewillemitradiationmostlyconcentratedinthe8to25mband,butthisisnotdistinctfromtheemissionofvisiblelightbyincandescentobjectsandultravioletbyevenhotterobjects(seeblackbodyandWiensdisplacementlaw).Heatisenergyintransientformthatflowsduetotemperaturedifference.Unlikeheattransmittedbythermalconductionorthermalconvection,radiationcanpropagatethroughavacuum.Theconceptofemissivityisimportantinunderstandingtheinfraredemissionsofobjects.Thisisapropertyofasurfacewhichdescribeshowitsthermalemissionsdeviatefromtheidealofablackbody.Tofurtherexplain,twoobjectsatthesamephysicaltemperaturewillnotappearthesametemperatureinaninfraredimageiftheyhavedifferingemissivities.ThermographyInfraredradiationcanbeusedtoremotelydeterminethetemperatureofobjects(iftheemissivityisknown).Thisistermedthermography,orinthecaseofveryhotobjectsintheNIRorvisibleitistermedpyrometry.Thermography(thermalimaging)ismainlyusedinmilitaryandindustrialapplicationsbutthetechnologyisreachingthepublicmarketintheformofinfraredcamerasoncarsduetothemassivelyreducedproductioncosts.Thermographic.camerasdetectradiationintheinfraredrangeoftheelectromagneticspectrum(roughly90014,000nanometersor0.914m)andproduceimagesofthatradiation.Sinceinfraredradiationisemittedbyallobjectsbasedontheirtemperatures,accordingtotheblackbodyradiationlaw,thermographymakesitpossibletoseeonesenvironmentwithorwithoutvisibleillumination.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.5mand50m.NightvisionInfraredisusedinnightvisionequipmentwhenthereisinsufficientvisiblelighttosee.Nightvisiondevicesoperatethroughaprocessinvolvingtheconversionofambientlightphotonsintoelectronswhicharethenamplifiedbyache
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- T/ZHHX 001-2023木本花卉水肥一體化智能滴灌栽培指南
- 兒童防拐騙安全教育
- 醫學視覺呈現與學科前沿
- 2025西安音樂學院輔導員考試試題及答案
- 2025贛州師范高等專科學校輔導員考試試題及答案
- 2025綿陽飛行職業學院輔導員考試試題及答案
- 2025福州英華職業學院輔導員考試試題及答案
- T/ZGM 001-2021家用和類似用途飲用水凈化裝置用納濾膜元件
- 健康體檢課件下載
- 健康體檢課件2021
- 藝考調式分析試題及答案
- 氣體分餾裝置操作工試題庫(初中高級工)
- 2025年海南省高三三模高考物理試卷試題(含答案詳解)
- 創傷中心面試題及答案
- 2024年宿州泗縣縣屬國有企業公開招聘工作人員33人筆試參考題庫附帶答案詳解
- 2025春季學期國開電大本科《人文英語3》一平臺在線形考綜合測試(形考任務)試題及答案
- 燃氣自愿過戶協議書
- 高考政治答題技巧與模板構建之選必二《法律與生活》答題模板
- 2025年質量員(市政工程)專業技能練習題庫及答案(完整版)
- 基于云的在線教育平臺用戶體驗優化
- 2025屆廣西柳州市名校高考沖刺押題(最后一卷)化學試卷含解析
評論
0/150
提交評論