基于单片机的贴片LED旋转屏数字钟设计与制作 英文原文材料打印_第1页
基于单片机的贴片LED旋转屏数字钟设计与制作 英文原文材料打印_第2页
基于单片机的贴片LED旋转屏数字钟设计与制作 英文原文材料打印_第3页
基于单片机的贴片LED旋转屏数字钟设计与制作 英文原文材料打印_第4页
基于单片机的贴片LED旋转屏数字钟设计与制作 英文原文材料打印_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ABSTRACTAtpresent,home-madeprojectorhasbecomeahotelectronicsenthusiasts,manyenthusiastsandengineersandtechniciansasaproductpromotion.Importpricesofprojectorisveryexpensive,alittleonthegenerallevelof2million.Loversofelectronicself-made,thenthegeneralwillnotexceed2,000yuanupto3500themarketpriceof4,000yen(formandcannotkeepupwithtechnologymaybefashionableimportedgoods),profitmarginsarestillverylarge.Anumberofsmallandmedium-sizedprivateenterprises,schools,streets,publicserviceagenciesintheoperationorbusinessactivities,theprojectormustbecheap;andfamilyuse,iftheprojectorandhometheatersystems,themomentumduetoitslargesizescreen(whichcanbemorethan100-inch),canproducecinema-levelshockthatthemarketisveryoptimisticabouttheprospects.Highpointslightlyprojectors,micro-computercontrolsystemaregenerallyontheprojectorintheoperationofthevariousstate(suchastemperature,lightprojector,remotecontrol/manualoperation)tomonitorandrespondto.Hereaboutasimpleandreliable,excellentperformanceprojectorforhomecomputer-basedcontrolpanel(hereinafterreferredtoasthecomputerversion)ofthedesign.Keywordthermalelectricfocusing,LED,lightsensorsI.INTRODUCTIONSingle-chip,alsoknownassingle-chipmicrocontroller,itisnotthecompletionofalogicfunctionofthechip,butacomputersystemintegratedintoachip.Speakingingeneralterms:asinglechiphasbecomeacomputer.Itssmallsize,lightweight,cheap,forthelearning,applicationanddevelopmentoffacilitiesprovided.Atthesametime,learningtousetheprincipleofsingle-chipcomputertounderstandandstructurethebestchoice.?Singlechipandcomputeruseisalsosimilartothemodule,suchasCPU,memory,parallelbus,aswellastheroleandthesameharddiskmemory,isitdifferentfromtheperformanceofthesecomponentsarerelativelyweakinourhomecomputeralot,Butthepriceislow,thereisgenerallynomorethan10yuan......canuseittomakesomecontrolforaclassofelectricalworkisnotverycomplexissufficient.Weareusingautomaticdrumwashingmachines,smokehood,VCDandsooninsidethehomeappliancescanseeit'sshadow!......Itismainlyaspartofthecorecomponentsofthecontrol.Itisanonlinereal-timecontrolcomputer,control-lineisatthescene,weneedtohaveastrongeranti-interferenceability,lowcost,andthisisoff-linecomputer(suchashomePC)Themaindifference.Bysingle-chipprocess,andcanbeamended.Throughdifferentprocedurestoachievedifferentfunctions,inparticularthespecialuniquefeatures,thisistheneedtochargeotherdevicescandoagreateffort,someofitisalsodifficulttomakegreateffortstodoso.AfunctionisnotverycomplicatediftheUnitedStatesthedevelopmentofthe50'sseriesof74or60duringtheCD4000seriestogetthesepurehardware,thecircuitmustbeabigPCBboard!However,iftheUnitedStatesifthesuccessful70'sseriesofsingle-chipmarket,theresultwillbedifferent!Simplybecausetheadoptionofsingle-chippreparationprocessyoucanachievehighintelligence,highefficiencyandhighreliability!Becauseofthecostofsingle-chipissensitive,sothedominantsoftwareorthelowestlevelassemblylanguage,whichisinadditiontothelowestlevelformorethanbinarymachinecodeofthelanguage,sincesuchalow-levelsowhyshouldweuse?Manyofthesenior'slanguagehasreachedalevelofvisualprogrammingWhyisitnotinuse?Thereasonissimple,thatis,single-chipcomputerasthereisnohomeofCPU,alsonotashardasthemassstoragedevice.Avisualizationofsmallhigh-levellanguageprogram,evenifthereisonlyonebuttonwhichwillreachthesizeofdozensofK.ForthehomePC'sharddriveisnothing,butintermsofthesingle-chipmicrocomputerisunacceptable.Single-chipintheutilizationofhardwareresourceshavetodoveryhigh,sothecompilationoftheoriginalwhilestillinheavyuse.Thesametoken,ifthecomputergiant'soperatingsystemandapplicationsrunuptogetthehomePC,homePCcannotaffordtosustainthesamecanbesaidthatthetwentiethcenturyacrossthethree"power"ofthetimes,thatis,theeraofelectrical,electronictimesandhasnowenteredthecomputerage.However,suchacomputer,usuallyreferstoapersonalcomputer,orPC.Itconsistsofthehost,keyboards,displaysandothercomponents.Thereisalsoatypeofcomputer,nothowmostpeoplearefamiliarwith.Thiscomputerissmarttogiveavarietyofmechanicalsingle-chip(alsoknownasmicro-controller).Asthenamesuggests,thesecomputersystemsuseonlytheminimumofanintegratedcircuittomakeasimplecalculationandcontrol.Becauseofitssmallsize,areusuallychargedwithpossessionofmachineinthe"belly"in.Itinthedevice,likethehumanmindplaysarole,itiswrong,theentiredevicewasparalyzed.Now,thissinglechiphasaverywidefieldofuse,suchassmartmeters,real-timeindustrialcontrol,communicationsequipment,navigationsystems,andhouseholdappliances.Onceavarietyofproductswiththeuseofthesingle-chip,willbeabletoplaysothattheeffectivenessofproductupgrading,productnamesoftenadjectivebeforetheword-"intelligent,"suchaswashingmachinesandsointelligent.Atpresent,sometechnicalpersonneloffactoriesorotheramateurelectronicsdevelopersfromengagingincertainproducts,notthecircuitistoocomplex,thatisfunctionalandeasytobetoosimpleimitation.Thereasonmaybetheproductnotonthecardsortheuseofsingle-chipprogrammablelogicdeviceontheother.

II.BACKGROUND1.Aprincipleandimplementationmethod1.1RestoredtothethronethelawregularlyunconditionallyUsetimer,special-purposeclockchiporotherpulsegenerator,producesignalofrestoringtothethroneregularlyaccordingtointervalthatsetfor.Thiskindofmethodisespeciallysuitableforthemeasuringinstrument.Innotrunningactually,sampletheanalogquantityofintroductionwithA/Dconverteroften,thenstoreshowing.Thiscourseisveryfast,butsteadyforreading,thedatapersecondareonlyupgraded1-2times,alargeamountoftimeofCPUisusedforwaiting.LetCPUcarryoutandenterdormancydirectlyafterthetask,restoretothethroneandwakebyexternalworldupItcarryoutthenextoperation,thisistorestoretothethronethelawregularlyInthiswaycanmakeanti-interferenceabilitystrengthengreatly,have2pointsmainly:①.Atthedormancy,procedurestoprun,canappearPCindicatordisorderlyprocedurethatcausesrunandfly.Worktimeindormancyproportion1:9,thatistosay1shave0.1timeofsusedformeasuring,sendingoffshowing,thereistimedormancyof0.9s,theprobabilitythattheprocedureisinterferedis1/10whilerunningatfullspeed,wholeanti-interferenceabilityraiseby10times.②Becauseevery1sisrestoredtothethroneonceunconditionally,oncepresentthesystemhaltedduringajob,cancertainlyresumewhenrestoredtothethronenexttime.Astoonlyinstrumentthatshow,somereadingmistakethat1sappearaccidentallythereisnomemorytothenextmeasurement,becouldbear,belongto“pass〞mistake.Thiskindisrestoredtothethronetheadvantageofdog'scircuitforguardingthegateregularly,first,changewaitingtimeintoadormancystate,timetoshortenandmaybeinterfered;Second,avoidedhappenningthatthedogcontrolsthedeathcirculationofthelinktoincludeguardingthegate.1.2TheexternalconditionisrestoredtothethronethelawSomearrivalthatexportormeasureiscontrolledbytheoutside.Forinstance,thehotformofheating,rotatethepulseproducedandcalculateheatbyhotwaterwaterwheels,thereisnohotwatertoflow,thereisnoheattoexport,CPUonlyneedinfactkeepnumbervalue,donotneedtocount.Canimaginehotwaterwaterwheelsrotatewhenparkingwarm,CPUidleinwillitbewillitbeoneseasonautumnspringandsummer,Ifletdormancyits,measurehavewaterwheelspulseconstantly,anti-interferenceabilitycanstrengthengreatly.So,solongaslinkuptherestoringtothethroneofthepulseofthewaterwheelsandCPU,thewaterwheelsrotateacircleeachtime,CPUisrestoredtothethroneonce,hotformcanworknormally,thisisrestoredtothethronethelawbytheexternalcondition.Similarapplicationhavehalfelectronkilowatt-hourmeter,goononecountjustwhenthemachinerydegreewheelsandtransferstoacircle,usersdonotneedtheelectricity,CPUhasbeenknowingthedormancyallthetime.Therestoringtothethroneintheintervalnottoberegular,butconfirmedaccordingtotheexternalconditionofthismethod.Insomeoccasions,thetimeofthedormancywillbeverylong,veryeffectivetoimprovinganti-interferenceability.2.Thehardwarerealizesthemainpoint2.1RestoredtothethroneregularlyunconditionallyGenerallyhave2kindsofmethods.①Usetheitimerorthespecial-purposeclockchiptoberestoredtothethrone.Fig1,inordertousethetimingcircuitthat555circuitmakesup;CanusetheclockchipsofX1126,etctoo,wakeCPUupwiththealarmsignalaftersettingupwarningtime.Thiskindofmethodissuitablewhenthelongintervalismade,canalsofollowtheresultofthisoperation,determinetowaketimeupinalarmnexttimetemporarily,veryflexibleandconvenient.②Thesignalofusingthesystemtobeinherentisasreducingthepulseregularly.Use50Hzworkerpowermakereducingafterhavingafaceliftfrequently,alreadyomitthetimer,gatheredthecorrespondingsignalforthephaseplacewhichmeasuredtheelectriccurrentsignalatthesametime,asFig.2shows.2.2ExternalconditionsarerestoredtothethroneSendexternalconditionpulsetoandisrestoredtothethronetheendsonafterhavingafacelift.Tothatabove-mentionedwaterwheelsortheammeterspendapulseproduced,canuseSchmitt'striggertohaveafacelift;Forwritingdowntheinstrumentofthebiggestorminimum,canusethewindowcomparator.Inordertorealizetheelectronizationthatisregulated,canusetheelectronicelectricpotentialdevice,establishupperandlowerlimitswiththeorderoftheone-chipcomputer.2.3ReducecycleandrestoredtothethronethehighelectricityatordinarytimesInFig3,restoredtothethronethesignalduringhighlevelTr,theone-chipcomputerisinthestateofrestoringtothethrone,theproceduredoesnotrun,anti-interferenceabilityisthestrongest;Afterthehighlevel,theone-chipcomputerbeginstoholdtheconductprocedure.Thatistosay,arerestoredtothethroneandsuitableforthetimethattheprocedurecarriesoutduringthelowlevelTdofthesignal,thistimeshouldbegreaterthantheexecutioncycleoftheprocedureeachtime.Itisrestoretothethronecycleandrestoretothethronehighlevelofsignaltakeemptythanverymuchimportanttochooserationally.Astosimpletoshowinstrument,restoretothethronecycledeterminedatabreakcycle,lowelectricityisitmeasure,hancloveralltimeshowntogreaterthantowantatordinarytimes;Otherwise,cantpresentforeverthemistakeoftheintactexecutiveprogram.MonolithicintegratedcircuitinTsandTrperiodallcaneffectivelytheantijamming,butisbesttheunnecessarytimearrangementinTr.Whentheprogramtimeislong,whenasfaraspossibletherequestreducesTr,mayjointhedifferentiatingcircuit,likechart1centerC30,R26,D9.

2.4Treatmentofoutputendsons(1)RestoretothethronestraightpulseDuringallI/Omouthofone-chipcomputerturnintothehighlevelwhenrestoringtothethrone.Thatistosayoutputforlowpinnormally,willaccordingtorestoretothethronecycleappearthewidthforthestraightpulseofTr.Thisstraightpulsewillinfluencethenormaloutput,2methodsaredealtwith:①Connectinparallelelectriccapacitysuppress,capacityconfirmaccordingtoTrtimethatrestoretothethroneonthesoninend.ReducingTrcanbereducedandconnectedtheelectriccapacityinparallel.②Itisinvalidtodesigntheperipheralcircuitintothehighlevel.(2)Fault-tolerantChoosethecapacitythattheoutputendconnectstheelectriccapacityinparallelfault-tolerantlyandproperly,canrealizefault-tolerantcontrol.Reducedcycleinacertain,becauseinterferedexportingthewronglevel.Becausethekeepingfunctionofelectriccapacity,can'tstillenableexportingthechangetothevalidlevelwithinthiscycle;Nextcycle,themistakeiscorrected.So,solongasdoesnotmakemistakesin2cyclesinsuccession,itisveryfault-toleranttoexportCertainly,thiskindofmethodwillmakethenormaloutputchangelagbehindforonecycle,justreallyreflecttheoutputendson.2.5hastheelectricitytomeasureandrestoretothethronemanuallySomesystemisitmakesomeinitializeandoperatetowantatelectricityforthefirsttime.Restoredtothethroneandalreadybecomethebeginningconditionofnormalrunningeachtimewhileadoptingthewayofrestoringtothethronetorun,itisunabletodistinguishandhavetheelectricityforthefirsttime.InsomepinconnectstheelectriccapacityofoneljIFtotheground,measurethispinafterbeingrestoredtothethrone,iflowleveltohaveelectricityforthefirsttime.Givesystemsetuponerestoretothethronebutton,thatistosayacommononemanualtorestoretothethrone,thisbuttonisnotjoinedandbeingrestoredtothethroneintheend,isconnectedinparallelintheelectriccapacitybothendstothegroundofabove-mentionedpins.III.IMPLEMENTATIONTheoverallCPUblockisresponsiblefortyingallofthestagestogetheraswellasprovidingtheaccesstotheoutsideworldthatthetestbenchusestoloadinstructionmemoryandmonitortheregisterbankfortestverification.Becausetheindividualstagesweremaderesponsibleforbufferingtheirownindividualoutputs,itwasnotnecessaryfortheCPUtocontainany“glue〞logic,itwassimplynecessarytocorrectlyconnectthedifferentstagestogether.ThedesignersandauthorsoftheCPUitselfandtheindividualstagescanbeseeninTable1TheCPUiscomposedofthefivedifferentstages:InstructionFetch,InstructionDecode,Execution,DataMemory,andtheWritebackstage.TheinstructionfetchstagehasmultipleresponsibilitiesinthatitmustproperlyupdatetheCPU'sprogramcounterinthenormalcaseaswellasthebranchinstructioncase.Theinstructionfetchstageisalsoresponsibleforreadingtheinstructionmemoryandsendingthecurrentinstructiontothenextstageinthepipeline,orastallifabranchhasbeendetectedinordertoavoidincorrectexecution.Theinstructionfetchstageiscomposedofthreecomponents:instructionmemory,programcounter,andtheinstructionaddressadder.Theinstructionmemoryalsotakesinputsfromtheoutsideworldthatallowtheloadingofinstructionmemoryforlaterexecution.Theunitresponsibleformaintainingtheprogramcounteritselfconsistedofa32-bitregisterfortheaddressandanupdatelinethatwouldallowtheaddresstoupdateornot.Thisupdatelinewasnecessarybecauseforsomehazardsitisnecessarytostallacyclesoitisrequiredtoensurethesameinstructionwillbeexecutedonthenextcycle.TheinstructionmemoryunitwasdesignedtomodelasmallamountofcacheandthereforewasmadetobeaccessedwithinasingleCPUcycle.Theinstructionmemorywassizedat1kbitsandcouldthereforeatmaximumcontain32separateinstructions.Inarealsystemthiswouldbemuchlargertoaccommodatemuchlargerinstructionsorwouldbeattachedtoamuchlargermemoryhierarchy.TheinstructionmemoryhandledthereadingorwritingofavalueintoinstructionmemorywithinasingleCPUcycle.Thefinalpieceoftheinstructionfetchstagewastheinstructionmemoryaddressadder.Thispieceofpurelycombinationallogicwasresponsibleforadding4toaddressthatwascurrentlybeingreadintheinstructionmemory.Whetherornotthisresultwasactuallyusedtoupdatetheprogramcounterwascontrolledbythehazarddetectionunitintheinstructiondecodestage.TheDecodeStageisthestageoftheCPU'spipelinewherethefetchedinstructionisdecoded,andvaluesarefetchedfromtheregisterbank.Itisresponsibleformappingthedifferentsectionsoftheinstructionintotheirproperrepresentations(basedonRorItypeinstructions).TheDecodestageconsistsoftheControlunit,theHazardDetectionUnit,theSignExtender,andtheRegisterbank,andisresponsibleforconnectingallofthesecomponentstogether.Itsplitstheinstructionintoitsvariouspartsandfeedsthemtothecorrespondingcomponents.RegisersRsandRtarefedtotheregisterbank,theimmediatesectionisfedtothesignextender,andtheALUopcodeandfunctioncodesaresenttothecontrolunit.Theoutputsofthesecorrespondingcomponentsarethenclockedandstoredforthenextstage.TheControlunittakesthegivenOpcode,aswellasthefunctioncodefromtheinstruction,andtranslatesittotheindividualinstructioncontrollinesneededbythethreeremainingstages.Thisisaccomplishedviaalargecasestatement.Thehazarddetectionunitmonitorsoutputfromtheexecutestagetodeterminehazardconditions.Hazardsoccurwhenwereadavaluethatwasjustwrittenfrommemory,asthevaluewon'tbeavailableforforwardinguntiltheendofthememorystage,andwhenwebranch.Thehazarddetectionunitwillintroduceastallcyclebyreplacingthecontrollineswith0s,anddisablingtheprogramcounterfromupdating.WhenabranchisdetectedthehazarddetectionunitwillallowthePCtowrite,butwillfeeditthebranchaddressinsteadofthenextcountedvalue.Thesignextenderisresponsiblefortwofunctions.Ittakestheimmediatevalueandsignextendsitifthecurrentinstructionisasignedoperation.Italsohasashiftedoutputforbranches.OneoftheprimarypiecesofdatastorageintheCPUistheregisterbankcontainedwithintheinstructiondecodestage.ThisbankofregistersisdirectlyreferencefromtheMIPSinstructionsandisdesignedtoallowrapidaccesstodataandavoidtheuseofmuchslowerdatamemorywhenpossible.TheregisterbankcontainedintheCPUconsistedoftheMIPSstandard32registerswithregister0beingdefinedasalwayszero.Theregistersaredefinedasbeingwritteninthefirsthalfofthecycleandreadinthesecondhalf.Thisisdonetoavoidstructuralhazardswhenoneinstructionisattemptingtowritetotheregisterbankwhileanotherisreadingit.Settingtheregisterbanktothisconfigurationalsoavoidsadatahazardbecauseavaluethatwasjustwrittencanbereadoutinthesamecycle.Theexecutestageisresponsiblefortakingthedataandactuallyperformingthespecifiedoperationonit.TheexecutestageconsistsofanALU,aDetermineBranchunit,andaForwardingUnit.TheexecutestageconnectsthesecomponentstogethersothattheALUwillprocessthedataproperly,giveninputschosenbytheforwardingunit,andwillnotifythedecodestageifabranchisindeedtobetaken.Thealuisresponsibleforperformingtheactualcalculationsspecifiedbytheinstruction.Ittakestwo32bitinputsandsomecontrolsignals,andgivesasingle32bitoutputalongwithsomeinformationabouttheoutput–whetheritiszeroo

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论