![溫度報警器外文翻譯_第1頁](http://file2.renrendoc.com/fileroot_temp3/2021-5/1/589711b1-057d-44df-b3bb-b63269542312/589711b1-057d-44df-b3bb-b632695423121.gif)
![溫度報警器外文翻譯_第2頁](http://file2.renrendoc.com/fileroot_temp3/2021-5/1/589711b1-057d-44df-b3bb-b63269542312/589711b1-057d-44df-b3bb-b632695423122.gif)
![溫度報警器外文翻譯_第3頁](http://file2.renrendoc.com/fileroot_temp3/2021-5/1/589711b1-057d-44df-b3bb-b63269542312/589711b1-057d-44df-b3bb-b632695423123.gif)
![溫度報警器外文翻譯_第4頁](http://file2.renrendoc.com/fileroot_temp3/2021-5/1/589711b1-057d-44df-b3bb-b63269542312/589711b1-057d-44df-b3bb-b632695423124.gif)
![溫度報警器外文翻譯_第5頁](http://file2.renrendoc.com/fileroot_temp3/2021-5/1/589711b1-057d-44df-b3bb-b63269542312/589711b1-057d-44df-b3bb-b632695423125.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、畢業(yè)設(shè)計(論文)外文翻譯題 目: 基于51單片機(jī)溫度報警器的設(shè)計英文題目: 51 mcu-based design of a temperature alarm 系 別: _ 信息工程系_專 業(yè): _ 電子信息工程_班 級: _ _學(xué) 號: _ _ 姓 名: _ _ _指導(dǎo)老師: _ _ _ 填表日期: _2010.12.18_ 單片機(jī) 單片機(jī)是指一個集成在一塊芯片上的完整計算機(jī)系統(tǒng)。盡管他的大部分功能集成在一塊小芯片上,但是它具有一個完整計算機(jī)所需要的大部分部件:cpu、內(nèi)存、內(nèi)部和外部總線系統(tǒng),目前大部分還會具有外存。同時集成諸如通訊接口、定時器,實(shí)時時鐘等外圍設(shè)備。而現(xiàn)在最強(qiáng)大的單片機(jī)系
2、統(tǒng)甚至可以將聲音、圖像、網(wǎng)絡(luò)、復(fù)雜的輸入輸出系統(tǒng)集成在一塊芯片上。 單片機(jī)也被稱為微控制器(microcontroller),是因?yàn)樗钤绫挥迷诠I(yè)控制領(lǐng)域。單片機(jī)由芯片內(nèi)僅有cpu的專用處理器發(fā)展而來。最早的設(shè)計理念是通過將大量外圍設(shè)備和cpu集成在一個芯片中,使計算機(jī)系統(tǒng)更小,更容易集成進(jìn)復(fù)雜的而對提及要求嚴(yán)格的控制設(shè)備當(dāng)中。intel的z80是最早按照這種思想設(shè)計出的處理器,從此以后,單片機(jī)和專用處理器的發(fā)展便分道揚(yáng)鑣。 早期的單片機(jī)都是8位或4位的。其中最成功的是intel的8031,因?yàn)楹唵慰煽慷阅懿诲e獲得了很大的好評。此后在8031上發(fā)展出了mcs51系列單片機(jī)系統(tǒng)。基于這一系統(tǒng)
3、的單片機(jī)系統(tǒng)直到現(xiàn)在還在廣泛使用。隨著工業(yè)控制領(lǐng)域要求的提高,開始出現(xiàn)了16位單片機(jī),但因?yàn)樾詢r比不理想并未得到很廣泛的應(yīng)用。90年代后隨著消費(fèi)電子產(chǎn)品大發(fā)展,單片機(jī)技術(shù)得到了巨大的提高。隨著intel i960系列特別是后來的arm系列的廣泛應(yīng)用,32位單片機(jī)迅速取代16位單片機(jī)的高端地位,并且進(jìn)入主流市場。而傳統(tǒng)的8位單片機(jī)的性能也得到了飛速提高,處理能力比起80年代提高了數(shù)百倍。目前,高端的32位單片機(jī)主頻已經(jīng)超過300mhz,性能直追90年代中期的專用處理器,而普通的型號出廠價格跌落至1美元,最高端的型號也只有10美元。當(dāng)代單片機(jī)系統(tǒng)已經(jīng)不再只在裸機(jī)環(huán)境下開發(fā)和使用,大量專用的嵌入式操
4、作系統(tǒng)被廣泛應(yīng)用在全系列的單片機(jī)上。而在作為掌上電腦和手機(jī)核心處理的高端單片機(jī)甚至可以直接使用專用的windows和linux操作系統(tǒng)。 8051單片機(jī)由運(yùn)算器、控制器、寄存器等組成。運(yùn)算器以完成二進(jìn)制的算術(shù)/邏輯運(yùn)算部件alu為核心,再加上暫存器tmp、累加器acc、寄存器b、程序狀態(tài)標(biāo)志寄存器psw及布爾處理器。累加器acc是一個八位寄存器,它是cpu中工作最頻繁的寄存器。在進(jìn)行算術(shù)、邏輯運(yùn)算時,累加器acc往往在運(yùn)算前暫存一個操作數(shù)(如被加數(shù)),而運(yùn)算后又保存其結(jié)果(如代數(shù)和)。寄存器b主要用于乘法和除法操作。標(biāo)志寄存器psw也是一個八位寄存器,用來存放運(yùn)算結(jié)果的一些特征,如有無進(jìn)位、借
5、位等。其每位的具體含意如下所示。psw cy ac fo rs1 rs0 ovp對用戶來講,最關(guān)心的是以下四點(diǎn)。1. 進(jìn)位標(biāo)志cy(psw7)。它表示了運(yùn)算是否有進(jìn)位(或借位)。如果操作結(jié)果在最高位有進(jìn)位(加法)或者借位(減法),則該位為1,否則為0。2.2. 輔助進(jìn)位標(biāo)志ac。又稱半進(jìn)位標(biāo)志,它反映了兩個八位數(shù)運(yùn)算低四位是否有半進(jìn)位,即低四位相加(或減)有否進(jìn)位(或借位),如有則ac為1狀態(tài),否則為0。3. 溢出標(biāo)志位ov。mcs1反映帶符號數(shù)的運(yùn)算結(jié)果是否有溢出,有溢出時,此位為1,否則為0。4. 奇偶標(biāo)志p。反映累加器acc內(nèi)容的奇偶性,如果acc中的運(yùn)算結(jié)果有偶數(shù)個1(如1100110
6、0b,其中有4個1),則p為0,否則,p=1。psw的其它位,將在以后再介紹。由于psw存放程序執(zhí)行中的狀態(tài),故又叫程序狀態(tài)字,運(yùn)算器中還有一個按位(bit)進(jìn)行邏輯運(yùn)算的邏輯處理機(jī)(又稱布爾處理機(jī))。其功能在介紹位指令時再說明。關(guān)于控制器,控制器是cpu的神經(jīng)中樞,它包括定時控制邏輯電路、指令寄存器、譯碼器、地址指針dptr及程序計數(shù)器pc、堆棧指針sp等。這里程序計數(shù)器pc是由16位寄存器構(gòu)成的計數(shù)器。要單片機(jī)執(zhí)行一個程序,就必須把該程序按順序預(yù)先裝入存儲器rom的某個區(qū)域。單片機(jī)動作時應(yīng)按順序一條條取出指令來加以執(zhí)行。因此,必須有一個電路能找出指令所在的單元地址,該電路就是程序計數(shù)器pc
7、。當(dāng)單片機(jī)開始執(zhí)行程序時,給pc裝入第一條指令所在地址,它每取出一條指令(如為多字節(jié)指令,則每取出一個指令字節(jié)),pc的內(nèi)容就自動加1,以指向下一條指令的地址,使指令能順序執(zhí)行。只有當(dāng)程序遇到轉(zhuǎn)移指令、子程序調(diào)用指令,或遇到中斷時,pc才轉(zhuǎn)到所需要的地方去。8051 cpu指定的地址,從rom相應(yīng)單元中取出指令字節(jié)放在指令寄存器中寄存,然后,指令寄存器中的指令代碼被譯碼器譯成各種形式的控制信號,這些信號與單片機(jī)時鐘振蕩器產(chǎn)生的時鐘脈沖在定時與控制電路中相結(jié)合,形成按一定時間節(jié)拍變化的電平和時鐘,即所謂控制信息,在cpu內(nèi)部協(xié)調(diào)寄存器之間的數(shù)據(jù)傳輸、運(yùn)算等操作。再來介紹一下存儲器,存儲器是單片機(jī)
8、的又一個重要組成部分,有一種存儲容量為256個單元的存儲器結(jié)構(gòu)。其中每個存儲單元對應(yīng)一個地址,256個單元共有256個地址,用兩位16進(jìn)制數(shù)表示,即存儲器的地址(00hffh)。存儲器中每個存儲單元可存放一個八位二進(jìn)制信息,通常用兩位16進(jìn)制數(shù)來表示,這就是存儲器的內(nèi)容。存儲器的存儲單元地址和存儲單元的內(nèi)容是不同的兩個概念,不能混淆。單片機(jī)還包括程序存儲器。程序是控制計算機(jī)動作的一系列命令,單片機(jī)只認(rèn)識由“0”和“1”代碼構(gòu)成的機(jī)器指令。如前述用助記符編寫的命令mov a,#20h,換成機(jī)器認(rèn)識的代碼74h、20h:(寫成二進(jìn)制就是01110100b和00100000b)。在單片機(jī)處理問題之前
9、必須事先將編好的程序、表格、常數(shù)匯編成機(jī)器代碼后存入單片機(jī)的存儲器中,該存儲器稱為程序存儲器。程序存儲器可以放在片內(nèi)或片外,亦可片內(nèi)片外同時設(shè)置。由于pc程序計數(shù)器為16位,使得程序存儲器可用16位二進(jìn)制地址,因此,內(nèi)外存儲器的地址最大可從0000h到ffffh。8051內(nèi)部有4k字節(jié)的rom,就占用了由0000h0fffh的最低4k個字節(jié),這時片外擴(kuò)充的程序存儲器地址編號應(yīng)由1000h開始,如果將8051當(dāng)做8031使用,不想利用片內(nèi)4krom,全用片外存儲器,則地址編號仍可由0000h開始。不過,這時應(yīng)使用ea腳,保持低電平。當(dāng)ea為高電平時,用戶在0000h至0fffh范圍內(nèi)使用內(nèi)部ro
10、m,大于0fffh后,單片機(jī)cpu自動訪問外部程序存儲器。單片機(jī)的數(shù)據(jù)存儲器由讀寫存儲器ram組成。其最大容量可擴(kuò)展到64k,用于存儲實(shí)時輸入的數(shù)據(jù)。8051內(nèi)部有256個單元的內(nèi)部數(shù)據(jù)存儲器,其中00h7fh為內(nèi)部隨機(jī)存儲器ram,80hffh為專用寄存器區(qū)。實(shí)際使用時應(yīng)首先充分利用內(nèi)部存儲器,從使用角度講,搞清內(nèi)部數(shù)據(jù)存儲器的結(jié)構(gòu)和地址分配是十分重要的。因?yàn)閷碓趯W(xué)習(xí)指令系統(tǒng)和程序設(shè)計時會經(jīng)常用到它們。8051內(nèi)部數(shù)據(jù)存儲器地址由00h至ffh共有256個字節(jié)的地址空間,該空間被分為兩部分,其中內(nèi)部數(shù)據(jù)ram的地址為00h7fh(即0127)。而用做特殊功能寄存器的地址為80hffh。在此
11、256個字節(jié)中,還開辟有一個所謂“位地址”區(qū),該區(qū)域內(nèi)不但可按字節(jié)尋址,還可按“位(bit)”尋址。對于那些需要進(jìn)行位操作的數(shù)據(jù),可以存放到這個區(qū)域。從00h到1fh安排了四組工作寄存器,每組占用8個ram字節(jié),記為r0r7。究竟選用那一組寄存器,由前述標(biāo)志寄存器中的rs1和rs0來選用。在這兩位上放入不同的二進(jìn)制數(shù),即可選用不同的寄存器組。特殊功能寄存器(sfr)的地址范圍為80hffh。在mcs51中,除程序計數(shù)器pc和四個工作寄存器區(qū)外,其余21個特殊功能寄存器都在這sfr塊中。其中5個是雙字節(jié)寄存器,它們共占用了26個字節(jié)。各特殊功能寄存器的符號和地址。其中帶*號的可位尋址。特殊功能寄
12、存器反映了8051的狀態(tài),實(shí)際上是8051的狀態(tài)字及控制字寄存器。用于cpu psw便是典型一例。這些特殊功能寄存器大體上分為兩類,一類與芯片的引腳有關(guān),另一類作片內(nèi)功能的控制用。與芯片引腳有關(guān)的特殊功能寄存器是p0p3,它們實(shí)際上是4個8位鎖存器(每個i/o口一個),每個鎖存器附加有相應(yīng)的輸出驅(qū)動器和輸入緩沖器就構(gòu)成了一個并行口。mcs51共有p0p3四個這樣的并行口,可提供32根i/o線,每根線都是雙向的,并且大都有第二功能。其余用于芯片控制的寄存器中,累加器a、標(biāo)志寄存器psw、數(shù)據(jù)指針dptr等的功能前已提及。下面再來談?wù)撊绾巫寙纹瑱C(jī)如何正常工作。單片機(jī)要正常運(yùn)作,事先需編制程序,再把
13、程序放入存貯器中,然后由cpu執(zhí)行該程序。程序是由指令組成的,指令的基本組成是操作碼和操作數(shù)。單片機(jī)的品種很多,設(shè)計時怎樣表示操作碼和操作數(shù),都有各自的規(guī)定,再有指令代碼也各不相同,因此,必須對所選單片機(jī)的全部指令,也就是所謂“指令系統(tǒng)”,有足夠的了解。各個系列的單片機(jī)雖然有不同的指令系統(tǒng),但也有其共同性。掌握一種單片機(jī)的指令系統(tǒng),對其它系列單片機(jī)可以起到觸類旁通的作用。mcs51單片機(jī)應(yīng)用廣泛、派生品種多、具有代表性。所以,這里以mcs51系列的指令系統(tǒng)為例說明“指令”的組成和應(yīng)用。例子1,mov a,#20h:這條指令表示把20h這個數(shù)送入累加器a中(一個特殊功能寄存器)。例子2,add
14、a,70h:這條指令表示把累加器a中的內(nèi)容(在上例中送入的#20h)和存貯器中地址為70h單元中的內(nèi)容(也是一個數(shù)字),通過算術(shù)邏輯單元(英文縮寫為alu)相加,并將結(jié)果保留在a中。這里mov、add等稱為操作碼,而a、#20h、70h等均稱為操作數(shù)。在匯編語言程序中,操作碼通常由英文單詞縮寫而成,這樣有助于記憶,所以又稱助記符。如mov就是英文單詞move的縮寫,含有搬移的意思;而add即為英文單詞,其意為相加。因此,對于略懂英語的用戶,掌握單片機(jī)指令的含意是較為方便的。操作數(shù)有多種表示法,如以上的#20h稱為立即數(shù),即20h就是真正的操作數(shù)。而70h是存貯器中某個單元的地址,在該單元中,放
15、著操作數(shù)(比如說是3ah),adda,70h不是將70h和a中的內(nèi)容相加,而是從存貯器70h單元中將3ah取出和a中的內(nèi)容相加。由上可知,要找到實(shí)際操作數(shù),有時就要轉(zhuǎn)個彎,甚至轉(zhuǎn)幾個彎,這個過程稱為尋址4:操作數(shù)放在ram某個單元中,該單元的地址又放在寄存器r0或r1中。 如果ram的地址大于256,則該地址存放在16位寄存器dptr(數(shù)據(jù)指針)中,此時在寄存器名前加符號來表示這種間接尋址。如mov a, r0。其它還有變址尋址、相對尋址、位尋址等,待以后再詳細(xì)介紹。可能有人會問,在指令中直接給出實(shí)際操作數(shù),不是簡單明了嗎?為什么還要用其它幾種尋址方式呢?這是因?yàn)樵诰幹瞥绦驎r很難一下子就給出操
16、作數(shù)。如用單片機(jī)控制溫度時,時時需要將給定的控制溫度(如20)減去環(huán)境溫度,而環(huán)境溫度時時有變化,顯然無法在程序指令中給出,只有通過一定方式,將其送入某個輸入/輸出口,再存放在某個寄存器中,這就必須用到寄存器尋址。又如要進(jìn)行算術(shù)運(yùn)算,要計算每班學(xué)員各科成績的平均值,如果把每個學(xué)員的各科都編一個程序,在程序中直接給出該學(xué)員各科成績,再求平均值,顯然太麻煩。這里可以編一個求平均成績的通用程序,把每位學(xué)員的成績送入存貯器的各個單元中,這時可采取直接尋址,一個程序可供每個學(xué)員用,不是更方便嗎?所以,尋址方式越多,編制程序就越方便、靈活,適用范圍就越廣,尋址有如找人,如被找的人有手機(jī)、bp機(jī)、座機(jī)電話等
17、多種聯(lián)系方式則就容易找到他,單片機(jī)也是如此,尋址方式越多,找操作數(shù)越方便,單片機(jī)的功能就越強(qiáng)。前面介紹51系列單片機(jī)的尋址方式時,常遇到單片機(jī)內(nèi)部的一些寄存器、累加器a、通用寄存器r0r7、數(shù)據(jù)指針dptr和存貯器等。在以后介紹指令時,數(shù)據(jù)就要在這些寄存器、存貯器之間傳送,或者進(jìn)行運(yùn)算。因此,編制程序就需熟悉單片機(jī)的內(nèi)部結(jié)構(gòu)。8051單片機(jī)的內(nèi)部總體結(jié)構(gòu)其基本特性:8位cpu、片內(nèi)振蕩器、4k字節(jié)rom、128字節(jié)ram、21個特殊功能寄存器、32根i/o線可尋址的64k字節(jié)外部數(shù)據(jù)、程序存貯空間、2個16位定時器、計數(shù)器,中斷結(jié)構(gòu):具有二個優(yōu)先級、五個中斷源、一個全雙口串行口位尋址(即可尋找
18、某位的內(nèi)容)功能,適于按位進(jìn)行邏輯運(yùn)算的位處理器。除128字節(jié)ram、4k字節(jié)rom和中斷、串行口及定時器模塊外,還有4組i/o口p0p3,余下的就是cpu的全部組成。把4krom換為eprom就是8751的結(jié)構(gòu),如去掉rom/eprom部分即為8031的框圖,如果將rom置換為flash存貯器或eeprom,或再省去某些i/o,即可得到51系列的派生品種,如89c51、at89c2051等單片機(jī)的框圖。單片機(jī)各部分是通過內(nèi)部的總線有機(jī)地連接起來的。下面再談at89c51單片機(jī)性能介紹。at89c51是一種帶4k字節(jié)閃爍可編程可擦除只讀存儲器(fperomflash :programmable
19、 and erasable read only memory)的低電壓,高性能cmos8位微處理器,俗稱單片機(jī)。該器件采用atmel高密度非易失存儲器制造技術(shù)制造,與工業(yè)標(biāo)準(zhǔn)的mcs-51指令集和輸出管腳相兼容。由于將多功能8位cpu和閃爍存儲器組合在單個芯片中,atmel的at89c51是一種高效微控制器,為很多嵌入式控制系統(tǒng)提供了一種靈活性高且價廉的方案。 1.主要特性:與mcs-51兼容,4k字節(jié)可編程閃爍存儲器,壽命:1000寫/擦循環(huán),數(shù)據(jù)保留時間:10年,全靜態(tài)工作:0hz-24hz,三級程序存儲器鎖定,128*8位內(nèi)部ram,32可編程i/o線,兩個16位定時器/計數(shù)器,5個中斷
20、源,可編程串行通道,低功耗的閑置和掉電模式,片內(nèi)振蕩器和時鐘電路。2.管腳說明:vcc:供電電壓,gnd:接地,p0口:p0口為一個8位漏級開路雙向i/o口,每腳可吸收8ttl門電流。當(dāng)p1口的管腳第一次寫1時,被定義為高阻輸入。p0能夠用于外部程序數(shù)據(jù)存儲器,它可以被定義為數(shù)據(jù)/地址的第八位。在fiash編程時,p0 口作為原碼輸入口,當(dāng)fiash進(jìn)行校驗(yàn)時,p0輸出原碼,此時p0外部必須被拉高。 p1口:p1口是一個內(nèi)部提供上拉電阻的8位雙向i/o口,p1口緩沖器能接收輸出4ttl門電流。p1口管腳寫入1后,被內(nèi)部上拉為高,可用作輸入,p1口被外部下拉為低電平時,將輸出電流,這是由于內(nèi)部上
21、拉的緣故。在flash編程和校驗(yàn)時,p1口作為第8位地址接收。 p2口:p2口為一個內(nèi)部上拉電阻的8位雙向i/o口,p2口緩沖器可接收,輸出4個ttl門電流,當(dāng)p2口被寫“1”時,其管腳被內(nèi)部上拉電阻拉高,且作為輸入。并因此作為輸入時,p2口的管腳被外部拉低,將輸出電流。這是由于內(nèi)部上拉的緣故。p2口當(dāng)用于外部程序存儲器或16位地址外部數(shù)據(jù)存儲器進(jìn)行存取時,p2口輸出地址的高八位。在給出地址“1”時,它利用內(nèi)部上拉優(yōu)勢,當(dāng)對外部8位地址數(shù)據(jù)存儲器進(jìn)行讀寫時,p2口輸出其特殊功能寄存器的內(nèi)容。p2口在flash編程和校驗(yàn)時接收高8位地址信號和控制信號。p3口:p3口管腳是8個帶內(nèi)部上拉電阻的雙向
22、i/o口,可接收輸出4個ttl門電流。當(dāng)p3口寫入“1”后,它們被內(nèi)部上拉為高電平,并用作輸入。作為輸入,由于外部下拉為低電平,p3口將輸出電流(ill)這是由于上拉的緣故。p3口也可作為at89c51的一些特殊功能口:p3.0 rxd(串行輸入口)、p3.1 txd(串行輸出口)、p3.2 /int0(外部中斷0)、p3.3 /int1(外部中斷1)、p3.4 t0(記時器0外部輸入)、p3.5 t1(記時器1外部輸入)、p3.6 /wr(外部數(shù)據(jù)存儲器寫選通)、p3.7 /rxd(外部數(shù)據(jù)存儲器讀選通)。p3口同時為閃爍編程和編程校驗(yàn)接收一些控制信號。rst:復(fù)位輸入。當(dāng)振蕩器復(fù)位器件時,
23、要保持rst腳兩個機(jī)器周期的高電平時間。ale/prog:當(dāng)訪問外部存儲器時,地址鎖存允許的輸出電平用于鎖存地址的地位字節(jié)。在flash編程期間,此引腳用于輸入編程脈沖。在平時,ale端以不變的頻率周期輸出正脈沖信號,此頻率為振蕩器頻率的1/6。因此它可用作對外部輸出的脈沖或用于定時目的。然而要注意的是:每當(dāng)用作外部數(shù)據(jù)存儲器時,將跳過一個ale脈沖。如想禁止ale的輸出可在sfr8eh地址上置0。此時, ale只有在執(zhí)行movx,movc指令是ale才起作用。另外,該引腳被略微拉高。如果微處理器在外部執(zhí)行狀態(tài)ale禁止,置位無效。 /psen:外部程序存儲器的選通信號。在由外部程序存儲器取指
24、期間,每個機(jī)器周期兩次/psen有效。但在訪問外部數(shù)據(jù)存儲器時,這兩次有效的/psen信號將不出現(xiàn)。/ea/vpp:當(dāng)/ea保持低電平時,則在此期間外部程序存儲器(0000hffffh),不管是否有內(nèi)部程序存儲器。注意加密方式,/ea將內(nèi)部鎖定為reset;當(dāng)/ea端保持高電平時,此間內(nèi)部程序存儲器。在flash編程期間,此引腳也用于施加12v編程電源(vpp)。xtal1:反向振蕩放大器的輸入及內(nèi)部時鐘工作電路的輸入。 xtal2:來自反向振蕩器的輸出。振蕩器:xtal1和xtal2分別為反向放大器的輸入和輸出。該反向放大器可以配置為片內(nèi)振蕩器。石晶振蕩和陶瓷振蕩均可采用。如采用外部時鐘源驅(qū)
25、動器件,xtal2應(yīng)不接。有余輸入至內(nèi)部時鐘信號要通過一個二分頻觸發(fā)器,因此對外部時鐘信號的脈寬無任何要求,但必須保證脈沖的高低電平要求的寬度。 芯片擦除: 整個perom陣列和三個鎖定位的電擦除可通過正確的控制信號組合,并保持ale管腳處于低電平10ms 來完成。在芯片擦操作中,代碼陣列全被寫“1”且在任何非空存儲字節(jié)被重復(fù)編程以前,該操作必須被執(zhí)行。此外,at89c51設(shè)有穩(wěn)態(tài)邏輯,可以在低到零頻率的條件下靜態(tài)邏輯,支持兩種軟件可選的掉電模式。在閑置模式下,cpu停止工作。但ram,定時器,計數(shù)器,串口和中斷系統(tǒng)仍在工作。在掉電模式下,保存ram的內(nèi)容并且凍結(jié)振蕩器,禁止所用其他芯片功能,
26、直到下一個硬件復(fù)位為止。about single-chip refers to an integrated single-chip at a chip on the integrity of computer systems. even though most of his features at a small chip on, but it has a complete computer most of the necessary components: cpu, memory, internal and external bus system, most will have the co
27、re. at the same time, such as integrated communication interfaces, timers, real-time clock and other peripheral equipment. and now the most powerful single-chip microcomputer system can even voice, image, network, complex input and output of system integration on a single chip. also known as single-
28、chip microcontroller, because it is the first to be used in the field of industrial control. single-chip by chip dedicated processor cpu only evolved. the first design concept through to a large number of peripherals and cpu in a single chip, the computer system so that smaller, more easily integrat
29、ed into the complex and demanding with regard to the reference control devices. intel the z80 is one of the earliest in accordance with this idea to design the processor, from then on, the mcu and the development of a dedicated processor parted ways. early single-chip 8-bit or all of four. one of th
30、e most successful are intels 8031, because the performance of a good reliable and easy access to great acclaim. later on in 8031 developed a series of single-chip microcomputer system mcs51. based on single-chip microcomputer system of the system is still widely used until now. as the field of indus
31、trial control requirements improve, beginning a 16-bit single-chip, but not ideal because cost-effective has not been very widely used. after the 90s with the big consumer electronics product development, single-chip technology has been enormous improve. with intel i960 series, especially the later
32、series of widely used arm, 32-bit single-chip 16-bit single-chip microcomputer rapidly replacing high-end status, and enter the mainstream market. whereas the traditional 8-bit mcu performance has been the rapid increase in processing power compared to the 80s to raise a few hundred times. at presen
33、t, the high-end single-chip 32 ghz has been more than 300mhz, the performance of close on the heels of the mid-90s dedicated processor, while the general model ex-factory price dropped to one u.s. dollars, the most high-end models, only 10 u.s. dollars. contemporary single-chip microcomputer system
34、is no longer only in the bare-metal environment development and use of a large number of dedicated embedded operating system is widely used in on a full range of single-chip microcomputer. in the cell phone as a handheld computer and deal with high-end single-chip core can even direct the use of a d
35、edicated windows and linux operating systems.single-chip 8051 cpu by the operator and controller. calculator to complete the binary arithmetic/logic operations parts alu at the core, together with registers on tmp, accumulator acc, register b, the procedure register psw status symbol and boolean pro
36、cessor. accumulator acc is an eight registers, which are the most frequent job of cpu registers. in arithmetic, logic operations, the accumulator acc is often a temporary one at pre-computing operands (such as being summand), and computing and then save the results (such as algebra and). register b
37、mainly used for multiplication and division operations. psw register is also a mark of eight registers, used to store the results of some of the characteristics of computing, if not binary, and so on, and borrow. its specific meaning of each are shown below. psw cy ac fo rs1 rs0 ov-p to users, the m
38、ost concerned about are the following four. first of all, the binary symbol cy (psw7). whether or not it has express a binary operator (or borrow bits). if the operation results at the highest level there is binary (addition) or borrow (subtraction), the bit is 1, otherwise to 0. secondly, auxiliary
39、 binary symbol ac. also known as semi-binary logo, it reflects both the number eight computing whether there is a half low of four binary, that is, the sum of the four low (or minus) has not binary (or borrow), and if there is ac for one status, otherwise to 0. third, the overflow flag ov. mcs-1 to
40、reflect the number of operator symbols with the results of whether there is any spill, there is spill, this bit is 1, otherwise to 0. fourth, the parity symbol p. reflect the content of accumulator acc parity, if the acc in an operation that results in even-numbered months have one (such as 11001100
41、b, one of four there is one), then p is 0, otherwise, p = 1. psw other places, will introduce at a later time. psw stored procedures because of the status, it is also called the program status character have a calculator in bitwise (bit) to carry out logic operations logic processor (also known as b
42、oolean processor). its function in the introduction explain-bit instruction. about the controller, cpu controller is the nerve center, which includes the timing control logic circuit, an instruction register, decoder, address pointer dptr and the program counter pc, stack pointer sp and so on. this
43、program counter pc is 16-bit register consisting of counters. to single-chip implementation of a program, it is necessary to put the program into memory in advance in order rom of an area. single chip action should be taken out of a sequence of commands to be implemented. therefore, we must have a c
44、ircuit to find out where the command module address, the circuit is the program counter pc. when beginning the implementation of single-chip program, to the pc load instructions where the first address, it took out one of each command (such as for multi-byte instructions, each took out a command byt
45、e), pc will automatically add the contents of one to point to the next instruction address, so that instruction can be the order of implementation. only when the process encountered in the transfer of instructions, subroutine call instructions, or encountered failure (after the introduction), pc onl
46、y needed to go to go places. 8051 cpus designated address, the corresponding unit from the rom command byte out on the instruction register in the storage, then, an instruction register of the instruction decoder code was translated into various forms of control signals, these single-chip signal and
47、 clock oscillator generated clock pulse in timing and control circuit combination of a certain period of time according to changes in electric calm beat the clock, the so-called control of information in the cpu internal coordination between the register data transfer, computing and other operations
48、. then tell us about memory, memory mcu are also an important component of has a storage capacity of 256 units of memory structure. one of each memory cell corresponds to an address, a total of 256 unit 256 addresses, use two 16 hexadecimal numbers, that is, memory address (00h ffh). memory of each
49、memory cell can store one of eight binary information, usually using two 16-band number to express, and this is the contents of memory. memory storage unit address and the contents of memory cells are two different concepts, should not confuse. single-chip also includes the program memory. process c
50、ontrol computers are a series of action commands, microcontroller know only by 0 and 1 consisting of machine code instructions. such as the preparation of the foregoing order with mnemonic mov a, # 20h, know the code into the machine 74h, 20h: (written in binary is 01110100b and 00100000b). problem
51、in scm is required before the deal will be good procedures, tables, constants compiled into machine code into single-chip memory, the memory referred to as program memory. program memory can be put on the chip or chip, chip-chip can also be set up simultaneously. as the pc program counter to 16, mak
52、ing the procedure available for 16-bit binary memory addresses, therefore, both inside and outside the memory address from 0000h to the largest ffffh. 8051 has 4k bytes of internal rom, on the occupied by the 0000h 0fffh minimum 4k bytes, when the expansion of chip program memory address number shal
53、l be 1000h start, if you use 8051 as a 8031, do not want to use chip 4krom , all used memory chip, then the address code can still start from 0000h.however, when ea feet should be used to maintain the low level. when ea is high, the user 0fffh at 0000h to use internal rom, more than 0fffh, the singl
54、e-chip cpu automatic access to external program memory. single-chip data memory ram memory by reading and writing components. its maximum capacity can be expanded to 64k, used to store real-time input data. 8051 has 256 units within the internal data memory, one of 00h 7fh for internal random access
55、 memory ram, 80h ffh area dedicated registers. 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. since studying at the future directions of design systems and
56、 procedures will be frequently used them. 8051 internal data memory address 00h to ffh by a total of 256 bytes of address space, the space was divided into two parts, one of the internal data ram address 00h 7fh (that is, 0 127). the special function registers to do with the address 80h ffh. in this
57、 256-byte also has opened up a so-called digital address area, the region can not only byte addressable, but also by the bit (bit) addressable. for those required to carry out the operation of the data bit can be stored into the region. from 00h to 1fh arranged group of four working registers, each
58、occupied by 8-byte ram, recorded as r0 r7. whether the choice of which set of registers, from the aforementioned signs register in the selection of rs1 and rs0. add on at these two different binary number, you can choose different registers.special function register (sfr) address the range of 80h ffh. at mcs-51, in addition to program counter register pc and four job outside the region, and the remaining 21 special function registers in this block in sfr. are one of five double-byte register, and they take up a total of 26 bytes. special function registers of the symbols a
溫馨提示
- 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. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(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)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 管理咨詢服務(wù)合同模板
- 2025年嵌絲橡膠道口板合作協(xié)議書
- 2024年12月青少年機(jī)器人技術(shù)四級綜合試題(真題及答案)
- 2025年企業(yè)臨時工勞務(wù)合同常用版(4篇)
- 2025年五年級班主任年度個人工作總結(jié)樣本(二篇)
- 2025年二年級音樂教學(xué)總結(jié)樣本(三篇)
- 2025年個人房屋出租合同協(xié)議標(biāo)準(zhǔn)范文(2篇)
- 2025年九年級下學(xué)期化學(xué)教師工作總結(jié)參考(三篇)
- 2025年個人雇傭書面合同范文(2篇)
- 2025年產(chǎn)品購銷風(fēng)險合同(2篇)
- 王崧舟:學(xué)習(xí)任務(wù)群與課堂教學(xué)變革 2022版新課程標(biāo)準(zhǔn)解讀解析資料 57
- 招投標(biāo)現(xiàn)場項目經(jīng)理答辯(完整版)資料
- 運(yùn)動競賽學(xué)課件
- 重大事故隱患整改臺賬
- 2022年上海市初中畢業(yè)數(shù)學(xué)課程終結(jié)性評價指南
- DB15T 2058-2021 分梳綿羊毛標(biāo)準(zhǔn)
- 高考作文備考-議論文對比論證 課件14張
- 新華師大版七年級下冊初中數(shù)學(xué) 7.4 實(shí)踐與探索課時練(課后作業(yè)設(shè)計)
- 山東省萊陽市望嵐口礦區(qū)頁巖礦
- 《普通生物學(xué)教案》word版
- 安全生產(chǎn)應(yīng)知應(yīng)會培訓(xùn)課件
評論
0/150
提交評論