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

下載本文檔

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

文檔簡(jiǎn)介

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

40、t;/p><p>  單片機(jī)在汽車電子中的應(yīng)用非常廣泛,例如汽車中的發(fā)動(dòng)機(jī)控制器,基于CAN總線的汽車發(fā)動(dòng)機(jī)智能電子控制器,GPS導(dǎo)航系統(tǒng),abs防抱死系統(tǒng),制動(dòng)系統(tǒng)等等。 </p><p>  此外,單片機(jī)在工商,金融,科研、教育,國(guó)防航空航天等領(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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論