




已阅读5页,还剩16页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
第1页外文文献资料WirelesssensornetworksTheat89s52isalow-power,high-performanceCMOS8-bitmicrocomputerwith4KbytesofFlashProgrammableandErasableReadOnlyMemory(PEROM)and128bytesRAM.ThedeviceismanufacturedusingAtmelshighdensitynonvolatilememorytechnologyandiscompatiblewiththeindustrystandardMCS-51instructionsetandpinout.Thechipcombinesaversatile8-bitCPUwithFlashonamonolithicchip,theAtmelat89s52isapowerfulmicrocomputerwhichprovidesahighlyflexibleandcosteffectivesolutiontomanyembeddedcontrolapplications.Features:CompatiblewithMCS-51Products4KBytesofIn-SystemReprogrammableFlashMemoryEndurance:1,000Write/EraseCyclesFullyStaticOperation:0Hzto24MHzThree-LevelProgramMemoryLock128x8-BitInternalRAM32ProgrammableI/OLinesTwo16-BitTimer/CountersSixInterruptSourcesProgrammableSerialChannelLowPowerIdleandPowerDownModes第2页Theat89s52providesthefollowingstandardfeatures:4KbytesofFlash,128bytesofRAM,32I/Olines,two16-bittimer/counters,afivevectortwo-levelinterruptarchitecture,afullduplexserialport,on-chiposcillatorandclockcircuitry.In第3页addition,theat89s52isdesignedwithstaticlogicforoperationdowntozerofrequencyandsupportstwosoftwareselectablepowersavingmodes.TheIdleModestopstheCPUwhileallowingtheRAM,timer/counters,serialportandinterruptsystemtocontinuefunctioning.ThePowerDownModesavestheRAMcontentsbutfreezestheoscillatordisablingallotherchipfunctionsuntilthenexthardwarereset.PinDescription:VCCSupplyvoltage.GNDGround.Port0Port0isan8-bitopendrainbidirectionalI/Oport.AsanoutputporteachpincansinkeightTTLinputs.Whenisarewrittentoport0pins,thepinscanbeusedashighimpedanceinputs.Port0mayalsobeconfiguredtobethemultiplexedloworderaddress/databusduringaccessestoexternalprogramanddatamemory.InthismodeP0hasinternalpullups.Port0alsoreceivesthecodebytesduringFlashprogramming,andoutputsthecodebytesduringprogramverification.Externalpullupsarerequiredduringprogramverification.Port1Port1isan8-bitbidirectionalI/Oportwithinternalpullups.ThePort1outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort1pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port1pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.Port1alsoreceivesthelow-orderaddressbytesduringFlashprogrammingandverification.Port2Port2isan8-bitbidirectionalI/Oportwithinternalpullups.ThePort2outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort2pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port2pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.第4页Port2emitsthehigh-orderaddressbyteduringfetchesfromexternalprogrammemoryandduringaccessestoexternaldatamemorythatuse16-bitaddresses(MOVXDPTR).Inthisapplicationitusesstronginternalpull-upswhenemitting1s.Duringaccessestoexternaldatamemorythatuse8-bitaddresses(MOVXRI),Port2emitsthecontentsoftheP2SpecialFunctionRegister.Port2alsoreceivesthehigh-orderaddressbitsandsomecontrolsignalsduringFlashprogrammingandverification.Port3Port3isan8-bitbidirectionalI/Oportwithinternalpullups.ThePort3outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort3pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port3pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseofthepullups.Port3alsoservesthefunctionsofvariousspecialfeaturesoftheat89s52aslistedbelow:Port3alsoreceivessomecontrolsignalsforFlashprogrammingandverification.RSTResetinput.Ahighonthispinfortwomachinecycleswhiletheoscillatorisrunningresetsthedevice.ALE/PROGAddressLatchEnableoutputpulseforlatchingthelowbyteoftheaddressduringaccessestoexternalmemory.Thispinisalsotheprogrampulseinput(PROG)duringFlashprogramming.PortpinalternatefunctionsP3.0rxd(serialinputport)P3.1txd(serialoutputport)P3.2int0(externalinterrupt0)P3.3int1(externalinterrupt1)P3.4t0(timer0externalinput)P3.5t1(timer1externalinput)P3.6WR(externaldatamemorywritestrobe)P3.7rd(externaldatamemoryreadstrobe)第5页InnormaloperationALEisemittedataconstantrateof1/6theoscillatorfrequency,andmaybeusedforexternaltimingorclockingpurposes.Note,however,thatoneALEpulseisskippedduringeachaccesstoexternalDataMemory.Ifdesired,ALEoperationcanbedisabledbysettingbit0ofSFRlocation8EH.Withthebitset,ALEisactiveonlyduringaMOVXorMOVCinstruction.Otherwise,thepinisweaklypulledhigh.SettingtheALE-disablebithasnoeffectifthemicrocontrollerisinexternalexecutionmode.PSENProgramStoreEnableisthereadstrobetoexternalprogrammemory.Whentheat89s52isexecutingcodefromexternalprogrammemory,PSENisactivatedtwiceeachmachinecycle,exceptthattwoPSENactivationsareskippedduringeachaccesstoexternaldatamemory.EA/VPPExternalAccessEnable.EAmustbestrappedtoGNDinordertoenablethedevicetofetchcodefromexternalprogrammemorylocationsstartingat0000HuptoFFFFH.Note,however,thatiflockbit1isprogrammed,EAwillbeinternallylatchedonreset.EAshouldbestrappedtoVCCforinternalprogramexecutions.Thispinalsoreceivesthe12-voltprogrammingenablevoltage(VPP)duringFlashprogramming,forpartsthatrequire12-voltVPP.XTAL1Inputtotheinvertingoscillatoramplifierandinputtotheinternalclockoperatingcircuit.XTAL2Outputfromtheinvertingoscillatoramplifier.OscillatorCharacteristicsXTAL1andXTAL2aretheinputandoutput,respectively,ofaninvertingamplifierwhichcanbeconfiguredforuseasanon-chiposcillator,asshowninFigure1.Eitheraquartzcrystalorceramicresonatormaybeused.Todrivethedevicefromanexternalclocksource,XTAL2shouldbeleftunconnectedwhileXTAL1isdrivenasshowninFigure2.Therearenorequirementsonthedutycycleoftheexternalclocksignal,sincetheinputtotheinternalclockingcircuitry第6页isthroughadivide-by-twoflip-flop,butminimumandmaximumvoltagehighandlowtimespecificationsmustbeobserved.IdleModeInidlemode,theCPUputsitselftosleepwhilealltheonchipperipheralsremainactive.Themodeisinvokedbysoftware.Thecontentoftheon-chipRAMandallthespecialfunctionsregistersremainunchangedduringthismode.Theidlemodecanbeterminatedbyanyenabledinterruptorbyahardwarereset.Itshouldbenotedthatwhenidleisterminatedbyahardwarereset,thedevicenormallyresumesprogramexecution,fromwhereitleftoff,uptotwomachinecyclesbeforetheinternalresetalgorithmtakescontrol.On-chiphardwareinhibitsaccesstointernalRAMinthisevent,butaccesstotheportpinsisnotinhibited.ToeliminatethepossibilityofanunexpectedwritetoaportpinwhenIdleisterminatedbyreset,theinstructionfollowingtheonethatinvokesIdleshouldnotbeonethatwritestoaportpinortoexternalmemory.第7页StatusofExternalPinsDuringIdleandPowerDownModesmodeProgrammemoryALEpsenPort0Port1Port2Port3idleinternal11datadatadataDataIdleExternal11floatDatadataDataPowerdownInternal00DataDataDataDataPowerdownExternal00floatdataDatadataPowerDownModeInthepowerdownmodetheoscillatorisstopped,andtheinstructionthatinvokespowerdownisthelastinstructionexecuted.Theon-chipRAMandSpecialFunctionRegistersretaintheirvaluesuntilthepowerdownmodeisterminated.Theonlyexitfrompowerdownisahardwarereset.ResetredefinestheSFRsbutdoesnotchangetheon-chipRAM.TheresetshouldnotbeactivatedbeforeVCCisrestoredtoitsnormaloperatinglevelandmustbeheldactivelongenoughtoallowtheoscillatortorestartandstabilize.ProgramMemoryLockBitsOnthechiparethreelockbitswhichcanbeleftunprogrammed(U)orcanbeprogrammed(P)toobtaintheadditionalfeatureslistedinthetablebelow:LockBitProtectionModesWhenlockbit1isprogrammed,thelogiclevelattheEApinissampledandlatchedduringreset.Ifthedeviceispoweredupwithoutareset,thelatchinitializestoarandomvalue,andholdsthatvalueuntilresetisactivated.ItisnecessarythatthelatchedvalueofEAbeinagreementwiththecurrentlogiclevelatthatpininorderforthedevicetofunctionproperly.ProgrammingtheFlash:Theat89s52isnormallyshippedwiththeon-chipFlashmemoryarrayintheerasedstate(thatis,contents=FFH)andreadytobeprogrammed.Theprogramminginterfaceacceptseitherahigh-voltage(12-volt)oralow-voltage第8页(VCC)programenablesignal.Thelowvoltageprogrammingmodeprovidesaconvenientwaytoprogramtheat89s52insidetheuserssystem,whilethehigh-voltageprogrammingmodeiscompatiblewithconventionalthirdpartyFlashorEPROMprogrammers.Theat89s52isshippedwitheitherthehigh-voltageorlow-voltageprogrammingmodeenabled.Therespectivetop-sidemarkinganddevicesignaturecodesarelistedinthefollowingtable.Vpp=12vVpp=5vTop-sidemarkat89s52xxxxyywwat89s52xxxx-5yywwsignature(030H)=1EH(031H)=51H(032H)=FFH(030H)=1EH(031H)=51H(032H)=05HTheat89s52codememoryarrayisprogrammedbyte-bybyteineitherprogrammingmode.Toprogramanynonblankbyteintheon-chipFlashProgrammableandErasableReadOnlyMemory,theentirememorymustbeerasedusingtheChipEraseMode.ProgrammingAlgorithm:Beforeprogrammingtheat89s52,theaddress,dataandcontrolsignalsshouldbesetupaccordingtotheFlashprogrammingmodetableandFigures3and4.Toprogramtheat89s52,takethefollowingsteps.1.Inputthedesiredmemorylocationontheaddresslines.2.Inputtheappropriatedatabyteonthedatalines.3.Activatethecorrectcombinationofcontrolsignals.4.RaiseEA/VPPto12Vforthehigh-voltageprogrammingmode.5.PulseALE/PROGoncetoprogramabyteintheFlasharrayorthelockbits.Thebyte-writecycleisself-timedandtypicallytakesnomorethan1.5ms.Repeatsteps1through5,changingtheaddressanddatafortheentirearrayoruntiltheendoftheobjectfileisreached.DataPolling:Theat89s52featuresDataPollingtoindicatetheendofawritecycle.Duringawritecycle,anattemptedreadofthelastbytewrittenwillresultinthecomplementofthewrittendatumonPO.7.Oncethewritecyclehasbeen第9页completed,truedataarevalidonalloutputs,andthenextcyclemaybegin.DataPollingmaybeginanytimeafterawritecyclehasbeeninitiated.Ready/Busy:TheprogressofbyteprogrammingcanalsobemonitoredbytheRDY/BSYoutputsignal.P3.4ispulledlowafterALEgoeshighduringprogrammingtoindicateBUSY.P3.4ispulledhighagainwhenprogrammingisdonetoindicateREADY.ProgramVerify:IflockbitsLB1andLB2havenotbeenprogrammed,theprogrammedcodedatacanbereadbackviatheaddressanddatalinesforverification.Thelockbitscannotbeverifieddirectly.Verificationofthelockbitsisachievedbyobservingthattheirfeaturesareenabled.ChipErase:TheentireFlashProgrammableandErasableReadOnlyMemoryarrayiserasedelectricallybyusingthepropercombinationofcontrolsignalsandbyholdingALE/PROGlowfor10ms.Thecodearrayiswrittenwithall“1”s.Thechiperaseoperationmustbeexecutedbeforethecodememorycanbere-programmed.ReadingtheSignatureBytes:Thesignaturebytesarereadbythesameprocedureasanormalverificationoflocations030H,031H,and032H,exceptthatP3.6andP3.7mustbepulledtoalogiclow.Thevaluesreturnedareasfollows.(030H)=1EHindicatesmanufacturedbyAtmel(031H)=51Hindicates89C51(032H)=FFHindicates12Vprogramming(032H)=05Hindicates5VprogrammingProgrammingInterfaceEverycodebyteintheFlasharraycanbewrittenandtheentirearraycanbeerasedbyusingtheappropriatecombinationofcontrolsignals.Thewriteoperationcycleisselftimedandonceinitiated,willautomaticallytimeitselftocompletion.315MwirelessmodulePT2262/2272codecICprincipleintroduced:PT2262/2272TaiwanCapeTownproducedalow-powerCMOSprocessmanufacturinglow-costgenericcodeccircuit,PT2262/2272canhaveupto12(A0-A11)tri-stateaddresspinsend(vacant,thenhigh,thenlow),anycombinationoftheavailable531441addresscode,PT2262canhaveuptosix(D0-D5)dataterminalpins,setaddresscodeanddatacodefrom17feetserialoutputavailable第10页wirelessremotecontroltransmittercircuit.EncodedsignalemittedbythechipPT2262:addresscode,datacode,toformacompletesynchronizationcodecodeword,decoderchipPT2272receivedsignal,whichaddresscodeaftertwocomparisoncheck,VTpinonlyoutputhigh,Atthesametimethecorrespondingdatafeethighoutput,ifthesenderhasbeenholdingdownthebuttonwillcontinuouslytransmitcodedchip.PT2262launchlaunchatleastfourgroupseachword,becausethecharacteristicsofthewirelesstransmitter,thefirstsetofcodewordsisverysusceptibletointerferencezerolevel,tendtoproduceerrors,soin2272onlydetectedtwicetothesameaddresscodecodewilladddatatothedatacode1drivethecorrespondingdataoutputishighandthedriver-sidesynchronizationishighVT.Whenthetransmitterisnobuttonispressed,PT2262nopower,its17feetlow,sothehigh-frequencytransmittercircuit315MHzdoesnotwork,whenakeyispressed,PT2262electricalwork,its17-pinoutputmodulatedserialdatasignal,when17feethighduring315MHzfrequencytransmittercircuitstart-upandlaunchahigh-frequencysignalamplitude,when17feetduringtheflat315MHzfrequencytransmittercircuitstopsoscillating,sohightransmitterfrequencycontrolcircuitiscompletelyclosedPT2262digitalsignaloutputof17feet,andthushigh-frequencycircuitscompleteamplitudeshiftkeying(ASKmodulation)equivalentto100%modulationAM.PT2262Feature:1、CMOSprocess,lowpowerconsumption2、Fewexternalcomponents3、RCoscillationresistor4、Wideoperatingvoltagerange:2.6-15v5、Dataupto66、Addresscodeupto531,441kindsApplications:1、Vehicleanti-theftsystem2、Homesecuritysystems3、Remotecontroltoys4、OtherElectricRemoteControlPT2262andPT2272addresscodemustbeexactlythesameexcepttheoutside,vibrationresistancemustalsomatchthegeneralrequirementsdecoderoscillation第11页frequencyfrom2.5to8timeshigherthantheoscillationfrequencyoftheencoder,otherwisereceivingdistancebecomealmostnotevenreceive,astechnologythenumberofcompatiblechipsappearonthemarket,inactualuse,aslongasthevibrationresistancecanbesupportingtheuseofminorchanges.Inspecificapplications,theexternalvibrationresistancecanbesuitablyadjustedaccordingtoneed,thegreatertheresistance,theslowertheoscillationfrequency,thegreaterthewidthoftheencoding,codetransmittingoneframelonger.Mostproductsareonthemarketwith2262/1.2M=2272/200Kportfolio,asmallamountofproductwith2262/4.7M=2272/820K.PT2262andPT2272encodercircuitdecodingcircuitgenerallypaired,PT2262ischaracterizedinitsinternalmodulatedcodedsignalhasahighercarrierfrequency.Wanttogooutwitharemotecontrolcodeinformationistransmittedwirelessly(infraredorradio,etc.),theremustbeacarrier(carrier),thecodedmessageLoadonthecarrier(modulatedcarrier)tosendout,requiringanoscillatorcircuitandamodulationcircuit.PT2262encoderinside,alreadycontainsthesecircuitsissentfromtheDOUTendgoodabout38kHzmodulationfrequencymodulatedwave,andthereforeveryeasytouse,suitableforinfraredandultrasonicremotecontrolcircuit.Table:TheencodingcircuitPT2262PinMenuNamePinIntroductionD0-D57-8、10-13Thedatainput,thereisa1thatisencodedissuedaninternalpull-downVCC18Powersupplypositiveterminal(+)VSS9Powernegativeterminal(-)TE14Start-sidecodingforencodingmultipledatatransmission,activelowOSC116VibrationresistanceinputresistorandOSC2decidetheoscillationfrequencyOSC215VibrationresistanceoscillatoroutputDout17Encodingtheoutput(lownormal)Table:decodingcircuitPT2272legMenuNamePinIntroduction第12页A0-A111-8、10-13Addresspins,theaddressusedforencoding,maybesetto0,1,f(Vacant),mustbeconsistentwith2262,ordoesnotdecodeD0-D57-8、10-13Addressordatapins,datapinsasis,onlyinaccordancewiththeaddresscodes2262,2262anddatapinstotheoutputdatacorrespondingtothehighendlevel,otherwisetheoutputislow,thelatch-typeonlyinordertoreceivethenextdataconversionVcc18Powersupplypositiveterminal(+)VSS9Powernegativeterminal(-)DIN14signalinputterminal,outputterminalfromthereceiverOSC116VibrationresistanceinputresistorandOSC2decidetheoscillationfrequencyOSC215VibrationresistanceoscillatoroutputVT17Decodingeffectivelyconfirmtheoutput(verylow)decodingeffectivelygoeshigh(transient)第13页中文翻译稿at89s52是美国ATMEL公司生产的低电压,高性能CMOS8位单片机,片内含4Kbytes的快速可擦写的只读程序存储器(PEROM)和128bytes的随机存取数据存储器(RAM),器件采用ATMEL公司的高密度、非易失性存储技术生产,兼容标准MCS-51产品指令系统,片内置通用8位中央处理器(CPU)和flish存储单元,功能强大at89s52单片机可为您提供许多高性价比的应用场合,可灵活应用于各种控制领域。主要性能参数:与MCS-51产品指令系统完全兼容4K字节可重复写flash闪速存储器1000次擦写周期全静态操作:0HZ24MHZ三级加密程序存储器128*8字节内部RAM32个可编程I/O口2个16位定时计数器6个中断源可编程串行UART通道低功耗空闲和掉电模式功能特性概述AT89S52提供以下标准功能:4K字节flish闪速存储器,128字节内部RAM,32个I/O口线,两个16位定时计数器,一个5向量两级中断结构,一个全双工串行通信口,片内振荡器及时钟电路。同时,at89s52可降至0HZ的静态逻辑操作,并支持两种软件可选的节电工作模式。空闲方式停止CPU的工作,但允许RAM,定时计数器,串行通信口及中断系统继续工作。掉电方式保存RAM中的内容,但振荡器停止工作并禁止其它所有部件工作直到下一个硬件复位。第14页方框图引脚功能说明Vcc:电源电压GND:地P0口:P0口是一组8位漏极开路型双向I/O口,也即地址/数据总线复位口。作为输出口用时,每位能吸收电流的方式驱动8个逻辑门电路,对端口写“1”可作为高阻抗输入端用。第15页在访问外部数据存储器或程序存储器时,这组口线分时转换地址(低8位)和数据总线复用,在访问期间激活内部上拉电阻。P1口:P1是一个带内部上拉电阻的8位双向I/O口,P1的输出缓冲级可驱动(吸收或输出电流)4个TTL逻辑门电路。对端口写“1”,通过内部的上拉电阻把端口拉到高电平,此时可做熟出口。做输出口使用时,因为内部存在上拉电阻,某个引脚被外部信号拉低时会输出一个电流(Iil).Flash编程和程序校验期间,P1接受低8位地址。P2口:P2是一个带有内部上拉电阻的8位双向I/O口,P2的输出缓冲级可驱动(吸收或输出电流)4个TTL逻辑门电路。对端口写“1”,通过内部地山拉电阻把端口拉到高电平,此时可作为输出口,作输出口使用时,因为内部存在上拉电阻,某个引脚被外部信号拉低时会输出一个电流(Iil)。在访问外部程序存储器获16位地址的外部数据存储器(例如执行MOVXDPTR指令)时,P2口送出高8位地址数据。在访问8位地址的外部数据存储器(如执行MOVXRI指令)时,P2口线上的内容(也即特殊功能寄存器(SFR)区中R2寄存器的内容),在整个访问期间不改变。Flash编程或校验时,P2亦接受高地址和其它控制信号。P3口:P3口是一组带有内部上拉电阻的8位双向I/O口。P3口输出缓冲级可驱动(吸收或输出电流)4个TTL逻辑门电路。对P3口写入“1”时,他们被内部上拉电阻拉高并可作为输出口。做输出端时,被外部拉低的P3口将用上拉电阻输出电流(Iil)。P3口除了作为一般的I/O口线外,更重要的用途是它的第二功能,如下表所示:P3口还接收一些用于flash闪速存储器编程和程序校验的控制信号。RST:复位输入。当振荡器工作时,RST引脚出现两个机器周期以上高电平将使单片机复位。端口引脚第二功能P3.0rxd(串行输入口)P3.1txd(串行输出口)P3.2int0(外中断0)P3.3int1(外中断1)P3.4t0(定时/计数器0)P3.5t1(定时/计数器1)P3.6WR(外部数据存储器写选通)P3.7RD(外部数据存储器读选通)第16页ALE/PROG:当访问外部程序存储器或数据存储器时,ALE(地址所存允许)输出脉冲用于所存地址的低8位字节。即使不访问外部存储器,ALE仍以时钟振荡频率的1/6输出固定的正脉冲信号,因此它可对外输出时钟或用于定时目的。要注意的是:每当访问外部数据存储器时将跳过一个ALE脉冲。对flash存储器编程期间,该引脚还用于输入编程脉冲(PROG)。如有不要,可通过对特殊功能寄存器(SFR)区中的8EH单元的D0位置位,可禁止ALE操作。该外置位后,只要一条MOVX和MOVC指令ALE才会被激活。此外,该引脚会被微弱拉高,单片机执行外部程序时,应设置ALE无效。PSEN:程序存储允许(PSEN)输出是外部程序存储器的读选通信号,当at89s52由外部程序存储器取指令(或数据)时,每个机器周期两个PSEN有效,即输出两个脉冲。在此期间,当访问外部数据存储器,这两次有效的PSEN信号不出现。EA/VPP:外部访问允许。欲使CPU仅访问外部程序存储器(地址为0000H-FFFFH),EA端必须保持低电平(接地)。需注意的是;如果加密位LB1被编程,复位时内部会锁存EA端状态。如EA端为高电平(接VCC端),CPU则执行内部程序存储器中的指令。Flash存储器编程时,该引脚加上+12V的编程允许电源VPP,当然这必须是该器件是使用12V编程电压VPP.XTAL1:振荡器反相放大器的及内部时钟发生器的输出端。XTAL2:振荡器反相放大器的输出端。时钟振荡器:at89s52中有一个用于构成内部振荡器的高增益反相放大器,引脚XTAL1和XTAL2分别是该放大器的输入端和输出端。这个放大器与作为反馈的片外石英晶体或陶瓷谐振器一起构成自激振荡器,振荡电路参见图5。外接石英晶体(或陶瓷谐振器)及电容C1、C2接在放大器的反馈回路中构成并联振荡电路。对外接电容C1、C2虽然没有十分严格的要求,但电容容量的大小会轻微影响振荡频率的高低、振荡器的稳定性、起振的难易程度及温度稳定性,如果使用石英晶体,我们推荐电容使用30PF+10PF,而如使用陶瓷谐振器建议选择40PF+10PF。用户也可以采用外部时钟。采用外部时钟的电路如图5右所示。这种情况下,外部时钟脉冲接到XTAL1端,即内部时钟发生器的输入端,XTAL2则悬空由于外部时钟信号是通过一个2分频触发器后作为内部时钟信号的,所以对外部时钟信号的占空比没有特殊要求,但最小高电平持续时间和最大的低电平持续时间应符合产品技术要求。空闲模式:第17页在空闲工作模式状态,CPU保持睡眠状态而所有片内的外设仍保持激活状态,这种方式由软件产生。此时,片内RAM和所有特殊功能寄存器的内容保持不变。空闲模式可由任何允许的中断请求或硬件复位终止。终止空闲工作模式的方法有两种,其一是任何一条被允许中断的事件被激活,即可终止空闲工作模式。程序会首先响应中断,进入中断服务程序,执行完中断服务程序并仅随终端返回指令,下一条要执行的指令就是使单片机进入空闲模式那条指令后面的一条指令。其二是通过硬件复位也可将空闲工作模式终止,需要注意的是,当由硬件复位来终止空闲模式时,CPU通常是从激活空闲模式那条指令的下一条指令开始继续执行程序的,要完成内部复位操作,硬件复位脉冲要保持两个机器周期(24个时钟周期)有效,在这种情况下,内部禁止CPU访问片内RAM,而允许访问其它端口。为了避免可能对端口产生以外写入,激活空闲模式的那条指令后一条指令不应该是一条对端口或外部存储器的写入
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 安全教育试题及答案B
- 乐山市中考测试题及答案
- 多维大数据分析与可视化研究-洞察阐释
- 工贸企业综合应急处置预案
- 2025合同范本借款合同模板
- 厂房租赁保证金合同规范
- 高端餐厅装修设计施工及后期维护合同
- 车辆赠与及新能源汽车推广应用合同
- 餐饮企业股权激励计划股东协议合同
- 卡通里的新年愿望
- 电影叙事与美学智慧树知到期末考试答案章节答案2024年南开大学
- 《陆上风力发电建设工程质量监督检查大纲》
- emc能源管理合同
- 【专业版】短视频直播电商部门岗位职责及绩效考核指标管理实施办法
- 湖北省襄阳樊城区七校联考2025届化学九上期中统考模拟试题含解析
- 幼儿园语言故事《一顶大草帽》课件
- +期末测试卷(试题)-2023-2024学年四年级下册数学人教版
- 2024春期国开电大本科《经济学(本)》在线形考(形考任务1至6)试题及答案
- 四年级下册数学教案-8.1确定位置丨苏教版
- 【特殊场景条款】物流运输车辆租赁合同(标准版)
- 乳粉大数据与智能制造
评论
0/150
提交评论