外文原文及翻译.docx
- 文档编号:3671659
- 上传时间:2022-11-24
- 格式:DOCX
- 页数:13
- 大小:91.92KB
外文原文及翻译.docx
《外文原文及翻译.docx》由会员分享,可在线阅读,更多相关《外文原文及翻译.docx(13页珍藏版)》请在冰豆网上搜索。
外文原文及翻译
毕业论文(设计)
外文翻译
学生姓名:
指导教师:
合作指导教师:
专业名称:
自动化
所在学院:
2012年6月
Designofsinglechiprealtimeclockandcalendarbasedon
Abstract:
ThisclockandcalendarusestheAT89S52microcontrollerasthecoreforthecontrol.TimeCircuitwhichisconstitutedbyDallas'sDS1302real-timeclockchipachievedatimeanddatedisplay,itincreasedfunctionalityforthetemperaturedisplayandthewholepointtimekeeping.Thispaperdiscussesthehardwarecircuitofthesystem,principleindetail,andgivestheflowchartofthesoftwaredesignandthemajorsourcecode.Keywords:
microcontroller;real-timeclock;Temperaturemeasurement
1Introduction
Clockandcalendar-bedroomathome,schools,stationsandmoreandmoreextensiveuseofplazaforpeople'slives,study,workgreatconvenience.clockandcalendarforthepastneedtore-adjustafterpower-offtimeanddate,andtimeisabigerror.Designedthesystemusingreal-timeclockchip(DS1302)asatimerparts,thechipcomeswithaninternalcrystaloscillator,sothateffectivelyguaranteetheaccuracyofthetimeandhangowninternalbatterypowermakesthesituationwillcontinuetoupdatethetimeinformation.ThisdesignusesAT89S52asthemaincontroller,inordertoimprovethepracticalityofthecircuitaddtemperaturemeasurementcircuit,timekeepingandalarmfunctions.
2Systemhardwaredesign
SchematiccircuitshowninFigure2:
Systemarchitecturediagram
2.1PowerSupplyCircuit
Inordertoreducecircuitcosts,thesystempowersupplycircuitbythetransformertransformer,three-terminalintegratedregulator(L7805>circuit5V,hasasimple,reliable,inexpensiveandsoon.
2.2HostController
HostcontrollerusingATMEL'slatestMCUProductsAT89S52.Apartfromthesingle-chipmicrocomputerhasaMCS-51seriessingle-chipallthebenefitsofthings,alsohas8KBofinternalin-systemprogrammableFLASHmemory,freeandlow-powerbrown-outmode,greatlyreducingthepowercircuit.Inaddition,alsohasawatchdogcircuit,areliablejobforthecircuitprovidesgreaterassurance.
2.3digitaltubedisplaycircuit
Showcircuitwithahighbrightness,longlife,lowcostfeaturessuchastheLEDdigitaltube.ThroughouttheshowcircuitbythedigitalcontrolanddisplayLEDdrivecircuitanddecodingcircuit.Becauseofthesystemtodisplaythecontentsofmore,atotalof16digitaltube,respectively,witheightshowsyear,month,day,fourshowtime,showthat22weeks,2showthetemperature.Controllerinordertosaveresources,betweenthecontrolleranddisplaysaddadecodingcircuit16sothatwouldhaverequiredthelineofcontrolintothecircuitonly4controllines,agreatsavesystemresources.Thedecoderbythedecoderconstituteboth3-8.
2.4Real-timeclockchip
ThisdesignusestheUnitedStatesDallascompanyDS1302,thechipcanautomaticallygeneratecentury,year,month,day,hour,minute,second,suchastimeinformation.Centurytheuseofinternalregisterswiththesoftwarewillbeabletoresolvethe'Millennium',theproblem.Thechiphasitsowninternalbattery-keng,externalbrown-out,theinternaltimeinformationalsobeabletomaintainfor10years.Timeforasingledayrecordof12hoursandthereisa24-hourmode.TimeTable
Waysthatalsohastwokindsofbinarynumbers,andtheotherwithBCDcodeexpress.Thechipwith128bytesofinternalRAM,oneof11bytesusedtostoretimeinformation,4bytesofmemorychipsusedtocontrolinformation,knownasthecontrolregister,113-bytegeneral-purposeRAMforuserstostoretemporaryinformation.Inaddition,userscanalsoprogramthechiptocontrolavarietyofsquare-waveoutput,anditsinternalthree-waythroughthesoftwareinterruptshielding.
2.5Buttonsandtemperaturemeasurementsandcircuit
Thesysteminordertomakethecircuitmoreeasy,buttoncircuitdesignonlythreekeys,whichare'set','+','-',threekeystoadjustthecalendarandclock.Thesysteminordertoimprovethepracticalityofthecircuit,anincreaseofatemperaturedisplay.ThesystemtemperaturemeasurementcircuitusingDallas'sDS18B20.Thedevicebecauseofitslowprice,easycircuits,measurementprecision,etc..
2.6audiosignalgeneratoranddrivercircuit
Thecircuit'sfunctionistoreceivecontrolcircuittosendtotheentirepointoftimeandtimingsignal,accordingtosystemsettingsproducedifferentfrequenciesofaudiosignals,amplificationbythedrivecircuittodrivespeakerstovoicetheiropinionsinordertorealizethewholepointtimekeepingandalarmfunctions.
Description
TheAT89S52isalow-power,high-performanceCMOS8-bitmicrocomputerwith4KbytesofFlashprogrammableanderasablereadonlymemory(PEROM).ThedeviceismanufacturedusingAtmel’shigh-densitynonvolatilememorytechnologyandiscompatiblewiththeindustry-standardMCS-52instructionsetandpinout.Theon-chipFlashallowstheprogrammemorytobereprogrammedin-systemorbyaconventionalnonvolatilememoryprogrammer.Bycombiningaversatile8-bitCPUwithFlashonamonolithicchip,theAtmelAT89S52isapowerfulmicrocomputerwhichprovidesahighly-flexibleandcost-effectivesolutiontomanyembeddedcontrolapplications.
Functioncharacteristic
TheAT89S52providesthefollowingstandardfeatures:
4KbytesofFlash,128bytesofRAM,32I/Olines,two16-bittimer/counters,afivevectortwo-levelinterruptarchitecture,afullduplexserialport,on-chiposcillatorandclockcircuitry.Inaddition,theAT89S52isdesignedwithstaticlogicforoperationdowntozerofrequencyandsupportstwosoftwareselectablepowersavingmodes.TheIdleModestopstheCPUwhileallowingtheRAM,timer/counters,serialportandinterruptsystemtocontinuefunctioning.ThePower-downModesavestheRAMcontentsbutfreezestheoscillatordisablingallotherchipfunctionsuntilthenexthardwarereset.
PinDescription
VCC:
Supplyvoltage.
GND:
Ground.
Port0:
Port0isan8-bitopen-drainbi-directionalI/Oport.Asanoutputport,eachpincansinkeightTTLinputs.When1sarewrittentoport0pins,thepinscanbeusedashighimpedanceinputs.Port0mayalsobeconfiguredtobethemultiplexedloworderaddress/databusduringaccessestoexternalprogramanddatamemory.InthismodeP0hasinternalpullups.Port0alsoreceivesthecodebytesduringFlashprogramming,andoutputsthecodebytesduringprogramverification.Externalpullupsarerequiredduringprogramverification.
Port1
Port1isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort1outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort1pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port1pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.Port1alsoreceivesthelow-orderaddressbytesduringFlashprogrammingandverification.
Port2
Port2isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort2outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort2pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port2pinsthatareexternallybeingpulledlowwillsourcecurrent,becauseoftheinternalpullups.Port2emitsthehigh-orderaddressbyteduringfetchesfromexternalprogrammemoryandduringaccessestoexternaldatamemorythatuse16-bitaddresses.Inthisapplication,itusesstronginternalpullupswhenemitting1s.Duringaccessestoexternaldatamemorythatuse8-bitaddresses,Port2emitsthecontentsoftheP2SpecialFunctionRegister.Port2alsoreceivesthehigh-orderaddressbitsandsomecontrolsignalsduringFlashprogrammingandverification.
Port3
Port3isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort3outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort3pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port3pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseofthepullups.Port3alsoservesthefunctionsofvariousspecialfeaturesoftheAT89C51aslistedbelow:
Port3alsoreceivessomecontrolsignalsforFlashprogrammingandverification.
RST
Resetinput.Ahighonthispinfortwomachinecycleswhiletheoscillatorisrunningresetsthedevice.
ALE/PROG
AddressLatchEnableoutputpulseforlatchingthelowbyteoftheaddressduringaccessestoexternalmemory.Thispinisalsotheprogrampulseinput(PROG)duringFlashprogramming.InnormaloperationALEisemittedataconstantrateof1/6theoscillatorfrequency,andmaybeusedforexternaltimingorclockingpurposes.Note,however,thatoneALEpulseisskippedduringeachaccesstoexternalDataMemory.Ifdesired,ALEoperationcanbedisabledbysettingbit0ofSFRlocation8EH.Withthebitset,ALEisactiveonlyduringaMOVXorMOVCinstruction.Otherwise,thepinisweaklypulledhigh.SettingtheALE-disablebithasnoeffectifthemicrocontrollerisinexternalexecutionmode.
PSEN
ProgramStoreEnableisthereadstrobetoexternalprogrammemory.WhentheAT89S52isexecutingcodefromexternalprogrammemory,PSENisactivatedtwiceeachmachinecycle,exceptthattwoPSENactivationsareskippedduringeachaccesstoexternaldatamemory.
EA/VPP
ExternalAccessEnable.EAmustbestrappedtoGNDinordertoenablethedevicetofetchcodefromexternalprogrammemorylocationsstartingat0000HuptoFFFFH.Note,however,thatiflockbit1isprogrammed,EAwillbeinternallylatchedonreset.EAshouldbestrappedtoVCCforinternalprogramexecutions.Thispinalsoreceivesthe12-voltprogrammingenablevoltage(VPP)duringFlashprogramming,forpartsthatrequire12-voltVPP.
XTAL1
Inputtotheinvertingoscillatorampl
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 外文 原文 翻译
![提示](https://static.bdocx.com/images/bang_tan.gif)