已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 运送沙石行业分析
- 过敏嘴唇的护理措施
- 输血的护理诊断措施
- 关于建立中国公共财政的思考
- 临终关怀简介介绍
- 中小学幼儿园疫情防护开学家长会
- 软件行业特征分析
- 品质管控体系改革计划
- 可穿戴设备在医疗健康领域的市场潜力研究
- 2023年企业资源规划(ERP)系统实施效果评估
- 胸腔闭式引流护理-2023年中华护理学会团体标准
- 电子版的离婚协议书电子版离婚协议书怎么弄
- 演艺事务授权委托合同书
- 2023年福建省事业单位真题解析(共500题含答案解析)高频考点题库参考模拟练习试卷
- 小学心理健康教育-《认识自我-我的优缺点》教学课件设计
- 导乐陪伴分娩【妇产科】-课件
- 2023年部编版五年级语文下学期全册月考试题及答案(共4套)
- 公司安全生产标准化管理制度汇编
- 2023学年完整公开课版加法交换律
- 云南昆明呈贡区人民政府斗南街道办事处招考聘用模拟预测(共1000题)笔试备考题库及答案解析
- 绘本故事《迟到的理由》
评论
0/150
提交评论