机电专业英语第2版19unit-19_第1页
机电专业英语第2版19unit-19_第2页
机电专业英语第2版19unit-19_第3页
机电专业英语第2版19unit-19_第4页
机电专业英语第2版19unit-19_第5页
已阅读5页,还剩39页未读 继续免费阅读

下载本文档

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

文档简介

IntroductiontoaMicrocontroller,Unit19,单片机介绍,IntroductiontoaMicrocontroller,Microcontrollers,Microcontrollersarehiddeninsideasurprisingnumberofproductsthesedays(Fig.19.1).About55%ofallCPUssoldintheworldare8-bitmicrocontrollers.IfyourmicrowaveovenhasanLEDorLCDscreenandakeypad,itcontainsamicrocontroller.Allmodemautomobilescontainatleastonemicrocontroller,andcanhaveasmanyassixorseven:Theengineiscontrolledbyamicrocontroller,asaretheanti-lockbrakesandsoon1.Anydevicethathasaremotecontrolalmostcertainlycontainsamicrocontroller:TVs,VCRsandhigh-endstereosystemsallfallintothiscategory2.Digitalcameras,cellphones,camcorders,answeringmachines,laserprinters,telephones(theoneswithcallerID,20-numbermemory,etc.),pagers,andrefrigerators,dishwashers,washersanddryers(theoneswithdisplaysandkeypads)Yougettheidea.Basically,anyproductordevicethatinteractswithitsuserhasamicrocontrollerburiedinside3.,Fig.19-1Productscontainingamicrocontroller,WhatisMicrocontrollerAmicrocontroller(alsoMCUorC)isacomputersystem-on-a-chip,containingaprocessor,memory,andinput/outputfunctions.Itisamicroprocessoremphasizinghighintegration,incontrasttoageneral-purposemicroprocessor(thekindusedinaPC)4.Inadditiontotheusualarithmeticandlogicelementsofageneralpurposemicroprocessor,themicrocontrollerintegratesadditionalelementssuchasread-writememoryfordatastorage,read-onlymemoryforprogramstorage,EEPROMforpermanentdatastorage,peripheraldevices,andinput/outputinterfaces.AtclockspeedsofaslittleasafewMHzorevenlower,microcontrollersoftenoperateatverylowspeedcomparedtomoderndaymicroprocessors,butthisisadequatefortypicalapplications.Theyconsumerelativelylittlepower(milliwatts),andwillgenerallyhavetheabilitytosleepwhilewaitingforaperipheraleventsuchasabuttonpresstowakethemupagaintodosomething.Powerconsumptionwhilesleepingmaybejustnanowatts,makingthemidealforlowpowerandlonglastingbatteryapplications5.,Intel8051TheIntel8051isaHarvardarchitecture,singlechipmicrocontroller(C)whichwasdevelopedbyIntelin1980foruseinembeddedsystems.Intelsoriginal8051familywasdevelopedusingNMOStechnology,butlaterversions,identifiedbyaletter“C”intheirname,e.g.80C51,usedCMOStechnologyandwerelesspower-hungrythantheirNMOSpredecessors6-thismadethememinentlymoresuitableforbattery-powereddevices.,The8051familieshavefollowingimportantfeatures(Fig.19.2):(1)8-bitdatabus-Itcanaccess8bitsofdatainoneoperation(henceitisan8-bitmicrocontroller).(2)16-bitaddressbus-Itcanaccess216memorylocations-64KBeachofRAMandROM.(3)On-chipRAM-128bytes(“DataMemory”).(4)On-chipROM-4KB(“ProgramMemory”).(5)Fourbytebi-directionalinputoutputport.(6)UART(serialport).(7)Two16-bitCounter/timers.(8)Two-levelinterruptpriority.(9)Powersavingmode.,Fig.19-2Importantfeaturesin8501families,Aparticularlyusefulfeatureofthe8051coreistheinclusionofaBooleanprocessingenginewhichallowsbit-levelBooleanlogicoperationstobecarriedoutdirectlyandefficientlyoninternalregistersandRAM.Thisfeaturehelpedtocementthe805lspopularityinindustrialcontrolapplications.Anothervaluedfeatureisthatithasfourseparateregistersets,whichcanbeusedtogreatlyreduceinterruptlatencycomparedtothemorecommonmethodofstoringinterruptcontextonastack.Theoriginal8051coreranat12clockcyclespermachinecycle,withmostinstructionsexecutinginoneortwomachinecycles.Witha12MHzclockfrequency,the8051couldthusexecute1millionone-cycleinstructionspersecondor500000two-cycleinstructionspersecond.Enhanced8051coresarenowcommonlyusedwhichrunatsix,four,two,orevenoneclockpermachinecycle,andhaveclockfrequenciesofupto100MHz,andarethuscapableofanevengreaternumberofinstructionspersecond.,Commonfeaturesincludedinmodern8051basedmicrocontrollerincludebuilt-inresettimerswithbrown-outdetection,on-chiposcillators,selfprogrammableFlashROMprogrammemory,bootloadercodeinROM,EEPROMnon-volatiledatastorage,IC,SPI,andUSBhostinterfaces,PWMgenerators,analogcomparators,A/DandD/Aconverters,extracountersandtimers,in-circuitdebuggingfacilities,moreinterruptsources,andextrapowersavingmodes.,microcontroller,maikrukntruln.微控制器,微控器,单片机camcorderkmk:dn.摄录像机;便携式摄像机display,displein.显示器,指示器;陈列,展览vt.展示;显示integration,intireinn.集成;综合;集中arithmeticrimtikn.算术,算法;运算permanentp:mnntadj.永久的,永恒的;不变的peripheralprifrladj.外围的;外设的;次要的n.外围设备eminentlyeminntliadv.突出地;显著地accessksesvt.使用;存取,访问;接近n.进入;使用权,cementsimentvt.巩固,加强;(用水泥等)粘合n.水泥latencyleitnsin.等待时间,延迟,潜伏期stackstkn.堆;堆叠;存储栈,堆栈non-volatilenn,vltailadj.非易失的;不挥发的debugdi:bvt.调试;排除故障n.调试器,排错器fallinto落入;分成,归入,属于;开始(某事)interactswith与相互影响或作用incontrastto与对比(或对照);与相反,1.Theengineiscontrolledbyamicrocontroller,asaretheanti-lockbrakesandsoon.译文:发动机、防抱死制动系统等等都是用单片机控制的。说明:句中anti-lockbrake表示防抱死制动系统或防锁死煞车系统,可安装在任何带液压刹车的汽车上,能避免在紧急刹车时方向失控及车轮侧滑。“as”isasubstituteforaclause,anditcanbereplacedby“so”(也一样),e.g.1)Sheisadoctor,as/soisherhusband.她和她丈夫都是医生。2)Businessconfidencehaspickedup,as/sohastheParisBourse.商业信心有所提升,巴黎证券交易所的交易情况也有好转。,Languagepoints,2.Anydevicethathasaremotecontrolalmostcertainlycontainsamicrocontroller:TVs,VCRsandhigh-endstereosystemsallfallintothiscategory.译文:任何具有远程遥控的设备都几乎肯定包含一部单片机:电视机、录像机、高端立体声音响系统都属于这一类。说明:“that”isarelativepronounusedtointroduceanattributiveclausemodifying“device”.“fallinto”means“beincludedinorclassifiedas,belongto”(归入,属于,分成;陷入),e.g.1)Goingforward,thesecaseswillfallintofivedistinctcategories.接下来,这些案件将被归入五大类别。2)Oldcivilizationmayfallintodecay.古老的文化可能会渐渐衰落下去。,Languagepoints,3.Basically,anyproductordevicethatinteractswithitsuserhasamicrocontrollerburiedinside.译文:任何与用户进行互动的产品或设备内部都嵌有单片机。说明:“that”isarelativepronounusedtointroduceanattributiveclause.“buriedinside”isapastparticiplephrasemodifying“microcontroller”.“interactwith”means“acttogetherwithothers”(与互动或相互作用),e.g.Butbecausetheseparticlesareelectricallycharged,theyalsointeractwiththeEarthsmagneticfield.但是因为这些粒子是带电的,所以它们会受地球磁场的影响。,Languagepoints,4.Itisamicroprocessoremphasizinghighintegration,incontrasttoageneral-purposemicroprocessor(thekindusedinaPC).译文:与应用在个人电脑中的通用型微处理器相比,它是高度集成的微处理器。说明:“emphasizinghighintegration”isapresentparticiplephraseusedasanattributemodifying“microprocessor”.“incontrastto”means“与对比(或对照);与相反”1)Thegaietyandlightnessofhisworkwereincontrasttohisownsadnature.他的作品的欢乐与轻快与他哀伤的性格形成鲜明的对照。2)Incontrasttoherelderbrother,shewasalwaysconsiderateinhertreatmentofothers.和她哥哥完全不一样,她对别人总是很体贴。,Languagepoints,5.Powerconsumptionwhilesleepingmaybejustnanowatts,makingthemidealforlowpowerandlonglastingbatteryapplications.译文:睡眠时消耗功率可能只有纳瓦级(109W),所以很适宜应用在低功耗且长期用电池供电的场合。说明:句中连词while表示“当的时候”。现在分词sleeping作时间状语,相当于一个时间状语从句。makingthemidealforlowpowerandlonglastingbatteryapplications是现在分词短语,作结果状语。beidealfor表示“对很理想,适用于”e.g.1)Thecablesystemisidealforspanningnaturalbarriersofwiderivers,deepvalleys,orravines.这种钢索体系是跨越宽河道、深丘谷或深山谷天然障碍物的理想体系。2)Unlikeincandescentorfluorescentlamps,whichspewlightinalldirections,LEDsgeneratedirectionallight,makingthemidealforselectivelyilluminatingareas.不像白炽灯或者荧光灯那样灯光四射,LED产生的是定向光,定点照明的理想之选。,Languagepoints,6.Intelsoriginal8051familywasdevelopedusingNMOStechnology,butlaterversions,identifiedbyaletter“C”intheirname,e.g.80C51,usedCMOStechnologyandwerelesspower-hungrythantheirNMOSpredecessors.译文:英特尔最早的805l系列是用NMOS技术开发的,但后来的标以“C”字母如80C51的版本是用CMOS技术开发的芯片。说明:句中现在分词短语usingNMOStechnology作方式状语。过去分词短语identifiedbyaletter“C”intheirname作定语修饰laterversions,相当于一个定语从句。power-hungry表示“高耗电的”e.g.Thenewlineswillbeusedtocarryelectricityfromcoal-richinlandprovincestothepower-hungrycoast.新输电线路将用于连接中国煤炭资源丰富的内陆省份和电力短缺的沿海地区。,Languagepoints,I.Answerthefollowingquestions.,1.Howmanykindsofproductsordevicesembeddedwithamicrocontrollerarelistedinthefirstparagraph?Whatarethey?2.Whatisreferredtoasamicrocontroller?,Sixteenkindsofproductsordevicesarelisted.Theyaremicrowaveovens,modemautomobiles,TVs,VCRs,high-endstereosystems,digitalcameras,cellphones,camcorders,answeringmachines,laserprinters,telephones(theoneswithcallerID,20-numbermemory,etc.),pagers,andrefrigerators,dishwashers,washersanddryers(theoneswithdisplaysandkeypads).,Amicrocontrollerisacomputersystem-on-a-chip,containingaprocessor,memory,andinput/outputfunctions.,Key,Key,Exercises,I.Answerthefollowingquestions.,3.Whatarethemajordifferencesbetweenthemicrocontrollerandthegeneral-purposemicroprocessorusedinaPC?4.Whatarethetwoparticularlyusefulfeaturesofthe8051core?,Incontrasttoageneral-purposemicroprocessor,themicrocontrollerintegratesadditionalelementssuchasread-writememoryfordatastorage,read-onlymemoryforprogramstorage,EEPROMforpermanentdatastorage,peripheraldevices,andinput/outputinterfaces.,Thetwoparticularlyusefulfeaturesofthe8051corearetheinclusionofaBooleanprocessingengineandfourseparateregistersets.,Key,Key,Exercises,II.MarkthefollowingstatementswithT(true)orF(false)accordingtothetext.,1.Themajorityofmicrocontrollersinusetodayareembeddedinothermachinery,whicharecalledembeddedsystems.,2.Thehighintegrationofthemicrocontrollerdrasticallyreducesthenumberofchipsandtheamountofwiringandcircuitboardspace.,3.Byreducingthesizeandcostcomparedtoadesignthatusesseparateelements,microcontrollersmakeiteconomicaltodigitallycontrolevenmoredevicesandprocesses.,T,T,T,Key,Key,Key,II.MarkthefollowingstatementswithT(true)orF(false)accordingtothetext.,4.Microcontrollersoperateatverylowspeed,sotheirapplicationsareverylimited.,5.TheIntel80C51familyconsumeslesspowerthantheoriginal8051family.,6.Becausethe8051corecontainsfourseparateregistersets,itiswidelyusedinindustrialcontrol.,F,T,F,Key,Key,Key,1.防抱死制动系统2.可储存数据的读写存储器3.通用微处理机4.两级中断优先权,III.TranslatethefollowingphrasesandsentencesintoEnglish.,anti-lockbrakes,read-writememoryfordatastorage,Key,Key,Key,general-purposemicroprocessor,two-levelinterruptpriority,Key,III.TranslatethefollowingphrasesandsentencesintoEnglish.,5.微控制器是指一个集成在一块芯片上的计算机系统,它有处理器、存储器和输入输出功能。,Amicrocontrollerisacomputersystem-on-a-chip,containingaprocessor,memory,andinput/outputfunctions.,Key,一、长难句分析的步骤1结合具体语言环境了解全句大意。2剖析全句,分清主要成分和次要成分,主句和从句。3紧缩主干,确定句子的主、谓语,找出句子的基本构架,及其所属句型。4疏通脉络,清理枝蔓,分清主次关系,注意上下层次,前后引衬及其逻辑关系。5按汉语造句的规律,进行选词和语序的调整。6反复研究译文,进行词句锤炼的润饰工夫,最后定稿。Sample:Forafamilyoffour,forexample,itismoreconvenientaswellascheapertositcomfortablyathome,withalmostunlimitedentertainmentavailable,thantogooutinsearchofamusementelsewhere分析:该句的骨干结构为“itismoretodosththantodosthelse”是一个比较结构,而且是在两个不定式之间进行比较;该句中共有三个谓语结构,它们之间的关系为:itismoreconvenientaswellascheaperto为主体结构,但it是形式主语,真正的主语为第二个谓语结构:tositcomfortablyathome,并与第三个谓语结构togooutinsearchofamusementelsewhere作比较。综合上述翻译方法,这个句子我们可以翻译为:譬如,对于一个四口之家来说,舒舒服服地在家中看电视,就能看到几乎数不清的娱乐节目,这比到外面别的地方去消遣又便宜又方便。,长难句的翻译,二、长难句的四种翻译方法1顺译法顺译法就是按照原文时间、方位、逻辑等顺序将长句的内容再现,例如:Evenwhenweturnoffthebesidelampandarefastasleep,electricityisworkingforus,drivingourrefrigerators,heatingourwater,orkeepingourroomsair-conditioned.分析:该句子由一个主句、三个作伴随状语的现在分词以及位于句首的时间状语从旬组成,共有五层意思:A即使在我们关掉了床头灯深深地进入梦乡时;B电仍在为我们工作;C帮我们开动电冰箱;D加热水;E或是室内空调机继续运转。上述五层意思的逻辑关系以及表达的顺序与汉语完全一致,因此,我们可以通过顺序法,译为:即使在我们关掉了床头灯深深地进入梦乡时,电仍在为我们工作;帮我们开动电冰加热,或使室内空调机继续运转。,2倒译法在翻译有些长句时,要想使译文通顺、符合汉语表达习惯,翻译时必须从后往前译,这就是倒译法。譬如:Itthereforebecomesmoreandmoreimportantthat,ifstudentsarenottowastetheiropportunities,therewillhavetobemuchmoredetailedinformationaboutcoursesandmoreadvice.因此,如果要使学生充分利用他们(上大学)的机会,就得为他们提供大量关于课程的更为详尽的信息,作更多的指导。这个问题显得越来越重要。,3分译法分译法是将长句拆开来,将其中从句或短语译成短句,分开来叙述,如:Television,itisoftensaid,keepsoneinformedaboutcurrentevents,allowsonetofollowthelatestdevelopmentsinscienceandpolitics,andoffersanendlessseriesofprogramswhicharebothinstructiveandentertaining.分析:在此长句中,有一个插入语“itisoftensaid”,三个并列的谓语结构,还有一个定语从句,这三个并列的谓语结构尽管在结构上同属于同一个句子,但都有独立的意义,因此在翻译时,可以采用分句法,按照汉语的习惯把整个句子分解成几个独立的分句,此句可译为:人们常说,通过电视可以了解时事,掌握科学和政治的最新动态。从电视里还可以看到层出不穷、既有教育意义又有娱乐性的新节目。,4综合法要求我们把各种方法综合使用,先仔细分析,或按照时间的先后,或按照逻辑顺序,顺逆结合,主次分明地对全句进行综合处理,以便把英语原文翻译成通顺的汉语句子。例如:Peoplewereafraidtoleavetheirhouses,foralthoughthepolicehadbeenorderedtostandbyincaseofemergency,theywerejustasconfusedandhelplessasanybodyelse.尽管警察已接到命令,要作好准备以应付紧急情况,但人们不敢出门,因为警察也和其他人一样不知所措和无能为力。,WhatisanAssemblerAnassemblerisasoftwaretooldesignedtosimplifythetaskofwritingcomputerprograms.1Ittranslatessymboliccodeintoexecutableobjectcode.Thisobjectcodemaythenbeprogrammedintoamicrocontrollerandexecuted.AssemblylanguageprogramstranslatedirectlyintoCPUinstructionswhichinstructtheprocessorwhatoperationstoperform.Therefore,toeffectivelywriteassemblyprograms,youshouldbefamiliarwithboththemicrocomputerarchitectureandtheassemblylanguage.,汇编程序是什么?汇编程序是一种用来简化计算机编写程序的软件工具。汇编程序把符号化的代码(汇编指令)编译成可执行的目标代码(机器指令),然后把该目标代码编入单片机(的程序存储器)中并加以执行。汇编语言程序可直接译成CPU指令,命令处理器完成相应的运算。所以,要有效地编写汇编语言程序,就需要对微型计算机的结构和汇编语言都很熟悉。,Assemblylanguageoperationcodesareeasilyremembered(MOVformoveinstructions,ADDforaddition,andsoon).Youcanalsosymbolicallyexpressaddressesandvaluesreferencedintheoperandfieldofinstructions.Sinceyouassignthesenames,youcanmakethemasmeaningfulasthemnemonicsfortheinstructions.Forexample,ifyourprogrammustmanipulateadateasdata,youcanassignitthesymbolicnameDATE.Ifyourprogramcontainsasetofinstructionsusedasatimingloop(asetofinstructionsexecutedrepeatedlyuntilaspecificamountoftimehaspassed),youcannametheinstructiongroupTIMERLOOP.,汇编语言操作代码很容易记(MOV就是移动指令,ADD就是加法指令等等。还可以用符号表示(存储器)地址和指令的操作字段值。因为指定了这些名字,指令就有了意义,比较容易记忆。比如,如果你在程序中要多次用到一个日期作为数据,你可以给这个日期指定一个符号化的名字DATE(日期)。如果你程序中含有用作延时循环的一组指令(在指定的时间内反复执行的一组指令),你可以给这段指令起名TIMERLOOP。,Anassemblyprogramhasthreeconstituentparts:(1)Machineinstructions.(2)Assemblerdirectives.(3)Assemblercontrols.Amachineinstructionisamachinecodethatcanbeexecutedbythemachine.Detaileddiscussionofthemachineinstructionscanbefoundinthehardwaremanualsofthe8051familyorothermicrocontrollers.Assemblerdirectivesareusedtodefinetheprogramstructureandsymbols,andgeneratenon-executablecode(data,messages,etc.).Assemblercontrolssettheassemblymodesanddirecttheassemblyflow.,汇编程序有3个组成要素:(1)机器指令。(2)汇编指令。(3)汇编控制。机器指令就是可以由CPU执行的机器代码。对机器指令的详细讨论可以参看8051系列或其他单片机的硬件手册。汇编指令用于定义程序的结构和符号,生成非执行代码(数据、信息等)。汇编控制设置汇编程序的模式和流向。,assemblersembln.汇编程序;汇编机;装配工simplifysimplifaivt.简化;使单纯;使简易symbolicsimblikadj.象征的;符号的executableeksikju:tbladj.可执行的;可实行的instructinstrktvt.指导;通知;命令;教授architecture:kitektn.建筑学;建筑风格;计算机构造,架构assemblysemblin.装配;集会;汇编,编译symbolicallysimblikliadv.象征性地;用符号表示operandprndn.操作数;运算对象mnemonicsni:mniksn.记忆术manipulatemnipjuleitvt.操纵;操作;巧妙地处理,I.Answerthefollowingquestions.,1.Whatisanassembler?2.Whatareasofknowledgeshouldapersonunderstandinordertoeffectivelywriteassemblyprograms?,Anassemblerisasoftwaretooldesignedtosimplifythetaskofwritingcomputerprograms.,Toeffectivelywriteassemblyprograms,apersonshouldunderstandboththemicrocomputerarchitectureandtheassemblylanguage.,Key,Key,I.Answerthefollowingquestions.,3.Whatarethethreeconstituentpartsofanassemblyprogram?4.Wherecanwefinddetaileddiscussionofthemachineinstructions?,Anassemblyprogramhasthreeconstituentparts:machineinstructions,assemblerdirectivesandassemblercontrols.,Detaileddiscussionofthemachineinstructionscanbefoundinthehardwaremanualsofthe8051familyorothermicrocontrollers.,Key,Key,汇编程序是什么?汇编程序是一种用来简化计算机编写程序的软件工具。汇编程序把符号化的代码(汇编指令)编译成可执行的目标代码(机器指令),然后把该目标代码编入单片机(的程序存储器)中并加以执行。汇编语言程序可直接译成CPU指令,命令处理器完成相应的运算。所以,要有效地编写汇编语言程序,就需要对微型计算机的结构和汇编语言都很熟悉。汇编语言操作代码很容易记(MOV就是移动指令,ADD就是加法指令等等)。还可以用符号表示(存储器)地址和指令的操作字段值。因为指定了这些名字,指令就有了意义,比较容易记忆。比如,如果你在程序中要多次用到一个日期作为数据,你可以给这个日期指定一个符号化的名字DATE(日期)。如果你程序中含有用作延时循环的一组指令(在指定的时间内反复执行的一组指令),你可以给这段指令起名TIMERLOOP。汇编程序有3个组成要素:(1)机器指令。(2)汇编指令。(3)汇编控制。机器指令就是可以由CPU执行的机器代码。对机器指令的详细讨论可以参看8051

温馨提示

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

评论

0/150

提交评论