【正文】
PUSH 39。s instructions, and when the MCU execution to the instruction, the also make into a high, but users will not do so because this is usually will cause the system to collapse.Fourth, the program39。139。s CD4000 series of these pure hardware buttoned, then the circuit must be a large PCB board! But if the United States if the 7039。一般程序的開頭總有這么一條設(shè)置堆棧指針的指令,因為開機時,SP的初始值為07H,這樣就使堆棧從08H單元開始往后,而08H到1FH這個區(qū)域正是8031的第二、三、四工作寄存器區(qū),經(jīng)常要被使用,這會造成數(shù)據(jù)的混亂。地址:是尋找單片機內(nèi)部、外部的存儲單元、輸入輸出口的依據(jù),內(nèi)部單元的地址值已由芯片設(shè)計者規(guī)定好,不可更改,外部的單元可以由單片機開發(fā)者自行決定,但有一些地址單元是一定要有的(詳見程序的執(zhí)行過程)。 單片機在汽車電子中的應(yīng)用非常廣泛,例如汽車中的發(fā)動機控制器,基于CAN總線的汽車發(fā)動機智能電子控制器,GPS導(dǎo)航系統(tǒng),abs防抱死系統(tǒng),制動系統(tǒng)等等。 用單片機可以構(gòu)成形式多樣的控制系統(tǒng)、數(shù)據(jù)采集系統(tǒng)。因此,對單片機的理解可以從單片微型計算機、單片微控制器延伸到單片應(yīng)用系統(tǒng)。 (Micro Controller Unit)階段,主要的技術(shù)發(fā)展方向是:不斷擴展?jié)M足嵌入式應(yīng)用時,對象系統(tǒng)要求的各種外圍電路與接口電路,突顯其對象的智能化控制能力。現(xiàn)在,這種單片機的使用領(lǐng)域已十分廣泛,如智能儀表、實時工控、通訊設(shè)備、導(dǎo)航系統(tǒng)、家用電器等。 可以說,二十世紀跨越了三個“電”的時代,即電氣時代、電子時代和現(xiàn)已進入的電腦時代。我們現(xiàn)在用的全自動滾筒洗衣機、排煙罩、VCD等等的家電里面都可以看到它的身影!......它主要是作為控制部分的核心部件。而個人電腦中也會有為數(shù)不少的單片機在工作。而傳統(tǒng)的8位單片機的性能也得到了飛速提高,處理能力比起80年代提高了數(shù)百倍。INTEL的Z80是最早按照這種思想設(shè)計出的處理器,從此以后,單片機和專用處理器的發(fā)展便分道揚鑣。 早期的單片機都是8位或4位的。目前,高端的32位單片機主頻已經(jīng)超過300MHz,性能直追90年代中期的專用處理器,而普通的型號出廠價格跌落至1美元,最高端[1]的型號也只有10美元。汽車上一般配備40多部單片機,復(fù)雜的工業(yè)控制系統(tǒng)上甚至可能有數(shù)百臺單片機在同時工作!單片機的數(shù)量不僅遠超過PC機和其他計算的總和,甚至比人類的數(shù)量還要多。 它是一種在線式實時控制計算機,在線式就是現(xiàn)場控制,需要的是有較強的抗干擾能力,較低的成本,這也是和離線式計算機的(比如家用PC)的主要區(qū)別。不過,這種電腦,通常是指個人計算機,簡稱PC機。各種產(chǎn)品一旦用上了單片機,就能起到使產(chǎn)品升級換代的功效,常在產(chǎn)品名稱前冠以形容詞——“智能型”,如智能型洗衣機等。它所涉及的領(lǐng)域都與對象系統(tǒng)相關(guān),因此,發(fā)展MCU的重任不可避免地落在電氣、電子技術(shù)廠家。 單片機的應(yīng)用領(lǐng)域目前單片機滲透到我們生活的各個領(lǐng)域,幾乎很難找到哪個領(lǐng)域沒有單片機的蹤跡。例如工廠流水線的智能化管 可以這樣說,現(xiàn)在的家用電器基本上都采用了單片機控制,從電飯褒、洗衣機、電冰箱、空調(diào)機、彩電、其他音響視頻器材、再到電子秤量設(shè)備,五花八門,無所不在。 此外,單片機在工商,金融,科研、教育,國防航空航天等領(lǐng)域都有著十分廣泛的用途。 三、P0口、P2口和P3的第二功能用法:初學(xué)時往往對P0口、P2口和P3口的第二功能用法迷惑不解,認為第二功能和原功能之間要有一個切換的過程,或者說要有一條指令,事實上,各端口的第二功能完全是自動的,不需要用指令來轉(zhuǎn)換。不同作者編寫程序時,初始化堆棧指令也不完全相同,這是作者的習(xí)慣問題。s with a series of successful SCM market, the result will be a drastic change! Just because you are prepared by microputer programs can achieve high intelligence, high efficiency and high reliability!As the microcontroller on the costsensitive, so now 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 highlevel language has reached the level of visual programming Why is not it? The reason is simply that there is no home puter as a single chip CPU, not as hard as a mass storage visualization of small highlevel language program which even if only one button, will reach tens of K of size! For the home PC39。 form the sequence. In other words, addresses, instructions are also data. Instruction: from single chip designer provides a number of monly used instructions with mnemonic we have a strict correspondence between the developer can not be changed by the MCU. Address: the search for MCU internal, external storage units, input and output port based on the address of the internal unit value provided by the chip designer is good, can not be changed, the external unit can be single chip developers to decide, but there are a number of address units is a must (see procedures for the implementation of the process). Third, P0 port, P2 and P3 of the second function I use: 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 second feature is automatic, do not need instructions to convert. Such as , respectively WR, RD signal, when the microchip processing machines external RAM or external I / O port, they are used as a second function, not as a generalpurpose I / O port used, so long as a A microprocessor implementation of the MOVX instruction, there will be a corresponding signal sent from the or , no prior use of mands. In fact 39。s implementation:Reduction in power after the 8051 microcontroller within the program counter (PC) in the value of 0000 39。and39。, and the stack has a special data transmission instructions that39。 as a generalpurpose I / O port to use. You can arrange the order of a SETB 39。and 39。s with the United States developed 74 series, or the 6039。由于SP中的值可以用指令加以改變,所以只要在程序開始階段更改了SP的值,就可以把堆棧設(shè)置在規(guī)定的內(nèi)存單元中,如在程序開始時,用一條MOV SP,5FH指令,就時把堆棧設(shè)置在從內(nèi)存單元60H開始的單元中。指令:由單片機芯片的設(shè)計者規(guī)定的一種數(shù)字,它與我們常用的指令助記符有著嚴格的一一對應(yīng)關(guān)系,不可以由單片機的開發(fā)者更改。 在大型電路中,這種模塊化應(yīng)用極大地縮小了體積,簡化了電路,降低了損壞、錯誤率,也方便于更換。例如精密的測量設(shè)備(功率計,示波器,各種分析儀)。隨著微電子技術(shù)、IC設(shè)計、EDA工具的發(fā)展,基于SOC的單片機應(yīng)用系統(tǒng)設(shè)計會有較大的發(fā)展。在開創(chuàng)嵌入式系統(tǒng)獨立發(fā)展道路上,Intel公司功不可沒。它在整個裝置中,起著有如人類頭腦的作用,它出了毛病,整個裝置就癱瘓了。一樣的道理,如果把巨型計算機上的操作系統(tǒng)和應(yīng)用軟件拿到家用PC上來運行,家用PC的也是承受不了的。 單片機內(nèi)部也用和電腦功能類似的模塊,比如CPU,內(nèi)存,并行總線,還有和硬盤作用相同的存儲器件,不同的是它的這些部件性能都相對我們的家用電腦弱很多,不過價錢也是低的,一般不超過10元即可......用它來做一些控制電器一類不是很復(fù)雜的工作足矣了。手機、電話、計算器、家用電器、電子玩具、掌上電腦以及鼠標等電腦配件中都配有12部單片機。隨著INTEL i960系列特別是后來的ARM系列的廣泛應(yīng)用,32位單片機迅速取代16位單片機的高端地位,并且進入主流市場。最早的設(shè)計理念是通過將大量外圍設(shè)備和CPU集成在一個芯片中,使計算機系統(tǒng)更小,更容易集成進復(fù)雜的而對體積要求嚴格的控制設(shè)備當(dāng)中。其中最成功的是INTEL的