外文以及翻译-基于单片机的电子琴设计.docx

上传人:聆听****声音 文档编号:107077 上传时间:2023-04-28 格式:DOCX 页数:7 大小:22.90KB
下载 相关 举报
外文以及翻译-基于单片机的电子琴设计.docx_第1页
第1页 / 共7页
外文以及翻译-基于单片机的电子琴设计.docx_第2页
第2页 / 共7页
外文以及翻译-基于单片机的电子琴设计.docx_第3页
第3页 / 共7页
外文以及翻译-基于单片机的电子琴设计.docx_第4页
第4页 / 共7页
外文以及翻译-基于单片机的电子琴设计.docx_第5页
第5页 / 共7页
外文以及翻译-基于单片机的电子琴设计.docx_第6页
第6页 / 共7页
外文以及翻译-基于单片机的电子琴设计.docx_第7页
第7页 / 共7页
亲,该文档总共7页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

外文以及翻译-基于单片机的电子琴设计.docx

《外文以及翻译-基于单片机的电子琴设计.docx》由会员分享,可在线阅读,更多相关《外文以及翻译-基于单片机的电子琴设计.docx(7页珍藏版)》请在冰点文库上搜索。

外文以及翻译-基于单片机的电子琴设计.docx

外文资料原文

Microcontroller-baseddesignandmanufacture

(1)MCU

Amicrocontroller(orMCU)isacomputer-on-a-chip.Itisatypeofmicroprocessoremphasizingself-sufficiencyandcost-effectiveness,incontrasttoageneral-purposemicroprocessor(thekindusedinaPC).

Themajorityofcomputersystemsinusetodayareembeddedinothermachinery,suchastelephones,clocks,appliances,vehicles,andinfrastructure.Anembeddedsystemusuallyhasminimalrequirementsformemoryandprogramlengthandmayrequiresimplebutunusualinput/outputsystems.Forexample,mostembeddedsystemslackkeyboards,screens,disks,printers,orotherrecognizableI/Odevicesofapersonalcomputer.Theymaycontrolelectricmotors,relaysorvoltages,andreadswitches,variableresistorsorotherelectronicdevices.Often,theonlyI/Odevicereadablebyahumanisasinglelight-emittingdiode,andseverecostorpowerconstraintscaneveneliminatethat.

Incontrasttogeneral-purposeCPUs,microcontrollersdonothaveanaddressbusoradatabus,becausetheyintegratealltheRAMandnon-volatilememoryonthesamechipastheCPU.Becausetheyneedfewerpins,thechipcanbeplacedinamuchsmaller,cheaperpackage.

Integratingthememoryandotherperipheralsonasinglechipandtestingthemasaunitincreasesthecostofthatchip,butoftenresultsindecreasednetcostoftheembeddedsystemasawhole.(EvenifthecostofaCPUthathasintegratedperipheralsisslightlymorethanthecostofaCPU+externalperipherals,havingfewerchipstypicallyallowsasmallerandcheapercircuitboard,andreducesthelaborrequiredtoassembleandtestthecircuitboard).Thistrendleadstodesign.

Amicrocontrollerisasingleintegratedcircuit,commonlywiththefollowingfeatures:

centralprocessingunit-rangingfromsmallandsimple4-bitprocessorstosophisticated32-or64-bitprocessors

input/outputinterfacessuchasserialports(UARTs)

otherserialcommunicationsinterfaceslikePC,SerialPeripheralInterfaceandControllerAreaNetworkforsysteminterconnectperipheralssuchastimersandwatchdogRAMfordatastorageROM,EPROM,EEPROMorFlashmemoryforprogramstorageclockgenerator-oftenanoscillatorforaquartztimingcrystal,resonatororRCcircuitmanyincludeanalog-to-digitalconverters.

ThisintegrationdrasticallyreducesthenumberofchipsandtheamountofwiringandPCBspacethatwouldbeneededtoproduceequivalentsystemsusingseparatechipsandhaveprovedtobehighlypopularinembeddedsystemssincetheirintroductioninthe1970s.

SomemicrocontrollerscanaffordtouseaHarvardarchitecture:

separatememorybusesforinstructionsanddata,allowingaccessestotakeplaceconcurrently.

Thedecisionofwhichperipheraltointegrateisoftendifficult.TheMicrocontrollervendorsoftentradeoperatingfrequenciesandsystemdesignflexibilityagainsttime-to-marketrequirementsfromtheircustomersandoveralllowersystemcost.Manufacturershavetobalancetheneedtominimizethechipsizeagainstadditionalfunctionality.

Microcontrollerarchitecturesareavailablefrommanydifferentvendorsinsomanyvarietiesthateachinstructionsetarchitecturecouldrightlybelongtoacategoryoftheirown.Chiefamongthesearethe8051,Z80andARMderivatives.[citationneeded]

Amicrocontroller(alsoMCUorpC)isafunctionalcomputersystem-on-a-chip.Itcontainsaprocessorcore,memory,andprogrammableinput/outputperipherals.

MicrocontrollersincludeanintegratedCPU,memory(asmallamountofRAM,programmemory,orboth)andperipheralscapableofinputandoutput.

Itemphasizeshighintegration,incontrasttoamicroprocessorwhichonlycontainsaCPU(thekindusedinaPC).Inadditiontotheusualarithmeticandlogicelementsofageneralpurposemicroprocessor,themicrocontrollerintegratesadditionalelementssuchasread-writememoryfordatastorage,read-onlymemoryforprogramstorage,Flashmemoryforpermanentdatastorage,peripherals,andinput/outputinterfaces.Atclockspeedsofaslittleas32KHz,microcontrollersoftenoperateatverylowspeedcomparedtomicroprocessors,butthisisadequatefortypicalapplications.Theyconsumerelativelylittlepower(milliwattsorevenmicrowatts),andwillgenerallyhavetheabilitytoretainfunctionalitywhilewaitingforaneventsuchasabuttonpressorinterrupt.Powerconsumptionwhilesleeping(CPUclockandperipheralsdisabled)maybejustnanowatts,makingthemidealforlowpowerandlonglastingbatteryapplications.

Microcontrollersareusedinautomaticallycontrolledproductsanddevices,suchasautomobileenginecontrolsystems,remotecontrols,officemachines,appliances,powertools,andtoys.Byreducingthesize,cost,andpowerconsumptioncomparedtoadesignusingaseparatemicroprocessor,memory,andinput/outputdevices,microcontrollersmakeiteconomicaltoelectronicallycontrolmanymoreprocesses.

Themajorityofcomputersystemsinusetodayareembeddedinothermachinery,suchasautomobiles,telephones,appliances,andperipheralsforcomputersystems.Thesearecalledembeddedsystems.Whilesomeembeddedsystemsareverysophisticated,manyhaveminimalrequirementsformemoryandprogramlength,withnooperatingsystem,andlowsoftwarecomplexity.Typicalinputandoutputdevicesincludeswitches,relays,solenoids,LEDs,smallorcustomLCDdisplays,radiofrequencydevices,andsensorsfordatasuchastemperature,humidity,lightleveletc.Embeddedsystemsusuallyhavenokeyboard,screen,disks,printers,orotherrecognizableI/Odevicesofapersonalcomputer,andmaylackhumaninteractiondevicesofanykind.

Itismandatorythatmicrocontrollersproviderealtimeresponsetoeventsintheembeddedsystemtheyarecontrolling.Whencertaineventsoccur,aninterruptsystemcansignaltheprocessortosuspendprocessingthecurrentinstructionsequenceandtobeginaninterruptserviceroutine(ISR).TheISRwillperformanyprocessingrequiredbasedonthesourceoftheinterruptbeforereturningtotheoriginalinstructionsequence.Possibleinterruptsourcesaredevicedependent,andoftenincludeeventssuchasaninternaltimeroverflow,completingananalogtodigitalconversion,alogiclevelchangeonaninputsuchasfromabuttonbeingpressed,anddatareceivedonacommunicationlink.Wherepowerconsumptionisimportantasinbatteryoperateddevices,interruptsmayalsowakeamicrocontrollerfromalowpowersleepstatewheretheprocessorishalteduntilrequiredtodosomethingbyaperipheralevent.

Microcontrollerprogramsmustfitintheavailableon-chipprogrammemory,sinceitwouldbecostlytoprovideasystemwithexternal,expandable,memory.Compilersandassemblylanguageareusedtoturnhigh-levellanguageprogramsintoacompactmachinecodeforstorageinthemicrocontroller'smemory.Dependingonthedevice,theprogrammemorymaybepermanent,read-onlymemorythatcanonlybeprogrammedatthefactory,orprogrammemorymaybefield-alterableflashorerasableread-onlymemory.

Sinceembeddedprocessorsareusuallyusedtocontroldevices,theysometimesneedtoacceptinputfromthedevicetheyarecontrolling.Thisisthepurposeoftheanalogtodigitalconverter.Sinceprocessorsarebuilttointerpretandprocessdigitaldata,i.e.IsandOs,theywon'tbeabletodoanythingwiththeanalogsignalsthatmaybebeingsenttoitbyadevice.Sotheanalogtodigitalconverterisusedtoconverttheincomingdataintoaformthattheprocessorcanrecognize.Thereisalsoadigitaltoanalogconverterthatallowstheprocessortosenddatatothedeviceitiscontrolling.

Inadditiontotheconverters,manyembeddedmicroprocessorsincludeavarietyoftimersaswell.OneofthemostcommontypesoftimersistheProgrammableIntervalTimer,orPITforshort.APITjustcountsdownfromsomevaluetozero.Onceitreacheszero,itsendsaninterrupttotheprocessorindicatingthatithasfinishedcounting.Thisisusefulfordevicessuchasthermostats,whichperiodicallytestthetemperaturearoundthemtoseeiftheyneedtoturntheairconditioneron,theheateron,etc.

TimeProcessingUnitorTPUforshort.Isessentiallyjustanothertimer,butmoresophisticated.Inadditiontocountingdown,theTPUcandetectinputevents,generateoutputevents,andotherusefuloperations.

DedicatedPulseWidthModulation(PWM)blockmakesitpossiblefortheCPUtocontrolpowerconverters,resistiveloads,motors,etc.,withoutusinglotsofCPUresourcesintighttimerloops.

UniversalAsynchronousReceiver/Transmitter(UART)blockmakesitpossibletoreceiveandtransmitdataoveraseriallinewithverylittleloadontheCPU.

ForthosewantingethemetonecanuseanexternalchiplikeCrystalSemiconductorCS8900A,RealtekRTL8019,orMicrochipENC28J60.Allofthemalloweasyinterfacingwithlowpincount.

(2)Externaloscillatorandcrystal

Externalcrystalisasimpleandstraightforwardconnectionwiththechipandtheloadcapacitanceofthecrystalpart,checkthedatasheet,usually,however,theoscillatorfrequencyandthechipcanbedirectlyconnectedtopins,withoutdecouplingcapacitor.Tendtorequireahighfrequencyoscillatorcapacitor,ifyouareveryluckytohaveaccurateTTLorCMOSleveloscillator,itjustneedstobeconnectedtoXINpin,closeOscillatorusingOSCOff,XOUTcanalsobeavacantground.

Digitallycontrolledoscillatorbyconnectingaresistorintheexternaloscillator,I'mnotsure,butyouwill,sothatwecaninthisconfigurationusinganexternaldigitalvoltmetertestexecutionoscillationiscorrect,thiswillbeverycheap,simpleandmorereliabletouseon-chiposcillatorsufficientlyaccurate.I'msureinthefuturethere

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

当前位置:首页 > 求职职场 > 简历

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

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