2023年全國碩士研究生考試考研英語一試題真題(含答案詳解+作文范文)_第1頁
已閱讀1頁,還剩15頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、<p><b>  附錄一:中文翻譯</b></p><p><b>  單片機的組成</b></p><p>  單片機要自動完成計算,它應該具有哪些最重要的部分呢?</p><p>  我們以打算盤為例計算一道算術(shù)題。例:36+163×156-166÷34?,F(xiàn)在要進行運算,首先需要一把算盤

2、,其次是紙和筆。我們把要計算的問題記錄下來,然后第一步先算163×156,把它與36相加的結(jié)果記在紙上,然后計算166÷34,再把它從上一次結(jié)果中減去,就得到最后的結(jié)果。</p><p>  現(xiàn)在,我們用單片機來完成上述過程,顯然,它首先要有代替算盤進行運算的部件,這就是“運算器”;其次,要有能起到紙和筆作用的器件,即能記憶原始題目、原始數(shù)據(jù)和中間結(jié)果,還要記住使單片機能自動進行運算而編制的各

3、種命令。這類器件就稱為“存貯器”。此外,還需要有能代替人作用的控制器,它能根據(jù)事先給定的命令發(fā)出各種控制信號,使整個計算過程能一步步地進行。但是光有這三部分還不夠,原始的數(shù)據(jù)與命令要輸入,計算的結(jié)果要輸出,都需要按先后順序進行,有時還需等待。</p><p>  如上例中,當在計算163×156時,數(shù)字36就不能同時進入運算器。因此就需要在單片機上設(shè)置按控制器的命令進行動作的“門”,當運算器需要時,就讓

4、新數(shù)據(jù)進入。或者,當運算器得到最后結(jié)果時,再將此結(jié)果輸出,而中間結(jié)果不能隨便“溜出”單片機。這種對輸入、輸出數(shù)據(jù)進行一定管理的“門”電路在單片機中稱為“口”(Port)。在單片機中,基本上有三類信息在流動,一類是數(shù)據(jù),即各種原始數(shù)據(jù)(如上例中的36、163等)、中間結(jié)果(如166÷34所得的商4、余數(shù)30等)、程序(命令的集合)等。這樣要由外部設(shè)備通過“口”進入單片機,再存放在存貯器中,在運算處理過程中,數(shù)據(jù)從存貯器讀入運算器

5、進行運算,運算的中間結(jié)果要存入存貯器中,或最后由運算器經(jīng)“出入口”輸出。</p><p>  用戶要單片機執(zhí)行的各種命令(程序)也以數(shù)據(jù)的形式由存貯器送入控制器,由控制器解讀(譯碼)后變?yōu)楦鞣N控制信號,以便執(zhí)行如加、減、乘、除等功能的各種命令。所以,這一類信息就稱為控制命令,即由控制器去控制運算器一步步地進行運算和處理,又控制存貯器的讀(取出數(shù)據(jù))和寫(存入數(shù)據(jù))等。第三類信息是地址信息,其作用是告訴運算器和控制

6、器在何處去取命令取數(shù)據(jù),將結(jié)果存放到什么地方,通過哪個口輸入和輸出信息等。</p><p>  存貯器又分為只讀存貯器和讀寫存貯器兩種,前者存放調(diào)試好的固定程序和常數(shù),后者存放一些隨時有可能變動的數(shù)據(jù)。顧名思義,只讀存貯器一旦將數(shù)據(jù)存入,就只能讀出,不能更改(EPROM、E2PROM等類型的ROM可通過一定的方法來更改、寫入數(shù)據(jù)——編者注)。而讀寫存貯器可隨時存入或讀出數(shù)據(jù)。</p><p&g

7、t;  實際上,人們往往把運算器和控制器合并稱為中央處理單元——CPU。單片機除了進行運算外,還要完成控制功能。所以離不開計數(shù)和定時。因此,在單片機中就設(shè)置有定時器兼計數(shù)器,其基本結(jié)構(gòu)與本連載之(二)中的舉例類似。到這里為止,我們已經(jīng)知道了單片機的基本組成,即單片機是由中央處理器(即CPU中的運算器和控制器)、只讀存貯器(通常表示為ROM)、讀寫存貯器(又稱隨機存貯器通常表示為RAM)、輸入/輸出口(又分為并行口和串行口,表示為I/O口

8、)等等組成。實際上單片機里面還有一個時鐘電路,使單片機在進行運算和控制時,都能有節(jié)奏地進行。另外,還有所謂的“中斷系統(tǒng)”,這個系統(tǒng)有“傳達室”的作用,當單片機控制對象的參數(shù)到達某個需要加以干預的狀態(tài)時,就可經(jīng)此“傳達室”通報給CPU,使CPU根據(jù)外部事態(tài)的輕重緩急來采取適當?shù)膽洞胧?lt;/p><p>  現(xiàn)在,我們已經(jīng)知道了單片機的組成,余下的問題是如何將它們的各部分連接成相互關(guān)聯(lián)的整體呢?實際上,單片機內(nèi)部有

9、一條將它們連接起來的“紐帶”,即所謂的“內(nèi)部總線”。此總線有如大城市的“干道”,而CPU、ROM、RAM、I/O口、中斷系統(tǒng)等就分布在此“總線”的兩旁,并和它連通。從而,一切指令、數(shù)據(jù)都可經(jīng)內(nèi)部總線傳送,有如大城市內(nèi)各種物品的傳送都經(jīng)過干道進行</p><p>  單片機指令系統(tǒng)與匯編語言程序</p><p>  前面已經(jīng)講述了單片機的幾個主要組成部分,這些部分構(gòu)成了單片機的硬件。所謂硬件

10、(Hardware),就是看得到,摸得到的實體。但是,光有這樣的硬件,還只是有了實現(xiàn)計算和控制功能的可能性。單片機要真正地能進行計算和控制,還必須有軟件(Software)的配合。軟件主要指的是各種程序。只有將各種正確的程序“灌入”(存入)單片機,它才能有效地工作。單片機所以能自動地進行運算和控制,正是由于人把實現(xiàn)計算和控制的步驟一步步地用命令的形式,即一條條指令(Instruction)預先存入到存貯器中,單片機在CPU的控制下,將指

11、令一條條地取出來,并加以翻譯和執(zhí)行。就以兩個數(shù)相加這一簡單的運算來說,當需要運算的數(shù)已存入存貯器后,還需要進行以下幾步:</p><p>  第一步:把第一個數(shù)從它的存貯單元(Location)中取出來,送至運算器?! ?第二步:把第二個數(shù)從它所在的存貯單元中取出來,送至運算器; 第三步:相加; 第四步:把相加完的結(jié)果,送至存貯器中指定的單元。</p><p>  所有這些取數(shù)、送數(shù)、相加

12、、存數(shù)等等都是一種操作(Operation),我們把要求計算機執(zhí)行的各種操作用命令的形式寫下來,這就是指令。但是怎樣才能辨別和執(zhí)行這些操作呢?這是在設(shè)計單片機時由設(shè)計人員賦予它的指令系統(tǒng)所決定的。一條指令,對應著一種基本操作;單片機所能執(zhí)行的全部指令,就是該單片機的指令系統(tǒng)(Iustruction Set),不同種類的單片機,其指令系統(tǒng)亦不同。</p><p>  使用單片機時,事先應當把要解決的問題編成一系列指

13、令。這些指令必須是選定的單片機能識別和執(zhí)行的指令。單片機用戶為解決自己的問題所編的指令程序,稱為源程序(Source Program)。指令通常分為操作碼(Opcode)和操作數(shù)(Operand)兩大部分。操作碼表示計算機執(zhí)行什么操作,即指令的功能;操作數(shù)表示參加操作的數(shù)或操作數(shù)所在的地址(即操作數(shù)所存放的地方編號)。因為單片機是一種可編程器件,只“認得”二進碼(0、1)。要單片機運作,單片機系統(tǒng)中的所有指令,都必須以二進制編碼的形式來

14、表示。例如,在Intel公司的MCS-51系列單片機中,從存貯器中取出一數(shù)到CPU中的累加器(在運算器中,參與運算、存放運算結(jié)果的專用寄存器)的指令代碼為74H,累加器內(nèi)容加立即數(shù)的代碼為24H,再加上立即數(shù)代碼,累加器送數(shù)到內(nèi)部RAM存貯器的代碼為F6H~F7H等。這些指令是用十六進制表示二進制的機器碼。</p><p>  MCS-51單片機的字長為8位,有時,要完成某些操作用一個字節(jié)尚不能充分表達。所以,在

15、指令系統(tǒng)中有單字節(jié)指令,也有多字節(jié)指令。機器碼是由一連串的0和1組成,沒有明顯的特征,不好記憶,不易理解,易出錯。所以,直接用它來編寫程序十分困難。因而,人們就用一些助記符(Mue monic)——通常是指令功能的英文縮寫來代替操作碼,如MCS-51中數(shù)的傳送常用MOV(Move的縮寫)、加法用Add(Addition的縮寫)來作為助記符。這樣,每條指令有明顯的動作特征,易于記憶和理解,也不容易出錯。用助記符來編寫的程序稱為匯編語言程序

16、。但是,助記符編寫的程序便于人理解,可單片機卻只認識二進制機器代碼,因此,為了讓單片機能“讀懂”匯編語言程序必須再轉(zhuǎn)換成由二進制機器碼構(gòu)成的程序,這種轉(zhuǎn)換過程,就稱為“匯編”。匯編可借助于人工查表法來實現(xiàn),也可借助PC機通過所謂“交叉匯編程序”來完成。由機器碼構(gòu)成的用戶程序一旦“進入”了單片機,再“啟動”單片機,就可讓它執(zhí)行輸入程序所規(guī)定的任務。</p><p>  單片機8051的CPU由運算器和控制器組成。&

17、lt;/p><p><b>  一、運算器  </b></p><p>  運算器以完成二進制的算術(shù)/邏輯運算部件ALU為核心,再加上暫存器TMP、累加器ACC、寄存器B、程序狀態(tài)標志寄存器PSW及布爾處理器。累加器ACC是一個八位寄存器,它是CPU中工作最頻繁的寄存器。在進行算術(shù)、邏輯運算時,累加器ACC往往在運算前暫存一個操作數(shù)(如被加數(shù)),而運算后又保存其結(jié)果(如代

18、數(shù)和)。寄存器B主要用于乘法和除法操作。標志寄存器PSW也是一個八位寄存器,用來存放運算結(jié)果的一些特征,如有無進位、借位等。其每位的具體含意如下所示。PSW CY AC FO RS1 RS0 OV - P對用戶來講,最關(guān)心的是以下四位。</p><p>  1 進位標志CY(PSW 7)。它表示了運算是否有進位(或借位)。如果操作結(jié)果在最高位有進位(加法)或者借位(減法),則該位為1,否則為0。</p>

19、;<p>  2 輔助進位標志AC。又稱半進位標志,它反映了兩個八位數(shù)運算低四位是否有半進位,即低四位相加(或減)有否進位(或借位),如有則AC為1狀態(tài),否則為0。</p><p>  3 溢出標志位OV。MCS-51反映帶符號數(shù)的運算結(jié)果是否有溢出,有溢出時,此位為1,否則為0。</p><p>  4 奇偶標志P。反映累加器ACC內(nèi)容的奇偶性,如果ACC中的運算結(jié)果有偶數(shù)

20、個1(如11001100B,其中有4個1),則P為0,否則,P=1。</p><p>  PSW的其它位,將在以后再介紹。由于PSW存放程序執(zhí)行中的狀態(tài),故又叫程序狀態(tài)字?運算器中還有一個按位(bit)進行邏輯運算的邏輯處理機(又稱布爾處理機)。其功能在介紹位指令時再說明。</p><p><b>  二、控制器</b></p><p>  控

21、制器是CPU的神經(jīng)中樞,它包括定時控制邏輯電路、指令寄存器、譯碼器、地址指針DPTR及程序計數(shù)器PC、堆棧指針SP等。這里程序計數(shù)器PC是由16位寄存器構(gòu)成的計數(shù)器。要單片機執(zhí)行一個程序,就必須把該程序按順序預先裝入存儲器ROM的某個區(qū)域。單片機動作時應按順序一條條取出指令來加以執(zhí)行。因此,必須有一個電路能找出指令所在的單元地址,該電路就是程序計數(shù)器PC。當單片機開始執(zhí)行程序時,給PC裝入第一條指令所在地址,它每取出一條指令(如為多字節(jié)

22、指令,則每取出一個指令字節(jié)),PC的內(nèi)容就自動加1,以指向下一條指令的地址,使指令能順序執(zhí)行。只有當程序遇到轉(zhuǎn)移指令、子程序調(diào)用指令,或遇到中斷時(后面將介紹),PC才轉(zhuǎn)到所需要的地方去。8051 CPU碢C指定的地址,從ROM相應單元中取出指令字節(jié)放在指令寄存器中寄存,然后,指令寄存器中的指令代碼被譯碼器譯成各種形式的控制信號,這些信號與單片機時鐘振蕩器產(chǎn)生的時鐘脈沖在定時與控制電路中相結(jié)合,形成按一定時間節(jié)拍變化的電平和時鐘,即所謂

23、控制信息,在CPU內(nèi)部協(xié)調(diào)寄存器之間的數(shù)據(jù)傳輸、運算等操作。</p><p><b>  三、存儲器</b></p><p>  存儲器是單片機的又一個重要組成部分,圖6給出了一種存儲容量為256個單元的存儲器結(jié)構(gòu)示意圖。其中每個存儲單元對應一個地址,256個單元共有256個地址,用兩位16進制數(shù)表示,即存儲器的地址(00H~FFH)。存儲器中每個存儲單元可存放一個八

24、位二進制信息,通常用兩位16進制數(shù)來表示,這就是存儲器的內(nèi)容。存儲器的存儲單元地址和存儲單元的內(nèi)容是不同的兩個概念,不能混淆。</p><p><b>  一、程序存儲器</b></p><p>  程序是控制計算機動作的一系列命令,單片機只認識由“0”和“1”代碼構(gòu)成的機器指令。如前述用助記符編寫的命令MOV A,#20H,換成機器認識的代碼74H、20H:(寫成二

25、進制就是01110100B和00100000B)。在單片機處理問題之前必須事先將編好的程序、表格、常數(shù)匯編成機器代碼后存入單片機的存儲器中,該存儲器稱為程序存儲器。程序存儲器可以放在片內(nèi)或片外,亦可片內(nèi)片外同時設(shè)置。由于PC程序計數(shù)器為16位,使得程序存儲器可用16位二進制地址,因此,內(nèi)外存儲器的地址最大可從0000H到FFFFH。8051內(nèi)部有4k字節(jié)的ROM,就占用了由0000H~0FFFH的最低4k個字節(jié),這時片外擴充的程序存儲器

26、地址編號應由1000H開始,如果將8051當做8031使用,不想利用片內(nèi)4kROM,全用片外存儲器,則地址編號仍可由0000H開始。不過,這時應使8051的第{31}腳(即EA腳)保持低電平。當EA為高電平時,用戶在0000H至0FFFH范圍內(nèi)使用內(nèi)部ROM,大于0FFFH后,單片機CPU自動訪問外部程序存儲器。</p><p><b>  二、數(shù)據(jù)存儲器</b></p>&l

27、t;p>  單片機的數(shù)據(jù)存儲器由讀寫存儲器RAM組成。其最大容量可擴展到64k,用于存儲實時輸入的數(shù)據(jù)。8051內(nèi)部有256個單元的內(nèi)部數(shù)據(jù)存儲器,其中00H~7FH為內(nèi)部隨機存儲器RAM,80H~FFH為專用寄存器區(qū)。實際使用時應首先充分利用內(nèi)部存儲器,從使用角度講,搞清內(nèi)部數(shù)據(jù)存儲器的結(jié)構(gòu)和地址分配是十分重要的。因為將來在學習指令系統(tǒng)和程序設(shè)計時會經(jīng)常用到它們。8051內(nèi)部數(shù)據(jù)存儲器地址由00H至FFH共有256個字節(jié)的地址空

28、間,該空間被分為兩部分,其中內(nèi)部數(shù)據(jù)RAM的地址為00H~7FH(即0~127)。而用做特殊功能寄存器的地址為80H~FFH。在此256個字節(jié)中,還開辟有一個所謂“位地址”區(qū),該區(qū)域內(nèi)不但可按字節(jié)尋址,還可按“位(bit)”尋址。對于那些需要進行位操作的數(shù)據(jù),可以存放到這個區(qū)域。從00H到1FH安排了四組工作寄存器,每組占用8個RAM字節(jié),記為R0~R7。究竟選用那一組寄存器,由前述標志寄存器中的RS1和RS0來選用。在這兩位上放入不同

29、的二進制數(shù),即可選用不同的寄存器組,如附表1所示。</p><p><b>  三、特殊功能寄存器</b></p><p>  特殊功能寄存器(SFR)的地址范圍為80H~FFH。在MCS-51中,除程序計數(shù)器PC和四個工作寄存器區(qū)外,其余21個特殊功能寄存器都在這SFR塊中。其中5個是雙字節(jié)寄存器,它們共占用了26個字節(jié)。各特殊功能寄存器的符號和地址見附表2。其中帶

30、*號的可位尋址。特殊功能寄存器反映了8051的狀態(tài),實際上是8051的狀態(tài)字及控制字寄存器。用于CPU PSW便是典型一例。這些特殊功能寄存器大體上分為兩類,一類與芯片的引腳有關(guān),另一類作片內(nèi)功能的控制用。與芯片引腳有關(guān)的特殊功能寄存器是P0~P3,它們實際上是4個八位鎖存器(每個I/O口一個),每個鎖存器附加有相應的輸出驅(qū)動器和輸入緩沖器就構(gòu)成了一個并行口。MCS-51共有P0~P3四個這樣的并行口,可提供32根I/O線,每根線都是雙

31、向的,并且大都有第二功能。其余用于芯片控制的寄存器中,累加器A、標志寄存器PSW、數(shù)據(jù)指針DPTR等的功能前已提及,而另一些寄存器的功能在后面有關(guān)部分再作進一步介紹</p><p>  單片機的指令系統(tǒng)和尋址方式</p><p>  單片機要正常運作,事先需編制程序,再把程序放入存貯器中,然后由CPU執(zhí)行該程序。程序是由指令組成的,指令的基本組成是操作碼和操作數(shù)。單片機的品種很多,設(shè)計時怎

32、樣表示操作碼和操作數(shù),都有各自的規(guī)定,再有指令代碼也各不相同,因此,必須對所選單片機的全部指令,也就是所謂“指令系統(tǒng)”,有足夠的了解。各個系列的單片機雖然有不同的指令系統(tǒng),但也有其共同性。掌握一種單片機的指令系統(tǒng),對其它系列單片機可以起到觸類旁通的作用。MCS-51單片機應用廣泛,派生品種多,具有代表性,所以,這里以MCS-51系列的指令系統(tǒng)為例說明“指令”的組成和應用。單片機的應用 </p><p>  目前單

33、片機滲透到我們生活的各個領(lǐng)域,幾乎很難找到哪個領(lǐng)域沒有單片機的蹤跡。導彈的導航裝置,飛機上各種儀表的控制,計算機的網(wǎng)絡(luò)通訊與數(shù)據(jù)傳輸,工業(yè)自動化過程的實時控制和數(shù)據(jù)處理,廣泛使用的各種智能IC卡,民用豪華轎車的安全保障系統(tǒng),錄像機、攝像機、全自動洗衣機的控制,以及程控玩具、電子寵物等等,這些都離不開單片機。更不用說自動控制領(lǐng)域的機器人、智能儀表、醫(yī)療器械以及各種智能機械了。因此,單片機的學習、開發(fā)與應用將造就一批計算機應用與智能化控制的

34、科學家、工程師。 </p><p>  單片機廣泛應用于儀器儀表、家用電器、醫(yī)用設(shè)備、航空航天、專用設(shè)備的智能化管理及過程控制等領(lǐng)域,大致可分如下幾個范疇: </p><p>  四.在智能儀器儀表上的應用 </p><p>  單片機具有體積小、功耗低、控制功能強、擴展靈活、微型化和使用方便等優(yōu)點,廣泛應用于儀器儀表中,結(jié)合不同類型的傳感器,可實現(xiàn)諸如電壓、功率、

35、頻率、濕度、溫度、流量、速度、厚度、角度、長度、硬度、元素、壓力等物理量的測量。采用單片機控制使得儀器儀表數(shù)字化、智能化、微型化,且功能比起采用電子或數(shù)字電路更加強大。例如精密的測量設(shè)備(功率計,示波器,各種分析儀)。</p><p>  2.在工業(yè)控制中的應用 </p><p>  用單片機可以構(gòu)成形式多樣的控制系統(tǒng)、數(shù)據(jù)采集系統(tǒng)。例如工廠流水線的智能化管 </p><

36、;p><b>  芯片</b></p><p>  理,電梯智能化控制、各種報警系統(tǒng),與計算機聯(lián)網(wǎng)構(gòu)成二級控制系統(tǒng)等。 </p><p>  3.在家用電器中的應用 </p><p>  可以這樣說,現(xiàn)在的家用電器基本上都采用了單片機控制,從電飯煲、洗衣機、電冰箱、空調(diào)機、彩電、其他音響視頻器材、再到電子秤量設(shè)備,五花八門,無所不在。 &

37、lt;/p><p>  4.在計算機網(wǎng)絡(luò)和通信領(lǐng)域中的應用 </p><p>  現(xiàn)代的單片機普遍具備通信接口,可以很方便地與計算機進行數(shù)據(jù)通信,為在計算機網(wǎng)絡(luò)和通信設(shè)備間的應用提供了極好的物質(zhì)條件,現(xiàn)在的通信設(shè)備基本上都實現(xiàn)了單片機智能控制,從手機,電話機、小型程控交換機、樓宇自動通信呼叫系統(tǒng)、列車無線通信、再到日常工作中隨處可見的移動電話,集群移動通信,無線電對講機等。 </p>

38、;<p>  5.單片機在醫(yī)用設(shè)備領(lǐng)域中的應用 </p><p>  單片機在醫(yī)用設(shè)備中的用途亦相當廣泛,例如醫(yī)用呼吸機,各種分析儀,監(jiān)護儀,超聲診斷設(shè)備及病床呼叫系統(tǒng)等等。 </p><p>  6.在各種大型電器中的模塊化應用 </p><p>  某些專用單片機設(shè)計用于實現(xiàn)特定功能,從而在各種電路中進行模塊化應用,而不要求使用人員了解其內(nèi)部結(jié)構(gòu)。

39、如音樂集成單片機,看似簡單的功能,微縮在純電子芯片中(有別于磁帶機的原理),就需要復雜的類似于計算機的原理。如:音樂信號以數(shù)字的形式存于存儲器中(類似于ROM),由微控制器讀出,轉(zhuǎn)化為模擬音樂電信號(類似于聲卡)。 </p><p>  在大型電路中,這種模塊化應用極大地縮小了體積,簡化了電路,降低了損壞、錯誤率,也方便于更換。 </p><p>  7.單片機在汽車設(shè)備領(lǐng)域中的應用 &l

40、t;/p><p>  單片機在汽車電子中的應用非常廣泛,例如汽車中的發(fā)動機控制器,基于CAN總線的汽車發(fā)動機智能電子控制器,GPS導航系統(tǒng),abs防抱死系統(tǒng),制動系統(tǒng)等等。 </p><p>  此外,單片機在工商,金融,科研、教育,國防航空航天等領(lǐng)域都有著十分廣泛的用途。</p><p>  附錄二:外文資料原文</p><p>  Singl

41、e-chip components</p><p>  To auto-complete single-chip basis, it should be the most important part of what it? </p><p>  Calculated as an example we calculate on an abacus math problems togethe

42、r. Cases: 36 +163 × 156-166 ÷ 34. Now to carry out operations, first of all need a plan, followed by Pen and paper. We have to calculate the issue of record, and then count the first step, 163 × 156, add i

43、t with the results of 36 recorded in the paper, and then calculate 166 ÷ 34, then it results from a minus, it has been the final outcome. </p><p>  Now, we use single-chip to complete the process, it is

44、 clear that it should be instead of thinking first of all the components for computing, which is the "calculator"; Secondly, there must be able to play the role of devices, which can remember the original subje

45、ct, the raw data and intermediate results, but also remember to enable single-chip operation can be automatically prepared by the various orders. These devices called "memory." In addition, the need to replace

46、the role of the controller</p><p>  The first step: the first number from its storage unit (Location) in the check out to the computing device. Step two: the second number from its storage unit in the check

47、out to the computing device; the third step: add; fourth step: End the sum of the results to the specified memory unit. </p><p>  All of these take a number, send a few, the sum of deposit, etc. are a few op

48、erations (Operation), we asked the computer to operate with the implementation of the various forms of writing down the order, which is instruction. But how can we identify them and to perform these operations? This is a

49、 single chip in the design by the designers of the instruction given to it by decision. A command, corresponding to a basic operation; single chip can implement all the commands, the command is the singl</p><p

50、>  The use of single-chip, the prior should be the problem to be solved into a series of commands. These instructions must be selected to identify and implement single-chip instructions. Single-chip customers to solve

51、 their own problems by the instructions for the procedure, known as source code (Source Program). Usually divided into opcode instruction (Opcode) and operand (Operand) of two major parts. Operation of the computer code

52、that the implementation of any operation, that is, the function of</p><p>  MCS-51 MCU 8-bit word length, and sometimes, it is necessary to complete a certain operation can not be fully expressed bytes. Ther

53、efore, in the instruction in single-byte instruction, but also a number of byte instructions. By a series of binary 0 and 1 components, there is no obvious characteristics, poor memory, difficult to understand and easy t

54、o make mistakes. Therefore, the direct use of it is very difficult to write procedures. Thus, people with some Mnemonic (Mue monic) - usually the com</p><p>  MCU - 51 CPU and memory </p><p>  8

55、051 single-chip CPU and the controller by the composition operator.</p><p>  8051 single-chip CPU and the controller by the composition operator. </p><p>  A calculator to complete the binary ca

56、lculator arithmetic / logic operations as the core components ALU, registers plus TMP, accumulator ACC, register B, the procedures state symbol and Boolean processor PSW register. ACC is an eight accumulator register, wh

57、ich is working CPU registers the most frequent. In arithmetic, logic operations, the accumulator ACC are in operation before the operation a number of temporary (such as being summand), and computing and then save the re

58、sults (such as algebra</p><p>  2 auxiliary binary symbol AC. Also known as semi-binary logo, it reflects the number of two eight computing whether there is a half low of four binary, that is, the sum of low

59、-four (or minus) it has binary (or borrow) and, if the AC for 1 state, otherwise to 0. 3 overflow flag OV. MCS-51 to reflect the number of operator symbols with the results of whether there is any overflow, the overflow,

60、 this bit is 1, otherwise to 0. 4 parity symbol P. Reflect the content of accumulator ACC parity, if the </p><p>  PSW other places, will be introduced at a later stage. PSW stored procedures as a result of

61、the implementation of the state, it is also called the program status word? Calculator also includes a by-bit (bit) to carry out logic operations of the logic processor (also known as Boolean processor). Its function-bit

62、 instructions in the introduction that when. </p><p>  Second, the controller </p><p>  Controller is the nerve center of the CPU, which includes the timing control logic circuit, an instruction

63、 register, decoder, address pointer DPTR and the program counter PC, such as the stack pointer SP. This program counter PC is composed of 16-bit counter register. To single-chip implementation of a program, it is necessa

64、ry in order to advance the program into an area of ROM memory. Single-chip action should be taken out of a sequence of instructions to be implemented. Therefore, there must b</p><p>  A program memory </p

65、><p>  Control computer program is a series of action commands, single-chip only recognized by the "0" and "1" consisting of machine code instructions. Such as the preparation of the foregoi

66、ng order by Mnemonic MOV A, # 20H, understanding the code into the machine 74H, 20H: (written in binary is 01110100B and 00100000B). Deal with problems in the single-chip will be required before good procedures, tables,

67、constants compiled into machine code into the microcontroller memory, the memory as the program m</p><p>  Second, data storage </p><p>  Single-chip data memory RAM memory by reading and writin

68、g components. Its maximum capacity can be expanded to 64k, used to store real-time data input. 8051 there are 256 units of the internal data memory, in which 00H ~ 7FH for internal random access memory RAM, 80H ~ FFH reg

69、ister for the special zone. Actual use should be the first full use of internal memory, from the use of perspective, to understand the structure of internal data memory and address of the distribution is very important.

70、Beca</p><p>  Third, special function register </p><p>  Special Function Register (SFR) address the range of 80H ~ FFH. In the MCS-51, in addition to program counter register PC and four work a

71、reas, and the remaining 21 special function register SFR in this block. Of which five are double-byte register, which takes up a total of 26 bytes. The special function registers and address of the symbols see Table 2. W

72、hich can be with * bit addressable. Special Function Registers 8051 reflects the state of the state of 8051 is actually the word and control wo</p><p>  Single-chip instruction and addressing mode </p>

73、<p>  To the normal operation of single-chip, to be programmed in advance, and then the procedure Add memory, and then from the CPU to implement the program. Procedure is composed by the directive, Directive is an

74、 essential component of the operation code and operands. Many varieties of single-chip, the design of how that operation code and operands, have their own requirements, and then there are instructions code varies, theref

75、ore, must be single-chip all the selected command, which is the so-called</p><p>  The instructions said to 20H into the accumulator A of the number of (a special function register).</p><p>  4.

76、 In intelligent instruments on the application </p><p>  Single-chip microcomputer with small size, low power consumption, control function is strong, flexible, miniaturization and extended use of convenienc

77、e etc, widely used in instrumentation, combined with different kinds of sensors, such as voltage, power can be realized, the frequency, the humidity, temperature and flow rate, speed, thickness, Angle, length, hardness,

78、elements, pressure measurements of physical quantities. Adopting SCM control makes instrumentation digital, intelligent, miniaturi</p><p>  2. The application in industrial control </p><p>  Usi

79、ng SCM can make various control systems, data acquisition system. For example factory assembly line of intelligent tube </p><p><b>  芯片</b></p><p><b>  chip </b></p>

80、;<p>  Richard, elevator intelligent control, various alarm system, and computer networking constitute a secondary control system, etc. </p><p>  3. The application in household appliances </p>

81、<p>  It can be said that now of household appliances basically all adopted MCU control, from electric cooker, washing machines, refrigerators, air conditioner, TVS and other audio video equipment, electronic equip

82、ment, again to amount is multifarious, omnipresent. </p><p>  4. In computer network and communication field application </p><p>  Modern single-chip generally have the communication interface c

83、an be easily and computer data communications, for in computer network and communication between devices applied to provide the excellent material conditions, now of communication equipment basically all realized microco

84、ntroller intelligent control, from mobile, telephone, small pabx, building automatic communication call system, train wireless communication, to daily work ubiquitous mobile phone, cluster mobile communications, radio<

85、;/p><p>  5. Microcomputer in the medical device field application </p><p>  The USES of microcomputer in the medical equipment is quite widespread, such as medical also breathing machine, various

86、analyzer, monitors, ultrasound diagnostic equipment and sickbed call system, etc. </p><p>  6. In various large-scale electric appliance of modular applications </p><p>  Some special MCU design

87、ed to accomplish a specific function, thus in the various circuits for modular application, and not require staff know its internal structure. If music integration microcontroller, deceptively simple function, miniature

88、in pure electronic chip (different from the principle of tape) be complex resemble computer principle. Such as: music signals in digital form stored in memory (ROM), similar to read by micro controller into analog signal

89、s (similar to the music sound card). </p><p>  In large circuit, this modular applications have greatly reduced volume, simplified the circuit, reduced damage, the error rate, also facilitate replacement. &l

90、t;/p><p>  7. Microcomputer in the application fields of auto equipment </p><p>  The application of microcomputer in the automotive electronics is very extensive, for example, in the car engine co

91、ntroller based on CAN bus automobile engine intelligence electronic controllers, GPS navigation system, abs antilock brake systems, braking system, etc. </p><p>  In addition, microcomputer in the industry a

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論