單片機中英文資料翻譯_第1頁
已閱讀1頁,還剩16頁未讀 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、<p>  MCU Description</p><p>  SCM is also known as micro-controller (Microcontroller Unit), commonly used letters of the acronym MCU MCU that it was first used in industrial control. Only a single chip

2、 by the CPU chip developed from a dedicated processor. The first design is by a large number of peripherals and CPU on a chip in the computer system, smaller, more easily integrated into a complex and demanding on the vo

3、lume control device which. INTEL's Z80 is the first designed in accordance with this idea processor, then on </p><p>  Are 8-bit microcontroller early or 4 bits. One of the most successful is the INTEL 8

4、031, for a simple, reliable and good performance was a lot of praise. Then developed in 8031 out of MCS51 MCU Systems. SCM systems based on this system until now is still widely used. With the increased requirements of i

5、ndustrial control field, began a 16-bit microcontroller, because the cost is not satisfactory but have not been very widely used. After 90 years with the great development of consumer electronics,</p><p>  S

6、CM is more suitable than the specific processor used in embedded systems, so it was up to the application. In fact the number of SCM is the world's largest computer. Modern human life used in almost every piece of el

7、ectronic and mechanical products will be integrated single chip. Phone, telephone, calculator, home appliances, electronic toys, handheld computers and computer accessories such as a mouse with a 1-2 in both the Departme

8、nt of SCM. Personal computer will have a large number of SCM in</p><p>  Single chip, also known as single-chip microcontroller, it is not complete a certain logic chips, but to a computer system integrated

9、into a chip. Equivalent to a micro-computer, and computer than just the lack of a microcontroller I / O devices. General talk: a chip becomes a computer. Its small size, light weight, cheap, for the study, application an

10、d development of facilities provided. At the same time, learning to use the MCU is to understand the principle and structure of the computer the b</p><p>  SCM and the computer functions internally with simi

11、lar modules, such as CPU, memory, parallel bus, the same effect as well, and hard disk memory devices, and different is its performance of these components were relatively weak many of our home computer, but the price is

12、 low , usually not more than 10 yuan you can do with it ...... some control for a class is not very complicated electrical work is enough of. We are using automatic drum washing machine, smoke hood, VCD and so on applian

13、ces which</p><p>  It is an online real-time control computer, control-line is that the scene is needed is a stronger anti-jamming ability, low cost, and this is, and off-line computer (such as home PC), the

14、 main difference.</p><p>  Single chip</p><p>  MCU is through running, and can be modified. Through different procedures to achieve different functions, in particular special unique features, t

15、his is another device much effort needs to be done, some great efforts are very difficult to do. A not very complex functions if the 50's with the United States developed 74 series, or the 60's CD4000 series of t

16、hese pure hardware buttoned, then the circuit must be a large PCB board! But if the United States if the 70's with a series of successful SCM </p><p>  As the microcontroller on the cost-sensitive, so no

17、w the dominant software or the lowest level assembly language, which is the lowest level in addition to more than binary machine code language, and as so low why is the use? Many high-level language has reached the level

18、 of visual programming Why is not it? The reason is simply that there is no home computer as a single chip CPU, not as hard as a mass storage device. A visualization of small high-level language program which even if onl

19、y one but</p><p>  Can be said that the twentieth century across the three "power" era, that is, the age of electricity, the electronic age and has entered into the computer age. However, this comp

20、uter, usually refers to the personal computer, referred to as PC. It consists of the host, keyboard, monitor and other components. Another type of computer, most people do not know how. This computer is to give all kinds

21、 of intelligent machines single chip (also known as micro-controller). As the name suggests, this comp</p><p>  SCM history</p><p>  SCM was born in the late 20th century, 70, experienced SCM, M

22、CU, SoC three stages.</p><p>  First model</p><p>  1.SCM the single chip microcomputer (Single Chip Microcomputer) stage, mainly seeking the best of the best single form of embedded systems arc

23、hitecture. "Innovation model" success, laying the SCM and general computer completely different path of development. In the open road of independent development of embedded systems, Intel Corporation contribute

24、d.</p><p>  2.MCU the micro-controller (Micro Controller Unit) stage, the main direction of technology development: expanding to meet the embedded applications, the target system requirements for the various

25、 peripheral circuits and interface circuits, highlight the object of intelligent control. It involves the areas associated with the object system, therefore, the development of MCU's responsibility inevitably falls o

26、n electrical, electronics manufacturers. From this point of view, Intel faded MCU develop</p><p>  3.Embedded Systems</p><p>  Embedded system microcontroller is an independent development path,

27、 the MCU important factor in the development stage, is seeking applications to maximize the solution on the chip; Therefore, the development of dedicated single chip SoC trend of the natural form. As the microelectronics

28、, IC design, EDA tools development, application system based on MCU SoC design have greater development. Therefore, the understanding of the microcontroller chip microcomputer can be, extended to the single-chip m</p&

29、gt;<p>  MCU applications </p><p>  SCM now permeate all areas of our lives, which is almost difficult tofind traces of the field without SCM. Missile navigation equipment, aircraft, all types of inst

30、rument control, computer network communications and data transmission, industrial automation, real-time process control and data processing, extensive use of various smart IC card, civilian luxury car security system, vi

31、deo recorder, camera, fully automatic washing machine control, and program-controlled toys, electronic pet, etc., wh</p><p>  SCM is widely used in instruments and meters, household appliances, medical equip

32、ment, aerospace, specialized equipment, intelligent management and process control fields, roughly divided into the following several areas:</p><p>  In the application of Intelligent Instruments</p>

33、<p>  SCM has a small size, low power consumption, controlling function, expansion flexibility, the advantages of miniaturization and ease of use, widely used instrument, combining different types of sensors can be

34、realized Zhuru voltage, power, frequency, humidity, temperature, flow, speed, thickness, angle, length, hardness, elemental, physical pressure measurement. SCM makes use of digital instruments, intelligence, miniaturizat

35、ion, and functionality than electronic or digital circuits more powerfu</p><p>  In the industrial control application</p><p>  With the MCU can constitute a variety of control systems, data acq

36、uisition system. Such as factory assembly line of intelligent control</p><p>  In Household Appliances </p><p>  Can be said that the appliances are basically using SCM, praise from the electric

37、 rice, washing machines, refrigerators, air conditioners, color TV, and other audio video equipment, to the electronic weighing equipment, varied, and omnipresent. </p><p>  In the field of computer networks

38、 and communications applications </p><p>  MCU general with modern communication interface, can be easy with the computer data communication, networking and communications in computer applications between de

39、vices had excellent material conditions, are basically all communication equipment to achieve a controlled by MCU from mobile phone, telephone, mini-program-controlled switchboards, building automated communications call

40、 system, train radio communication, to the daily work can be seen everywhere in the mobile phones, trunked mobile ra</p><p>  Microcomputer in the field of medical device applications </p><p>  

41、SCM in the use of medical devices is also quite extensive, such as medical respirator, the various analyzers, monitors, ultrasound diagnostic equipment and hospital beds, etc. call system. </p><p>  In a var

42、iety of major appliances in the modular applications </p><p>  Designed to achieve some special single specific function to be modular in a variety of circuit applications, without requiring the use of perso

43、nnel to understand its internal structure. If music integrated single chip, seemingly simple function, miniature electronic chip in the net (the principle is different from the tape machine), you need a computer similar

44、to the principle of the complex. Such as: music signal to digital form stored in memory (like ROM), read by the microcontroller, analog </p><p>  In large circuits, modular applications that greatly reduce t

45、he volume, simplifies the circuit and reduce the damage, error rate, but also easy to replace.</p><p>  Microcontroller in the application field of automotive equipment </p><p>  SCM in automoti

46、ve electronics is widely used, such as a vehicle engine controller, CAN bus-based Intelligent Electronic Control Engine, GPS navigation system, abs anti-lock braking system, brake system, etc.. </p><p>  In

47、addition, the MCU in business, finance, research, education, national defense, aerospace and other fields has a very wide range of applications.</p><p>  Application of five important part of learning </p

48、><p>  MCU learning an important part of the five applications </p><p>  first, Bus: </p><p>  We know that a circuit is always made by the devices connected by wires, in analog circui

49、ts, the connection does not become a problem because the device is a serial relationship between the general, the device is not much connection between the , but the computer is not the same circuit, it is a microprocess

50、or core, the device must be connected with the microprocessor, the device must be coordination between, so they need to connect on a lot, as if still analog circuit like the microprocessor an</p><p>  Second

51、, data, address, command: </p><p>  The reason why these three together because of the nature of these three are the same - the number, or are a string of '0 'and '1' form the sequence. In ot

52、her words, addresses, instructions are also data. Instruction: from single chip designer provides a number of commonly used instructions with mnemonic we have a strict correspondence between the developer can not be chan

53、ged by the MCU. Address: the search for MCU internal, external storage units, input and output port based on the address of t</p><p>  Third, P0 port, P2 and P3 of the second function I use:</p><p

54、>  Beginners often on the P0 port, P2 and P3 port I use the second function puzzled that the second function and have a switch between the original function of the process, or have a directive, in fact, the port The s

55、econd feature is automatic, do not need instructions to convert. Such as P3.6, P3.7 respectively WR, RD signal, when the microchip processing machines external RAM or external I / O port, they are used as a second functi

56、on, not as a general-purpose I / O port used, so long as a A micro</p><p>  Fourth, the program's implementation: </p><p>  Reduction in power after the 8051 microcontroller within the progr

57、am counter (PC) in the value of 0000 ', the process is always from the 0000' units started, that is: the system must exist in ROM 0000 'this unit , and in 0000 'unit must be stored in a single instruction

58、. </p><p>  Fifth, the stack:</p><p>  Stack is a region, is used to store data, there is no special about the region itself is a part of internal RAM, special access to its data storage and the

59、 way that the so-called 'advanced post out backward first out ', and the stack has a special data transmission instructions that' PUSH 'and' POP ', has a special expertise in its services unit, th

60、at is, the stack pointer SP, whenever a PUSH instruction execution, SP on (in the Based on the original value) automatically add 1, whenever the impl</p><p><b>  單片機介紹</b></p><p>  單

61、片機也被稱為微控制器(Microcontroller Unit),常用英文字母的縮寫MCU表示單片機,它最早是被用在工業(yè)控制領(lǐng)域。單片機由芯片內(nèi)僅有CPU的專用處理器發(fā)展而來。最早的設(shè)計理念是通過將大量外圍設(shè)備和CPU集成在一個芯片中,使計算機系統(tǒng)更小,更容易集成進(jìn)復(fù)雜的而對體積要求嚴(yán)格的控制設(shè)備當(dāng)中。INTEL的Z80是最早按照這種思想設(shè)計出的處理器,從此以后,單片機和專用處理器的發(fā)展便分道揚鑣。 </p><p&

62、gt;  早期的單片機都是8位或4位的。其中最成功的是INTEL的8031,因為簡單可靠而性能不錯獲得了很大的好評。此后在8031上發(fā)展出了MCS51系列單片機系統(tǒng)?;谶@一系統(tǒng)的單片機系統(tǒng)直到現(xiàn)在還在廣泛使用。隨著工業(yè)控制領(lǐng)域要求的提高,開始出現(xiàn)了16位單片機,但因為性價比不理想并未得到很廣泛的應(yīng)用。90年代后隨著消費電子產(chǎn)品大發(fā)展,單片機技術(shù)得到了巨大提高。隨著INTEL i960系列特別是后來的ARM系列的廣泛應(yīng)用,32位單片機迅

63、速取代16位單片機的高端地位,并且進(jìn)入主流市場。而傳統(tǒng)的8位單片機的性能也得到了飛速提高,處理能力比起80年代提高了數(shù)百倍。目前,高端的32位單片機主頻已經(jīng)超過300MHz,性能直追90年代中期的專用處理器,而普通的型號出廠價格跌落至1美元,最高端[1]的型號也只有10美元。當(dāng)代單片機系統(tǒng)已經(jīng)不再只在裸機環(huán)境下開發(fā)和使用,大量專用的嵌入式操作系統(tǒng)被廣泛應(yīng)用在全系列的單片機上。而在作為掌上電腦和手機核心處理的高端單片機甚至可以直接使用專用

64、的Windows和Linux操作系統(tǒng)。 </p><p>  單片機比專用處理器更適合應(yīng)用于嵌入式系統(tǒng),因此它得到了最多的應(yīng)用。事實上單片機是世界上數(shù)量最多的計算機?,F(xiàn)代人類生活中所用的幾乎每件電子和機械產(chǎn)品中都會集成有單片機。手機、電話、計算器、家用電器、電子玩具、掌上電腦以及鼠標(biāo)等電腦配件中都配有1-2部單片機。而個人電腦中也會有為數(shù)不少的單片機在工作。汽車上一般配備40多部單片機,復(fù)雜的工業(yè)控制系統(tǒng)上甚至可

65、能有數(shù)百臺單片機在同時工作!單片機的數(shù)量不僅遠(yuǎn)超過PC機和其他計算的總和,甚至比人類的數(shù)量還要多。 </p><p>  單片機又稱單片微控制器,它不是完成某一個邏輯功能的芯片,而是把一個計算機系統(tǒng)集成到一個芯片上。相當(dāng)于一個微型的計算機,和計算機相比,單片機只缺少了I/O設(shè)備。概括的講:一塊芯片就成了一臺計算機。它的體積小、質(zhì)量輕、價格便宜、為學(xué)習(xí)、應(yīng)用和開發(fā)提供了便利條件。同時,學(xué)習(xí)使用單片機是了解計算機原理

66、與結(jié)構(gòu)的最佳選擇。 </p><p>  單片機內(nèi)部也用和電腦功能類似的模塊,比如CPU,內(nèi)存,并行總線,還有和硬盤作用相同的存儲器件,不同的是它的這些部件性能都相對我們的家用電腦弱很多,不過價錢也是低的,一般不超過10元即可......用它來做一些控制電器一類不是很復(fù)雜的工作足矣了。我們現(xiàn)在用的全自動滾筒洗衣機、排煙罩、VCD等等的家電里面都可以看到它的身影!......它主要是作為控制部分的核心部件。 <

67、;/p><p>  它是一種在線式實時控制計算機,在線式就是現(xiàn)場控制,需要的是有較強的抗干擾能力,較低的成本,這也是和離線式計算機的(比如家用PC)的主要區(qū)別。 </p><p><b>  單片機芯片</b></p><p>  單片機是靠程序運行的,并且可以修改。通過不同的程序?qū)崿F(xiàn)不同的功能,尤其是特殊的獨特的一些功能,這是別的器件需要費很大力

68、氣才能做到的,有些則是花大力氣也很難做到的。一個不是很復(fù)雜的功能要是用美國50年代開發(fā)的74系列,或者60年代的CD4000系列這些純硬件來搞定的話,電路一定是一塊大PCB板!但是如果要是用美國70年代成功投放市場的系列單片機,結(jié)果就會有天壤之別!只因為單片機的通過你編寫的程序可以實現(xiàn)高智能,高效率,以及高可靠性! </p><p>  由于單片機對成本是敏感的,所以目前占統(tǒng)治地位的軟件還是最低級匯編語言,它是除

69、了二進(jìn)制機器碼以上最低級的語言了,既然這么低級為什么還要用呢?很多高級的語言已經(jīng)達(dá)到了可視化編程的水平為什么不用呢?原因很簡單,就是單片機沒有家用計算機那樣的CPU,也沒有像硬盤那樣的海量存儲設(shè)備。一個可視化高級語言編寫的小程序里面即使只有一個按鈕,也會達(dá)到幾十K的尺寸!對于家用PC的硬盤來講沒什么,可是對于單片機來講是不能接受的。 單片機在硬件資源方面的利用率必須很高才行,所以匯編雖然原始卻還是在大量使用。一樣的道理,如果把巨型計算機

70、上的操作系統(tǒng)和應(yīng)用軟件拿到家用PC上來運行,家用PC的也是承受不了的。 </p><p>  可以說,二十世紀(jì)跨越了三個“電”的時代,即電氣時代、電子時代和現(xiàn)已進(jìn)入的電腦時代。不過,這種電腦,通常是指個人計算機,簡稱PC機。它由主機、鍵盤、顯示器等組成。還有一類計算機,大多數(shù)人卻不怎么熟悉。這種計算機就是把智能賦予各種機械的單片機(亦稱微控制器)。顧名思義,這種計算機的最小系統(tǒng)只用了一片集成電路,即可進(jìn)行簡單運算

71、和控制。因為它體積小,通常都藏在被控機械的“肚子”里。它在整個裝置中,起著有如人類頭腦的作用,它出了毛病,整個裝置就癱瘓了?,F(xiàn)在,這種單片機的使用領(lǐng)域已十分廣泛,如智能儀表、實時工控、通訊設(shè)備、導(dǎo)航系統(tǒng)、家用電器等。各種產(chǎn)品一旦用上了單片機,就能起到使產(chǎn)品升級換代的功效,常在產(chǎn)品名稱前冠以形容詞——“智能型”,如智能型洗衣機等?,F(xiàn)在有些工廠的技術(shù)人員或其它業(yè)余電子開發(fā)者搞出來的某些產(chǎn)品,不是電路太復(fù)雜,就是功能太簡單且極易被仿制。究其原

72、因,可能就卡在產(chǎn)品未使用單片機或其它可編程邏輯器件上。 </p><p><b>  單片機歷史</b></p><p>  單片機誕生于20世紀(jì)70年代末,經(jīng)歷了SCM、MCU、SoC三大階段。 </p><p><b>  起初模型</b></p><p>  1.SCM即單片微型計算機(Sin

73、gle Chip Microcomputer)階段,主要是尋求最佳的單片形態(tài)嵌入式系統(tǒng)的最佳體系結(jié)構(gòu)?!皠?chuàng)新模式”獲得成功,奠定了SCM與通用計算機完全不同的發(fā)展道路。在開創(chuàng)嵌入式系統(tǒng)獨立發(fā)展道路上,Intel公司功不可沒。 </p><p>  2.MCU即微控制器(Micro Controller Unit)階段,主要的技術(shù)發(fā)展方向是:不斷擴(kuò)展?jié)M足嵌入式應(yīng)用時,對象系統(tǒng)要求的各種外圍電路與接口電路,突顯其對象

74、的智能化控制能力。它所涉及的領(lǐng)域都與對象系統(tǒng)相關(guān),因此,發(fā)展MCU的重任不可避免地落在電氣、電子技術(shù)廠家。從這一角度來看,Intel逐漸淡出MCU的發(fā)展也有其客觀因素。在發(fā)展MCU方面,最著名的廠家當(dāng)數(shù)Philips公司。 </p><p>  Philips公司以其在嵌入式應(yīng)用方面的巨大優(yōu)勢,將MCS-51從單片微型計算機迅速發(fā)展到微控制器。因此,當(dāng)我們回顧嵌入式系統(tǒng)發(fā)展道路時,不要忘記Intel和Philip

75、s的歷史功績。 </p><p><b>  嵌入式系統(tǒng)</b></p><p>  單片機是嵌入式系統(tǒng)的獨立發(fā)展之路,向MCU階段發(fā)展的重要因素,就是尋求應(yīng)用系統(tǒng)在芯片上的最大化解決;因此,專用單片機的發(fā)展自然形成了SoC化趨勢。隨著微電子技術(shù)、IC設(shè)計、EDA工具的發(fā)展,基于SoC的單片機應(yīng)用系統(tǒng)設(shè)計會有較大的發(fā)展。因此,對單片機的理解可以從單片微型計算機、單片微

76、控制器延伸到單片應(yīng)用系統(tǒng)。 </p><p><b>  單片機的應(yīng)用領(lǐng)域</b></p><p>  目前單片機滲透到我們生活的各個領(lǐng)域,幾乎很難找到哪個領(lǐng)域沒有單片機的蹤跡。導(dǎo)彈的導(dǎo)航裝置,飛機上各種儀表的控制,計算機的網(wǎng)絡(luò)通訊與數(shù)據(jù)傳輸,工業(yè)自動化過程的實時控制和數(shù)據(jù)處理,廣泛使用的各種智能IC卡,民用豪華轎車的安全保障系統(tǒng),錄像機、攝像機、全自動洗衣機的控制,

77、以及程控玩具、電子寵物等等,這些都離不開單片機。更不用說自動控制領(lǐng)域的機器人、智能儀表、醫(yī)療器械了。因此,單片機的學(xué)習(xí)、開發(fā)與應(yīng)用將造就一批計算機應(yīng)用與智能化控制的科學(xué)家、工程師。 </p><p>  單片機廣泛應(yīng)用于儀器儀表、家用電器、醫(yī)用設(shè)備、航空航天、專用設(shè)備的智能化管理及過程控制等領(lǐng)域,大致可分如下幾個范疇: </p><p>  1.在智能儀器儀表上的應(yīng)用 </p>

78、<p>  單片機具有體積小、功耗低、控制功能強、擴(kuò)展靈活、微型化和使用方便等優(yōu)點,廣泛應(yīng)用于儀器儀表中,結(jié)合不同類型的傳感器,可實現(xiàn)諸如電壓、功率、頻率、濕度、溫度、流量、速度、厚度、角度、長度、硬度、元素、壓力等物理量的測量。采用單片機控制使得儀器儀表數(shù)字化、智能化、微型化,且功能比起采用電子或數(shù)字電路更加強大。例如精密的測量設(shè)備(功率計,示波器,各種分析儀)。 </p><p>  2.在工業(yè)

79、控制中的應(yīng)用 </p><p>  用單片機可以構(gòu)成形式多樣的控制系統(tǒng)、數(shù)據(jù)采集系統(tǒng)。例如工廠流水線的智能化管 </p><p>  3.在家用電器中的應(yīng)用 </p><p>  可以這樣說,現(xiàn)在的家用電器基本上都采用了單片機控制,從電飯褒、洗衣機、電冰箱、空調(diào)機、彩電、其他音響視頻器材、再到電子秤量設(shè)備,五花八門,無所不在。 </p><p&

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

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

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

83、t;  單片機在汽車電子中的應(yīng)用非常廣泛,例如汽車中的發(fā)動機控制器,基于CAN總線的汽車發(fā)動機智能電子控制器,GPS導(dǎo)航系統(tǒng),abs防抱死系統(tǒng),制動系統(tǒng)等等。 </p><p>  此外,單片機在工商,金融,科研、教育,國防航空航天等領(lǐng)域都有著十分廣泛的用途。 </p><p>  學(xué)習(xí)應(yīng)用六大重要部分</p><p>  單片機學(xué)習(xí)應(yīng)用的五大重要部分 </p

84、><p><b>  一、總線:</b></p><p>  我們知道,一個電路總是由元器件通過電線連接而成的,在模擬電路中,連線并不成為一個問題,因為各器件間一般是串行關(guān)系,各器件之間的連線并不很多,但計算機電路卻不一樣,它是以微處理器為核心,各器件都要與微處理器相連,各器件之間的工作必須相互協(xié)調(diào),所以需要的連線就很多了,如果仍如同模擬電路一樣,在各微處理器和各器件間單

85、獨連線,則線的數(shù)量將多得驚人,所以在微處理機中引入了總線的概念,各個器件共同享用連線,所有器件的8根數(shù)據(jù)線全部接到8根公用的線上,即相當(dāng)于各個器件并聯(lián)起來,但僅這樣還不行,如果有兩個器件同時送出數(shù)據(jù),一個為0,一個為1,那么,接收方接收到的究竟是什么呢?這種情況是不允許的,所以要通過控制線進(jìn)行控制,使器件分時工作,任何時候只能有一個器件發(fā)送數(shù)據(jù)(可以有多個器件同時接收)。器件的數(shù)據(jù)線也就被稱為數(shù)據(jù)總線,器件所有的控制線被稱為控制總線。在

86、單片機內(nèi)部或者外部存儲器及其它器件中有存儲單元,這些存儲單元要被分配地址,才能使用,分配地址當(dāng)然也是以電信號的形式給出的,由于存儲單元比較多,所以,用于地址分配的線也較多,這些線被稱為地址總線。 </p><p>  二、數(shù)據(jù)、地址、指令:</p><p>  之所以將這三者放在一起,是因為這三者的本質(zhì)都是一樣的——數(shù)字,或者說都是一串‘0’和‘1’組成的序列。換言之,地址、指令也都是數(shù)據(jù)

87、。指令:由單片機芯片的設(shè)計者規(guī)定的一種數(shù)字,它與我們常用的指令助記符有著嚴(yán)格的一一對應(yīng)關(guān)系,不可以由單片機的開發(fā)者更改。地址:是尋找單片機內(nèi)部、外部的存儲單元、輸入輸出口的依據(jù),內(nèi)部單元的地址值已由芯片設(shè)計者規(guī)定好,不可更改,外部的單元可以由單片機開發(fā)者自行決定,但有一些地址單元是一定要有的(詳見程序的執(zhí)行過程)。 </p><p>  三、P0口、P2口和P3的第二功能用法:</p><p&

88、gt;  初學(xué)時往往對P0口、P2口和P3口的第二功能用法迷惑不解,認(rèn)為第二功能和原功能之間要有一個切換的過程,或者說要有一條指令,事實上,各端口的第二功能完全是自動的,不需要用指令來轉(zhuǎn)換。如P3.6、P3.7分別是WR、RD信號,當(dāng)微片理機外接RAM或有外部I/O口時,它們被用作第二功能,不能作為通用I/O口使用,只要一微處理機一執(zhí)行到MOVX指令,就會有相應(yīng)的信號從P3.6或P3.7送出,不需要事先用指令說明。事實上‘不能作為通用I

89、/O口使用’也并不是‘不能’而是(使用者)‘不會’將其作為通用I/O口使用。你完全可以在指令中按排一條SETB P3.7的指令,并且當(dāng)單片機執(zhí)行到這條指令時,也會使P3.7變?yōu)楦唠娖?,但使用者不會這么去做,因為這通常會導(dǎo)致系統(tǒng)的崩潰。 </p><p>  四、程序的執(zhí)行過程:</p><p>  單片機在通電復(fù)位后8051內(nèi)的程序計數(shù)器(PC)中的值為‘0000’,所以程序總是從‘000

90、0’單元開始執(zhí)行,也就是說:在系統(tǒng)的ROM中一定要存在‘0000’這個單元,并且在‘0000’單元中存放的一定是一條指令。 </p><p><b>  五、堆棧:</b></p><p>  堆棧是一個區(qū)域,是用來存放數(shù)據(jù)的,這個區(qū)域本身沒有任何特殊之處,就是內(nèi)部RAM的一部份,特殊的是它存放和取用數(shù)據(jù)的方式,即所謂的‘先進(jìn)后出,后進(jìn)先出’,并且堆棧有特殊的數(shù)據(jù)傳輸

91、指令,即‘PUSH’和‘POP’,有一個特殊的專為其服務(wù)的單元,即堆棧指針SP,每當(dāng)執(zhí)一次PUSH指令時,SP就(在原來值的基礎(chǔ)上)自動加1,每當(dāng)執(zhí)行一次POP指令,SP就(在原來值的基礎(chǔ)上)自動減1。由于SP中的值可以用指令加以改變,所以只要在程序開始階段更改了SP的值,就可以把堆棧設(shè)置在規(guī)定的內(nèi)存單元中,如在程序開始時,用一條MOV SP,#5FH指令,就時把堆棧設(shè)置在從內(nèi)存單元60H開始的單元中。一般程序的開頭總有這么一條設(shè)置堆棧

溫馨提示

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

評論

0/150

提交評論