AT89C51外文翻译毕业设计.docx

上传人:b****2 文档编号:111273 上传时间:2023-04-28 格式:DOCX 页数:20 大小:155.43KB
下载 相关 举报
AT89C51外文翻译毕业设计.docx_第1页
第1页 / 共20页
AT89C51外文翻译毕业设计.docx_第2页
第2页 / 共20页
AT89C51外文翻译毕业设计.docx_第3页
第3页 / 共20页
AT89C51外文翻译毕业设计.docx_第4页
第4页 / 共20页
AT89C51外文翻译毕业设计.docx_第5页
第5页 / 共20页
AT89C51外文翻译毕业设计.docx_第6页
第6页 / 共20页
AT89C51外文翻译毕业设计.docx_第7页
第7页 / 共20页
AT89C51外文翻译毕业设计.docx_第8页
第8页 / 共20页
AT89C51外文翻译毕业设计.docx_第9页
第9页 / 共20页
AT89C51外文翻译毕业设计.docx_第10页
第10页 / 共20页
AT89C51外文翻译毕业设计.docx_第11页
第11页 / 共20页
AT89C51外文翻译毕业设计.docx_第12页
第12页 / 共20页
AT89C51外文翻译毕业设计.docx_第13页
第13页 / 共20页
AT89C51外文翻译毕业设计.docx_第14页
第14页 / 共20页
AT89C51外文翻译毕业设计.docx_第15页
第15页 / 共20页
AT89C51外文翻译毕业设计.docx_第16页
第16页 / 共20页
AT89C51外文翻译毕业设计.docx_第17页
第17页 / 共20页
AT89C51外文翻译毕业设计.docx_第18页
第18页 / 共20页
AT89C51外文翻译毕业设计.docx_第19页
第19页 / 共20页
AT89C51外文翻译毕业设计.docx_第20页
第20页 / 共20页
亲,该文档总共20页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

AT89C51外文翻译毕业设计.docx

《AT89C51外文翻译毕业设计.docx》由会员分享,可在线阅读,更多相关《AT89C51外文翻译毕业设计.docx(20页珍藏版)》请在冰点文库上搜索。

AT89C51外文翻译毕业设计.docx

AT89C51外文翻译毕业设计

AT89C51外文翻译毕业设计

 

AT89C51

外文翻译

Description

TheAT89C51isalow-powerhigh-performanceCMOS8-bitmicrocomputerwith4KbytesofFlashProgrammableandErasableReadOnlyMemoryPEROM

ThedeviceismanufacturedusingAtmelshighdensitynonvolatilememorytechnologyandiscompatiblewiththeindustrystandardMCS-51instruction-setandpinoutTheon-chipFlashallowstheprogrammemorytobereprogrammedin-systemorbyaconventionalnonvolatilememoryprogrammerBycombiningaversatile8-bitCPUwithFlashonamonolithicchiptheAtmelAT89C51isapowerfulmicrocomputerwhichprovidesahighlyflexibleandcosteffectivesolutiontomanyembeddedcontrolapplications

Features

CompatiblewithMCS-51Products

4KBytesofIn-SystemReprogrammableFlashMemory

-Enduranee1000WriteEraseCycles

FullyStaticOperation0Hzto24MHz

Three-LevelProgramMemoryLock

128x8-BitInternalRAM

32ProgrammableIOLines

Two16-BitTimerCounters

SixInterruptSources

ProgrammableSerialChannel

LowPowerIdleandPowerDownModes

TheAT89C51providesthefollowingstandardfeatures4Kbytesof

Flash128bytesofRAM32IOlinestwo16-bittimercountersafivevectoroscillatorandclockcircuitryInadditiontheAT89C51isdesignedwithstaticlogicforoperationdowntozerofrequencyandsupportstwosoftwareselectablepowersavingmodesTheIdleModestopstheCPUwhile

allowingtheRAMtimercountersserialportandinterruptsystemtocontinuefunctioningThePower-downModesavestheRAMcontentsbutfreezestheoscillatordisablingallotherchipfunctionsuntilthenexthardwarereset

VCC

Supplyvoltage

GND

Ground

Port0

Port0isan8-bitopen-drainbi-directionalIOportAsanoutputporteachpincansinkeightTTLinputsWhen1sarewrittentoport0pinsthe

pinscanbeusedashigh-impedanceinputs

Port0mayalsobeconfiguredtobethemultiplexedlow-orderaddressdatabusduringaccessestoexternalprogramanddatamemoryInthismodeP0hasinternalpullups

Port0alsoreceivesthecodebytesduringFlashprogrammingandoutputsthecodebytesduringprogramverificationExternalpullupsarerequiredduringprogramverification

Port1

Port1isan8-bitbi-directionalIOportwithinternalpullupsThe

Port1outputbufferscansinksourcefourTTLinputsWhen1sarewritten

low

toPort1pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputsAsinputsPort1pinsthatareexternallybeingpulledwillsourcecurrentIILbecauseoftheinternalpullupsPort1alsoreceivesthelow-orderaddressbytesduringFlashprogrammingandverification

Port2

Port2isan8-bitbi-directionalIOportwithinternalpullupsThe

Port2outputbufferscansinksourcefourTTLinputsWhen1sarewrittentoPort2pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputsAsinputsPort2pinsthatareexternallybeingpulledlowwillsourcecurrentIILbecauseoftheinternalpullups

Port2emitsthehigh-orderaddressbyteduringfetchesfromexternal

programmemoryandduringaccessestoexternaldatamemorythatuse16-bitaddressesMOVXDPTRInthisapplicationitusesstronginternalpullupswhenemitting1sDuringaccessestoexternaldatamemorythatuse8-bitaddressesMOVXRIPort2emitsthecontentsoftheP2SpecialFunction

RegisterPort2alsoreceivesthehigh-orderaddressbitsandsomecontrolsignalsduringFlashprogrammingandverification

Port3

Port3isan8-bitbi-directionalIOportwithinternalpullupsThe

Port3outputbufferscansinksourcefourTTLinputsWhen1sarewritten

low

toPort3pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputsAsinputsPort3pinsthatareexternallybeingpulledwillsourcecurrentIILbecauseofthepullupsPort3alsoservesthefunctionsofvariousspecialfeaturesoftheAT89C51aslistedbelow

Port3alsoreceivessomecontrolsignalsforFlashprogrammingandverification

RST

ResetinputAhighonthispinfortwomachinecycleswhiletheoscillatorisrunningresetsthedevice

ALEPROG

AddressLatchEnableoutputpulseforlatchingthelowbyteoftheaddressduringaccessestoexternalmemoryThispinisalsotheprogrampulseinputPROGduringFlashprogrammingInnormaloperationALEisemittedataconstantrateof16theoscillatorfrequencyandmaybeusedforexternaltimingorclockingpurposesNotehoweverthatoneALEpulseisskippedduringeachaccesstoexternalData

Memory

IfdesiredALEoperationcanbedisabledbysettingbit0ofSFRlocation8EHWiththebitsetALEisactiveonlyduringaMOVXorMOVCinstructionOtherwisethepinisweaklypulledhighSettingthe

ALE-disablebithasnoeffectifthemicrocontrollerisinexternalexecutionmode

PSEN

ProgramStoreEnableisthereadstrobetoexternalprogrammemory

WhentheAT89C51isexecutingcodefromexternalprogrammemoryPSENisactivatedtwiceeachmachinecycleexceptthattwoPSENactivationsareskippedduringeachaccesstoexternaldatamemory

EAVPP

ExternalAccessEnableEAmustbestrappedtoGNDinordertoenablethedevicetofetchcodefromexternalprogrammemorylocationsstartingat0000HuptoFFFFHNotehoweverthatiflockbit1isprogrammedEAwillbeinternallylatchedonresetEAshouldbestrappedtoVCCforinternal

the12-voltprogrammingenable

programexecutionsThispinalsoreceivesvoltageVPPduringFlashprogrammingforpartsthatrequire12-voltVPP

XTAL1

clockoperatingcircuit

XTAL2

Characteristics

amplifierwhichcanbeconfiguredforuseasanon-chiposcillatorasshowninFigure1EitheraquartzcrystalorceramicresonatormaybeusedTodrivethedevicefromanexternalclocksourceXTAL2shouldbeleftunconnectedwhileXTAL1isdrivenasshowninFigure2Therearenorequirementsonthedutycycleoftheexternalclocksignalsincetheinputtotheinternalclockingcircuitryisthroughadivide-by-twoflip-flopbutminimumandimumvoltagehighandlowtimespecificationsmustbeobserved

IdleMode

InidlemodetheCPUputsitselftosleepwhilealltheon-chipperipheralsremainactiveThemodeisinvokedbysoftwareThecontentoftheon-chipRAMandallthespecialfunctionsregistersremainunchangedduringthismodeTheidlemodecanbeterminatedbyanyenabledinterruptorbyahardwareresetItshouldbenotedthatwhenidleisterminatedbyahardwareresetthedevicenormallyresumesprogramexecutionfromwhereitleftoffuptotwomachinecyclesbeforetheinternalresetalgorithmtakescontrolOn-chiphardwareinhibitsaccesstointernalRAMinthiseventbutaccesstotheportpinsisnotinhibitedToeliminatethepossibilityofanunexpectedwritetoaportpinwhenIdleisterminatedbyresettheinstructionfollowingtheonethatinvokesIdleshouldnotbeonethatwritestoaportpinortoexternalmemory

Figure1OscillatorConnections

NoteC1C230pF±10pFforCrystals40pF±10pFforCeramic

Resonators

Figure2ExternalClockDriveConfiguration

Power-downMode

Inthepower-downmodetheoscillatorisstoppedandtheinstructionthatinvokespower-downisthelastinstructionexecutedTheon-chipRAMandSpecialFunctionRegistersretaintheirvaluesuntilthepower-downmodeisterminatedTheonlyexitfrompower-downisahardwareresetResetredefinestheSFRsbutdoesnotchangetheon-chipRAMTheresetshouldnotbeactivatedbeforeVCCisrestoredtoitsnormaloperatinglevelandmustbeheldactivelongenoughtoallowtheoscillatortorestartandstabilize

ProgramMemoryLockBits

OnthechiparethreelockbitswhichcanbeleftunprogrammedUorcanbeprogrammedPtoobtaintheadditionalfeatureslistedinthetablebelowWhenlockbit1isprogrammedthelogiclevelattheEApinissampledandlatchedduringresetIfthedeviceispoweredupwithoutaresetthelatchinitializestoarandomvalueandholdsthatvalueuntilresetisactivatedItisnecessarythatthelatchedvalueofEAbeinagreementwiththecurrentlogiclevelatthatpininorderforthedevicetofunctionproperly

ProgrammingtheFlash

TheAT89C51isnormallyshippedwiththeon-chipFlashmemoryarrayintheerasedstatethatiscontentsFFHandreadytobeprogrammed

Theprogramminginterfaceacceptseitherahigh-voltage12-voltoralow-voltageVCCprogramenablesignalThelow-voltageprogrammingmodeprovidesaconvenientwaytoprogramtheAT89C51insidetheuserssystemwhilethehigh-voltageprogrammingmodeiscompatiblewithconventionalthirdpartyFlashorEPROMprogrammersTheAT89C51isshippedwitheitherthehigh-voltageorlow-voltageprogrammingmodeenabledTherespectivetop-sidemarkinganddevicesignaturecodesarelistedinthefollowingtable

TheAT89C51codememoryarrayisprogrammedbyte-by-byteineitherprogrammingmodeToprogramanynon-blankbyteintheon-chipFlashMemorytheentirememorymustbeerasedusingtheChipEraseModeProgramming

AlgorithmBeforeprogrammingtheAT89C51theaddressdataandcontrolsignalsshouldbesetupaccordingtotheFlashprogrammingmodetableandFigures3and4ToprogramtheAT89C51takethefollowingsteps

1Inputthedesiredmemorylocationontheaddresslines

2Inputtheappropriatedatabyteonthedatalines

3Activatethecorrectcombinationofcontrolsignals

4RaiseEAVPPto12Vforthehigh-voltageprogrammingmode

5PulseALEPROGoncetoprogramabyteintheFlasharrayorthelockbitsThebyte-writecycleisself-timedandtypicallytakesnomorethan15msRepeatsteps1through5changingtheaddressanddatafortheentirearrayoruntiltheendoftheobjectfileisreached

DataPollingTheAT89C51featuresDataPollingtoindicatetheendofawritecycleDuringawritecyclean

attemptedreadofthelastbytewrittenwillresultinthecomplementofthewrittendatumonPO7Oncethewrite

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 人文社科

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2