欢迎来到人人文库网! | 帮助中心 人人文库renrendoc.com美如初恋!
人人文库网
首页 人人文库网 > 资源分类 > DOC文档下载

外文翻译--AT89C52单片机.doc

  • 资源大小:76.00KB        全文页数:13页
  • 资源格式: DOC        下载权限:游客/注册会员/VIP会员    下载费用:5
游客快捷下载 游客一键下载
会员登录下载
下载资源需要5

邮箱/手机号:
您支付成功后,系统会自动为您创建此邮箱/手机号的账号,密码跟您输入的邮箱/手机号一致,以方便您下次登录下载和查看订单。注:支付完成后需要自己下载文件,并不会自动发送文件哦!

支付方式: 微信支付    支付宝   
验证码:   换一换

友情提示
2、本站资源不支持迅雷下载,请使用浏览器直接下载(不支持QQ浏览器)
3、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰   

外文翻译--AT89C52单片机.doc

THEAT89C52ISALOWPOWER,HIGHPERFORMANCECMOS8BITMICROCOMPUTERWITH8KBYTESOFFLASHPROGRAMMABLEANDERASABLEREADONLYMEMORYPEROMTHEDEVICEISMANUFACTUREDUSINGATMEL’SHIGHDENSITYNONVOLATILEMEMORYTECHNOLOGYANDISCOMPATIBLEWITHTHEINDUSTRYSTANDARD80C51AND80C52INSTRUCTIONSETANDPINOUTTHEONCHIPFLASHALLOWSTHEPROGRAMMEMORYTOBEREPROGRAMMEDINSYSTEMORBYACONVENTIONALNONVOLATILEMEMORYPROGRAMMERBYCOMBININGAVERSATILE8BITCPUWITHFLASHONAMONOLITHICCHIP,THEATMELAT89C52ISAPOWERFULMICROCOMPUTERWHICHPROVIDESAHIGHLYFLEXIBLEANDCOSTEFFECTIVESOLUTIONTOMANYEMBEDDEDCONTROLAPPLICATIONSTHEAT89C52PROVIDESTHEFOLLOWINGSTANDARDFEATURES8KBYTESOFFLASH,256BYTESOFRAM,32I/OLINES,THREE16BITTIMER/COUNTERS,ASIXVECTORTWOLEVELINTERRUPTARCHITECTURE,AFULLDUPLEXSERIALPORT,ONCHIPOSCILLATOR,ANDCLOCKCIRCUITRYINADDITION,THEAT89C52ISDESIGNEDWITHSTATICLOGICFOROPERATIONDOWNTOZEROFREQUENCYANDSUPPORTSTWOSOFTWARESELECTABLEPOWERSAVINGMODESTHEIDLEMODESTOPSTHECPUWHILEALLOWINGTHERAM,TIMER/COUNTERS,SERIALPORT,ANDINTERRUPTSYSTEMTOCONTINUEFUNCTIONINGTHEPOWERDOWNMODESAVESTHERAMCONTENTSBUTFREEZESTHEOSCILLATOR,DISABLINGALLOTHERCHIPFUNCTIONSUNTILTHENEXTHARDWARERESETAMAPOFTHEONCHIPMEMORYAREACALLEDTHESPECIALFUNCTIONREGISTERSFRSPACEISSHOWNINTABLE1NOTETHATNOTALLOFTHEADDRESSESAREOCCUPIED,ANDUNOCCUPIEDADDRESSESMAYNOTBEIMPLEMENTEDONTHECHIPREADACCESSESTOTHESEADDRESSESWILLINGENERALRETURNRANDOMDATA,ANDWRITEACCESSESWILLHAVEANINDETERMINATEEFFECTUSERSOFTWARESHOULDNOTWRITE1STOTHESEUNLISTEDLOCATIONS,SINCETHEYMAYBEUSEDINFUTUREPRODUCTSTOINVOKENEWFEATURESINTHATCASE,THERESETORINACTIVEVALUESOFTHENEWBITSWILLALWAYSBE0CONTROLANDSTATUSBITSARECONTAINEDINREGISTERST2CONANDT2MODFORTIMER2THEREGISTERPAIRRCAP2H,RCAP2LARETHECAPTURE/RELOADREGISTERSFORTIMER2IN16BITCAPTUREMODEOR16BITAUTORELOADMODETHEINDIVIDUALINTERRUPTENABLEBITSAREINTHEIEREGISTERTWOPRIORITIESCANBESETFOREACHOFTHESIXINTERRUPTSOURCESINTHEIPREGISTERTHEAT89C52IMPLEMENTS256BYTESOFONCHIPRAMTHEUPPER128BYTESOCCUPYAPARALLELADDRESSSPACETOTHESPECIALFUNCTIONREGISTERSTHATMEANSTHEUPPER128BYTESHAVETHESAMEADDRESSESASTHESFRSPACEBUTAREPHYSICALLYSEPARATEFROMSFRSPACEWHENANINSTRUCTIONACCESSESANINTERNALLOCATIONABOVEADDRESS7FH,THEADDRESSMODEUSEDINTHEINSTRUCTIONSPECIFIESWHETHERTHECPUACCESSESTHEUPPER128BYTESOFRAMORTHESFRSPACEINSTRUCTIONSTHATUSEDIRECTADDRESSINGACCESSSFRSPACEFOREXAMPLE,THEFOLLOWINGDIRECTADDRESSINGINSTRUCTIONACCESSESTHESFRATLOCATION0A0HWHICHISP2MOV0A0H,DATAINSTRUCTIONSTHATUSEINDIRECTADDRESSINGACCESSTHEUPPER128BYTESOFRAMFOREXAMPLE,THEFOLLOWINGINDIRECTADDRESSINGINSTRUCTION,WHERER0CONTAINS0A0H,ACCESSESTHEDATABYTEATADDRESS0A0H,RATHERTHANP2WHOSEADDRESSIS0A0HMOVR0,DATANOTETHATSTACKOPERATIONSAREEXAMPLESOFINDIRECTADDRESSING,SOTHEUPPER128BYTESOFDATARAMAREAVAILABLEASSTACKSPACETIMER0AND1TIMER0ANDTIMER1INTHEAT89C52OPERATETHESAMEWAYASTIMER0ANDTIMER1INTHEAT89C51TIMER2TIMER2ISA16BITTIMER/COUNTERTHATCANOPERATEASEITHERATIMERORANEVENTCOUNTERTHETYPEOFOPERATIONISSELECTEDBYBITC/T2INTHESFRT2CONSHOWNINTABLE2TIMER2HASTHREEOPERATINGMODESCAPTURE,AUTORELOADUPORDOWNCOUNTING,ANDBAUDRATEGENERATORTHEMODESARESELECTEDBYBITSINT2CON,ASSHOWNINTABLE3TIMER2CONSISTSOFTWO8BITREGISTERS,TH2ANDTL2INTHETIMERFUNCTION,THETL2REGISTERISINCREMENTEDEVERYMACHINECYCLESINCEAMACHINECYCLECONSISTSOF12OSCILLATORPERIODS,THECOUNTRATEIS1/12OFTHEOSCILLATORFREQUENCYINTHECOUNTERFUNCTION,THEREGISTERISINCREMENTEDINRESPONSETOALTO0TRANSITIONATITSCORRESPONDINGEXTERNALINPUTPIN,T2INTHISFUNCTION,THEEXTERNALINPUTISSAMPLEDDURINGS5P2OFEVERYMACHINECYCLEWHENTHESAMPLESSHOWAHIGHINONECYCLEANDALOWINTHENEXTCYCLE,THECOUNTISINCREMENTEDTHENEWCOUNTVALUEAPPEARSINTHEREGISTERDURINGS3P1OFTHECYCLEFOLLOWINGTHEONEINWHICHTHETRANSITIONWASDETECTEDSINCETWOMACHINECYCLES24OSCILLATORPERIODSAREREQUIREDTORECOGNIZEA1TO0TRANSITION,THEMAXIMUMCOUNTRATEIS1/24OFTHEOSCILLATORFREQUENCYTOENSURETHATAGIVENLEVELISSAMPLEDATLEASTONCEBEFOREITCHANGES,THELEVELSHOULDBEHELDFORATLEASTONEFULLMACHINECYCLECAPTUREMODEINTHECAPTUREMODE,TWOOPTIONSARESELECTEDBYBITEXEN2INT2CONIFEXEN20,TIMER2ISA16BITTIMERORCOUNTERWHICHUPONOVERFLOWSETSBITTF2INT2CONTHISBITCANTHENBEUSEDTOGENERATEANINTERRUPTIFEXEN21,TIMER2PERFORMSTHESAMEOPERATION,BUTALTO0TRANSITIONATEXTERNALINPUTT2EXALSOCAUSESTHECURRENTVALUEINTH2ANDTL2TOBECAPTUREDINTORCAP2HANDRCAP2L,RESPECTIVELYINADDITION,THETRANSITIONATT2EXCAUSESBITEXF2INT2CONTOBESETTHEEXF2BIT,LIKETF2,CANGENERATEANINTERRUPTTHECAPTUREMODEISILLUSTRATEDINFIGURE1AUTORELOADUPORDOWNCOUNTERTIMER2CANBEPROGRAMMEDTOCOUNTUPORDOWNWHENCONFIGUREDINITS16BITAUTORELOADMODETHISFEATUREISINVOKEDBYTHEDCENDOWNCOUNTERENABLEBITLOCATEDINTHESFRT2MODSEETABLE4UPONRESET,THEDCENBITISSETTO0SOTHATTIMER2WILLDEFAULTTOCOUNTUPWHENDCENISSET,TIMER2CANCOUNTUPORDOWN,DEPENDINGONTHEVALUEOFTHET2EXPINFIGURE2SHOWSTIMER2AUTOMATICALLYCOUNTINGUPWHENDCEN0INTHISMODE,TWOOPTIONSARESELECTEDBYBITEXEN2INT2CONIFEXEN20,TIMER2COUNTSUPTO0FFFFHANDTHENSETSTHETF2BITUPONOVERFLOWTHEOVERFLOWALSOCAUSESTHETIMERREGISTERSTOBERELOADEDWITHTHE16BITVALUEINRCAP2HANDRCAP2LTHEVALUESINRCAP2HANDRCAP2LAREPRESETBYSOFTWAREIFEXEN21,A16BITRELOADCANBETRIGGEREDEITHERBYANOVERFLOWORBYALTO0TRANSITIONATEXTERNALINPUTT2EXTHISTRANSITIONALSOSETSTHEEXF2BITBOTHTHETF2ANDEXF2BITSCANGENERATEANINTERRUPTIFENABLEDSETTINGTHEDCENBITENABLESTIMER2TOCOUNTUPORDOWN,ASSHOWNINFIGURE3INTHISMODE,THET2EXPINCONTROLSTHEDIRECTIONOFTHECOUNTALOGIC1ATT2EXMAKESTIMER2COUNTUPTHETIMERWILLOVERFLOWAT0FFFFHANDSETTHETF2BITTHISOVERFLOWALSOCAUSESTHE16BITVALUEINRCAP2HANDRCAP2LTOBERELOADEDINTOTHETIMERREGISTERS,TH2ANDTL2,RESPECTIVELYALOGIC0ATT2EXMAKESTIMER2COUNTDOWNTHETIMERUNDERFLOWSWHENTH2ANDTL2EQUALTHEVALUESSTOREDINRCAP2HANDRCAP2LTHEUNDERFLOWSETSTHETF2BITANDCAUSES0FFFFHTOBERELOADEDINTOTHETIMERREGISTERSTHEEXF2BITTOGGLESWHENEVERTIMER2OVERFLOWSORUNDERFLOWSANDCANBEUSEDASA17THBITOFRESOLUTIONINTHISOPERATINGMODE,EXF2DOESNOTFLAGANINTERRUPTBAUDRATEGENERATORTIMER2ISSELECTEDASTHEBAUDRATEGENERATORBYSETTINGTCLKAND/ORRCLKINT2CONTABLE2NOTETHATTHEBAUDRATESFORTRANSMITANDRECEIVECANBEDIFFERENTIFTIMER2ISUSEDFORTHERECEIVERORTRANSMITTERANDTIMER1ISUSEDFORTHEOTHERFUNCTIONSETTINGRCLKAND/ORTCLKPUTSTIMER2INTOITSBAUDRATEGENERATORMODE,ASSHOWNINFIGURE4THEBAUDRATEGENERATORMODEISSIMILARTOTHEAUTORELOADMODE,INTHATAROLLOVERINTH2CAUSESTHETIMER2REGISTERSTOBERELOADEDWITHTHE16BITVALUEINREGISTERSRCAP2HANDRCAP2L,WHICHAREPRESETBYSOFTWARETHETIMERCANBECONFIGUREDFOREITHERTIMERORCOUNTEROPERATIONINMOSTAPPLICATIONS,ITISCONFIGUREDFORTIMEROPERATIONCP/T20THETIMEROPERATIONISDIFFERENTFORTIMER2WHENITISUSEDASABAUDRATEGENERATORNORMALLY,ASATIMER,ITINCREMENTSEVERYMACHINECYCLEAT1/12THEOSCILLATORFREQUENCYASABAUDRATEGENERATOR,HOWEVER,ITINCREMENTSEVERYSTATETIMEAT1/2THEOSCILLATORFREQUENCYTIMER2ASABAUDRATEGENERATORISSHOWNINFIGURE4THISFIGUREISVALIDONLYIFRCLKORTCLK1INT2CONNOTETHATAROLLOVERINTH2DOESNOTSETTF2ANDWILLNOTGENERATEANINTERRUPTNOTETOO,THATIFEXEN2ISSET,ALTO0TRANSITIONINT2EXWILLSETEXF2BUTWILLNOTCAUSEARELOADFROMRCAP2H,RCAP2LTOTH2,TL2THUSWHENTIMER2ISINUSEASABAUDRATEGENERATOR,T2EXCANBEUSEDASANEXTRAEXTERNALINTERRUPTNOTETHATWHENTIMER2ISRUNNINGTR21ASATIMERINTHEBAUDRATEGENERATORMODE,TH2ORTL2SHOULDNOTBEREADFROMORWRITTENTOUNDERTHESECONDITIONS,THETIMERISINCREMENTEDEVERYSTATETIME,ANDTHERESULTSOFAREADORWRITEMAYNOTBEACCURATETHERCAP2REGISTERSMAYBEREADBUTSHOULDNOTBEWRITTENTO,BECAUSEAWRITEMIGHTOVERLAPARELOADANDCAUSEWRITEAND/ORRELOADERRORSTHETIMERSHOULDBETURNEDOFFCLEARTR2BEFOREACCESSINGTHETIMER2ORRCAP2REGISTERSPROGRAMMABLECLOCKOUTA50DUTYCYCLECLOCKCANBEPROGRAMMEDTOCOMEOUTONP10,ASSHOWNINFIGURE5THISPIN,BESIDESBEINGAREGULARI/0PIN,HASTWOALTERNATEFUNCTIONSITCANBEPROGRAMMEDTOINPUTTHEEXTERNALCLOCKFORTIMER/COUNTER2ORTOOUTPUTA50DUTYCYCLECLOCKRANGINGFROM61HZTO4MHZATA16MHZOPERATINGFREQUENCYTOCONFIGURETHETIMER/COUNTER2ASACLOCKGENERATOR,BITC/T2T2CON1MUSTBECLEAREDANDBITT2OET2MOD1MUSTBESETBITTR2T2CON2STARTSANDSTOPSTHETIMERTHECLOCKOUTFREQUENCYDEPENDSONTHEOSCILLATORFREQUENCYANDTHERELOADVALUEOFTIMER2CAPTUREREGISTERSRCAP2H,RCAP2LINTHECLOCKOUTMODE,TIMER2ROLLOVERSWILLNOTGENERATEANINTERRUPTTHISBEHAVIORISSIMILARTOWHENTIMER2ISUSEDASABAUDRATEGENERATORITISPOSSIBLETOUSETIMER2ASABAUDRATEGENERATORANDACLOCKGENERATORSIMULTANEOUSLYNOTE,HOWEVER,THATTHEBAUDRATEANDCLOCKOUTFREQUENCIESCANNOTBEDETERMINEDINDEPENDENTLYFROMONEANOTHERSINCETHEYBOTHUSERCAP2HANDRCAP2LUARTTHEUARTINTHEAT89C52OPERATESTHESAMEWAYASTHEUARTINTHEAT89C51INTERRUPTSTHEAT89C52HASATOTALOFSIXINTERRUPTVECTORSTWOEXTERNALINTERRUPTSINT0ANDINT1,THREETIMERINTERRUPTSTIMERS0,1,AND2,ANDTHESERIALPORTINTERRUPTTHESEINTERRUPTSAREALLSHOWNINFIGURE6EACHOFTHESEINTERRUPTSOURCESCANBEINDIVIDUALLYENABLEDORDISABLEDBYSETTINGORCLEARINGABITINSPECIALFUNCTIONREGISTERIEIEALSOCONTAINSAGLOBALDISABLEBIT,EA,WHICHDISABLESALLINTERRUPTSATONCENOTETHATTABLE5SHOWSTHATBITPOSITIONIE6ISUNIMPLEMENTEDINTHEAT89C51,BITPOSITIONIE5ISALSOUNIMPLEMENTEDUSERSOFTWARESHOULDNOTWRITE1STOTHESEBITPOSITIONS,SINCETHEYMAYBEUSEDINFUTUREAT89PRODUCTSTIMER2INTERRUPTISGENERATEDBYTHELOGICALOROFBITSTF2ANDEXF2INREGISTERT2CONNEITHEROFTHESEFLAGSISCLEAREDBYHARDWAREWHENTHESERVICEROUTINEISVECTOREDTOINFACT,THESERVICEROUTINEMAYHAVETODETERMINEWHETHERITWASTF2OREXF2THATGENERATEDTHEINTERRUPT,ANDTHATBITWILLHAVETOBECLEAREDINSOFTWARETHETIMER0ANDTIMER1FLAGS,TF0ANDTFI,ARESETATS5P2OFTHECYCLEINWHICHTHETIMERSOVERFLOWTHEVALUESARETHENPOLLEDBYTHECIRCUITRYINTHENEXTCYCLEHOWEVER,THETIMER2FLAG,TF2,ISSETATS2P2ANDISPOLLEDINTHESAMECYCLEINWHICHTHETIMEROVERFLOWSOSCILLATORCHARACTERISTICSXTAL1ANDXTAL2ARETHEINPUTANDOUTPUT,RESPECTIVELY,OFANINVERTINGAMPLIFIERTHATCANBECONFIGUREDFORUSEASANONCHIPOSCILLATOR,ASSHOWNINFIGURE7EITHERAQUARTZCRYSTALORCERAMICRESONATORMAYBEUSEDTODRIVETHEDEVICEFROMANEXTERNALCLOCKSOURCE,XTAL2SHOULDBELEFTUNCONNECTEDWHILEXTAL1ISDRIVEN,ASSHOWNINFIGURE8THEREARENOREQUIREMENTSONTHEDUTYCYCLEOFTHEEXTERNALCLOCKSIGNAL,SINCETHEINPUTTOTHEINTERNALCLOCKINGCIRCUITRYISTHROUGHADIVIDEBYTWOFLIPFLOP,BUTMINIMUMANDMAXIMUMVOLTAGEHIGHANDLOWTIMESPECIFICATIONSMUSTBEOBSERVEDIDLEMODEINIDLEMODE,THECPUPUTSITSELFTOSLEEPWHILEALLTHEONCHIPPERIPHERALSREMAINACTIVETHEMODEISINVOKEDBYSOFTWARETHECONTENTOFTHEONCHIPRAMANDALLTHESPECIALFUNCTIONSREGISTERSREMAINUNCHANGEDDURINGTHISMODETHEIDLEMODECANBETERMINATEDBYANYENABLEDINTERRUPTORBYAHARDWARERESETNOTETHATWHENIDLEMODEISTERMINATEDBYAHARDWARERESET,THEDEVICENORMALLYRESUMESPROGRAMEXECUTIONFROMWHEREITLEFTOFF,UPTOTWOMACHINECYCLESBEFORETHEINTERNAL

注意事项

本文(外文翻译--AT89C52单片机.doc)为本站会员(英文资料库)主动上传,人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知人人文库网(发送邮件至[email protected]或直接QQ联系客服),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。

关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服客服 - 联系我们

网站客服QQ:2846424093    人人文库上传用户QQ群:460291265   

[email protected] 2016-2018  renrendoc.com 网站版权所有   南天在线技术支持

经营许可证编号:苏ICP备12009002号-5