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

下載本文檔

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

文檔簡介

1、<p>  畢業(yè)設(shè)計(jì)(論文)外文資料翻譯</p><p>  學(xué) 部: </p><p>  專   業(yè): </p><p>  姓 名: </p><

2、;p>  學(xué) 號(hào): </p><p>  外文出處: </p><p>  附 件:1.外文資料翻譯譯文;2.外文原文。 </p><p>  完成日期: 201 年   月   日 </p><p

3、>  AT89C51的概況</p><p>  1 AT89C51應(yīng)用</p><p>  單片機(jī)廣泛應(yīng)用于商業(yè):諸如調(diào)制解調(diào)器,電動(dòng)機(jī)控制系統(tǒng),空調(diào)控制系統(tǒng),汽車發(fā)動(dòng)機(jī)和其他一些領(lǐng)域。這些單片機(jī)的高速處理速度和增強(qiáng)型外圍設(shè)備集合使得它們適合于這種高速事件應(yīng)用場合。然而,這些關(guān)鍵應(yīng)用領(lǐng)域也要求這些單片機(jī)高度可靠。健壯的測試環(huán)境和用于驗(yàn)證這些無論在元部件層次還是系統(tǒng)級(jí)別的單片機(jī)的合適的

4、工具環(huán)境保證了高可靠性和低市場風(fēng)險(xiǎn)。Intel 平臺(tái)工程部門開發(fā)了一種面向?qū)ο蟮挠糜隍?yàn)證它的AT89C51 汽車單片機(jī)多線性測試環(huán)境。這種環(huán)境的目標(biāo)不僅是為AT89C51 汽車單片機(jī)提供一種健壯測試環(huán)境,而且開發(fā)一種能夠容易擴(kuò)展并重復(fù)用來驗(yàn)證其他幾種將來的單片機(jī)。開發(fā)的這種環(huán)境連接了AT89C51。本文討論了這種測試環(huán)境的設(shè)計(jì)和原理,它的和各種硬件、軟件環(huán)境部件的交互性,以及如何使用AT89C51。</p><p&g

5、t;<b>  1.1 介紹</b></p><p>  8 位AT89C51 CHMOS 工藝單片機(jī)被設(shè)計(jì)用于處理高速計(jì)算和快速輸入/輸出。MCS51 單片機(jī)典型的應(yīng)用是高速事件控制系統(tǒng)。商業(yè)應(yīng)用包括調(diào)制解調(diào)器,電動(dòng)機(jī)控制系統(tǒng),打印機(jī),影印機(jī),空調(diào)控制系統(tǒng),磁盤驅(qū)動(dòng)器和醫(yī)療設(shè)備。汽車工業(yè)把MCS51 單片機(jī)用于發(fā)動(dòng)機(jī)控制系統(tǒng),懸掛系統(tǒng)和反鎖制動(dòng)系統(tǒng)。AT89C51 尤其很好適用于得益于它的

6、處理速度和增強(qiáng)型片上外圍功能集,諸如:汽車動(dòng)力控制,車輛動(dòng)態(tài)懸掛,反鎖制動(dòng)和穩(wěn)定性控制應(yīng)用。由于這些決定性應(yīng)用,市場需要一種可靠的具有低干擾潛伏響應(yīng)的費(fèi)用-效能控制器,服務(wù)大量時(shí)間和事件驅(qū)動(dòng)的在實(shí)時(shí)應(yīng)用需要的集成外圍的能力,具有在單一程序包中高出平均處理功率的中央處理器。擁有操作不可預(yù)測的設(shè)備的經(jīng)濟(jì)和法律風(fēng)險(xiǎn)是很高的。一旦進(jìn)入市場,尤其任務(wù)決定性應(yīng)用諸如自動(dòng)駕駛儀或反鎖制動(dòng)系統(tǒng),錯(cuò)誤將是財(cái)力上所禁止的。重新設(shè)計(jì)的費(fèi)用可以高達(dá)500K 美

7、元,如果產(chǎn)品族享有同樣內(nèi)核或外圍設(shè)計(jì)缺陷的話,費(fèi)用會(huì)更高。另外,部件的替代品領(lǐng)域是極其昂貴的,因?yàn)樵O(shè)備要用來把模塊典型地焊接成一個(gè)總體的價(jià)值比各個(gè)部件高幾倍。為了緩和這些問題,在最壞的環(huán)境和電壓條件下對這些單片機(jī)進(jìn)行無論在部</p><p>  1.2 AT89C51提供以下標(biāo)準(zhǔn)功能:</p><p>  4k 字節(jié)FLASH 閃速存儲(chǔ)器,128 字節(jié)內(nèi)部RAM,32 個(gè)I/O 口線,2

8、個(gè)16 位定時(shí)/計(jì)數(shù)器,一個(gè)5 向量兩級(jí)中斷結(jié)構(gòu),一個(gè)全雙工串行通信口,片內(nèi)振蕩器及時(shí)鐘電路。同時(shí),AT89C51 降至0Hz 的靜態(tài)邏輯操作,并支持兩種可選的節(jié)電工作模式??臻e方式體制CPU 的工作,但允許RAM,定時(shí)/計(jì)數(shù)器,串行通信口及中斷系統(tǒng)繼續(xù)工作。掉電方式保存RAM 中的內(nèi)容,但振蕩器體制工作并禁止其他所有不見工作直到下一個(gè)硬件復(fù)位。</p><p><b>  1.3引腳功能說明</

9、b></p><p><b>  ·Vcc:電源電壓</b></p><p><b>  ·GND:地</b></p><p>  ·P0 口:P0 口是一組8 位漏極開路型雙向I/O 口,也即地址/數(shù)據(jù)總線復(fù)用。作為輸出口用時(shí),每位能吸收電流的方式驅(qū)動(dòng)8 個(gè)TTL 邏輯門電路,對端口寫

10、“1”可作為高阻抗輸入端用。在訪問外部數(shù)據(jù)存儲(chǔ)器或程序存儲(chǔ)器時(shí),這組口線分時(shí)轉(zhuǎn)換地址(低8 位)和數(shù)據(jù)總線復(fù)用,在訪問期間激活內(nèi)部上拉電阻。在Flash 編程時(shí),P0 口接受指令字節(jié),而在程序校驗(yàn)時(shí),輸出指令字節(jié),校驗(yàn)時(shí),要求外接上拉電阻。</p><p>  ·P1 口:P1 是一個(gè)帶內(nèi)部上拉電阻的8 位雙向I/O 口,P1 的輸出緩沖級(jí)可驅(qū)動(dòng)(吸收或輸出電流)4 個(gè)TTL 邏輯門電路。對端口寫“1”

11、,通過內(nèi)部的上拉電阻把端口拉到高電平,此時(shí)可作輸入口。作為輸入口使用時(shí),因?yàn)閮?nèi)部存在上拉電阻,某個(gè)引腳被外部信號(hào)拉低時(shí)會(huì)輸出一個(gè)電流(IIL)。Flash 編程和程序校驗(yàn)期間,P1 接受低8 位地址。</p><p>  ·P2 口:P2 是一個(gè)帶有內(nèi)部上拉電阻的8 位雙向I/O 口,P2 的輸出緩沖級(jí)可驅(qū)動(dòng)(吸收或輸出電流)4 個(gè)TTL 邏輯門電路。對端口寫“1”,通過內(nèi)部的上拉電阻把端口拉到高電平,

12、此時(shí)可作輸入口。作為輸入口使用時(shí),因?yàn)閮?nèi)部存在上拉電阻,某個(gè)引腳被外部信號(hào)拉低時(shí)會(huì)輸出一個(gè)電流(IIL)。在訪問外部程序存儲(chǔ)器或16 位四肢的外部數(shù)據(jù)存儲(chǔ)器(例如執(zhí)行MOVX @DPTR指令)時(shí),P2 口送出高8 位地址數(shù)據(jù),在訪問8 位地址的外部數(shù)據(jù)存儲(chǔ)器(例如執(zhí)行MOVX @ RI 指令)時(shí),P2 口線上的內(nèi)容(也即特殊功能寄存器(SFR)區(qū)中R2 寄存器的內(nèi)容),在整個(gè)訪問期間不改變。Flash 編程和程序校驗(yàn)時(shí),P2 也接收高位

13、地址和其他控制信號(hào)。</p><p>  ·P3 口:P3 是一個(gè)帶有內(nèi)部上拉電阻的8 位雙向I/O 口,P3 的輸出緩沖級(jí)可驅(qū)動(dòng)(吸收或輸出電流)4 個(gè)TTL 邏輯門電路。對端口寫“1”,通過內(nèi)部的上拉電阻把端口拉到高電平,此時(shí)可作輸入口。作為輸入口使用時(shí),因?yàn)閮?nèi)部存在上拉電阻,某個(gè)引腳被外部信號(hào)拉低時(shí)會(huì)輸出一個(gè)電流(IIL)。P3 口還接收一些用于Flash 閃速存儲(chǔ)器編程和程序校驗(yàn)的控制信號(hào)。&l

14、t;/p><p>  ·RST:復(fù)位輸入。當(dāng)振蕩器工作時(shí),RST 引腳出現(xiàn)兩個(gè)機(jī)器周期以上高電平將使單片機(jī)復(fù)位。</p><p>  ·ALE/PROG:當(dāng)訪問外部程序存儲(chǔ)器或數(shù)據(jù)存儲(chǔ)器時(shí),ALE(地址鎖存允許)輸出脈沖用于鎖存地址的低8 位字節(jié)。即使不訪問外部存儲(chǔ)器,ALE 仍以時(shí)鐘振蕩頻率的1/6 輸出固定的正脈沖信號(hào),因此它可對外輸出時(shí)鐘或用于定時(shí)目的。要注意的是,每

15、當(dāng)訪問外部數(shù)據(jù)存儲(chǔ)器時(shí)將跳過一個(gè)ALE 脈沖。對Flash 存儲(chǔ)器編程期間,該引腳還用于輸入編程脈沖(PROG)。如有必要,可通過對特殊功能寄存器(SFR)區(qū)中的8EH 單元D0 位置位,可禁止ALE 操作。該位置位后,只有一條MOVX 和MOVC 指令A(yù)LE 才會(huì)被激活。此外,該引腳會(huì)被微弱拉高,單片機(jī)執(zhí)行外部程序時(shí),應(yīng)設(shè)置ALE 無效。</p><p>  ·PSEN:程序存儲(chǔ)允許輸出是外部程序存儲(chǔ)

16、器的讀選通型號(hào),當(dāng)89C51 由外部存儲(chǔ)器取指令(或數(shù)據(jù))時(shí),每個(gè)機(jī)器周期兩次PSEN 有效,即輸出兩個(gè)脈沖。在此期間,當(dāng)訪問外部數(shù)據(jù)存儲(chǔ)器,這兩次有效的PSEN 信號(hào)不出現(xiàn)。</p><p>  ·EA/VPP:外部訪問允許。欲使CPU 僅訪問外部程序存儲(chǔ)器(地址為</p><p>  0000H—FFFFH),EA 端必須保持低電平(接地)。需注意的是:如果加密位LB1 被編

17、程,復(fù)位時(shí)內(nèi)部會(huì)鎖存EA 端狀態(tài)。如EA 端為高電平(接Vcc 端),CPU 則執(zhí)行內(nèi)部程序存儲(chǔ)器中的指令。Flash 存儲(chǔ)器編程時(shí),該引腳加上+12v 的編程允許電源Vpp,當(dāng)然這必須是該器件使用12v 編程電壓Vpp。</p><p>  ·XTAL1:振蕩器反相放大器及內(nèi)部時(shí)鐘發(fā)生器的輸入端。</p><p>  ·XTAL2:振蕩器反相放大器的輸出端。89C51

18、 中有一個(gè)用于構(gòu)成內(nèi)部振蕩器的高增益反相放大器,引腳XTAL1 和XTAL2分別是該放大器的輸入端和輸出端。這個(gè)放大器與作為反饋元件的片外石英晶體或陶瓷諧振器一起構(gòu)成自激振蕩器,振蕩電路參見圖5。外接石英晶體或陶瓷諧振器及電容C1、C2 接在放大器的反饋回路中構(gòu)成并聯(lián)振蕩電路。對電容C1、C2 雖沒有十分嚴(yán)格的要求,但電容容量的大小會(huì)輕微影響振蕩頻率的高低、振蕩器工作的穩(wěn)定性、起振的難易程度及溫度穩(wěn)定性,如果使用石英晶體,我們推薦電容使

19、用30Pf±10 Pf,而如使用陶瓷諧振器建議選擇40Pf±10Pf。用戶也可以采用外部時(shí)鐘。這種情況下,外部時(shí)鐘脈沖接到XTAL1 端,即內(nèi)部時(shí)鐘發(fā)生器的輸入端XTAL2 則懸空。</p><p><b>  ·掉電模式:</b></p><p>  在掉電模式下,振蕩器停止工作,進(jìn)入掉電模式的指令是最后一條被執(zhí)行的指令,片內(nèi)RAM 和

20、特殊功能寄存器的內(nèi)容在終止掉電模式前被凍結(jié)。推出掉電模式的唯一方法是硬件復(fù)位,復(fù)位后將重新定義全部特殊功能寄存器但不改變RAM 中的內(nèi)容,在Vcc 恢復(fù)到正常工作電平前,復(fù)位應(yīng)無效,且必須保持一定時(shí)間以使振蕩器重啟動(dòng)并穩(wěn)定工作。89C51 的程序存儲(chǔ)器陣列是采用字節(jié)寫入方式編程的,每次寫入一個(gè)字符,要對整個(gè)芯片的EPROM 程序存儲(chǔ)器寫入一個(gè)非空字節(jié),必須使用片擦除的方法將整個(gè)存儲(chǔ)器的內(nèi)容清楚。</p><p>

21、<b>  2 編程方法</b></p><p>  編程前,設(shè)置好地址、數(shù)據(jù)及控制信號(hào),編程單元的地址加在P1 口和P2 口的P2.0—P2.3(11 位地址范圍為0000H——0FFFH),數(shù)據(jù)從P0口輸入,引腳P2.6、P2.7 和P3.6、P3.7 的電平設(shè)置見表6,PSEB 為低電平,RST保持高電平,EA/Vpp 引腳是編程電源的輸入端,按要求加上編程電壓,ALE/PROG引腳輸

22、入編程脈沖(負(fù)脈沖)。編程時(shí),可采用4—20MHz 的時(shí)鐘振蕩器,89C51 編程方法如下:在地址線上加上要編程單元的地址信號(hào)在數(shù)據(jù)線上加上要寫入的數(shù)據(jù)字節(jié)。激活相應(yīng)的控制信號(hào)。在高電壓編程方式時(shí),將EA/Vpp 端加上+12v 編程電壓。每對Flash 存儲(chǔ)陣列寫入一個(gè)字節(jié)或每寫入一個(gè)程序加密位,加上一個(gè)ALE/PROG 編程脈沖。改變編程單元的地址和寫入的數(shù)據(jù),重復(fù)1—5 步驟,知道全部文件編程結(jié)束。每個(gè)字節(jié)寫入周期是自身定時(shí)的,通

23、常約為1.5ms。·數(shù)據(jù)查詢89C51 單片機(jī)用數(shù)據(jù)查詢方式來檢測一個(gè)寫周期是否結(jié)束,在一個(gè)寫周期中,如需要讀取最后寫入的那個(gè)字節(jié),則讀出的數(shù)據(jù)的最高位(P0.7)是原來寫入字節(jié)的最高位的反碼。寫周期開始后,可在任意時(shí)刻</p><p>  2.1Ready/Busy:</p><p>  字節(jié)編程的進(jìn)度可通過Ready/Busy 輸出信號(hào)檢測,編程期間,ALE 變?yōu)楦唠娖健癏”

24、后P3.4(Ready/Busy)端被拉低,表示正在編程狀態(tài)(忙狀態(tài))。編程完成后,P3.4 變?yōu)楦唠娖奖硎緶?zhǔn)備就緒狀態(tài)。</p><p>  ·程序校驗(yàn):如果加密位LB、LB2 沒有進(jìn)行編程,則代碼數(shù)據(jù)可通過地址和數(shù)據(jù)線讀回原編寫的數(shù)據(jù),采用下圖的電路,程序存儲(chǔ)器的地址由P1 口和P2 口的P2.0—P2.3 輸入,數(shù)據(jù)由P0 口讀出,P206、P2.7 和P3.6、P3.7 的控制信號(hào)見表6,PSE

25、N 保持低電平,ALE、EA 和RST 保持高電平。校驗(yàn)時(shí),P0 口必須接上10k 左右的上拉電阻。</p><p><b>  2.2芯片擦除:</b></p><p>  利用控制信號(hào)的正確組合(表6)并保持ALE/PROG 引腳10ms 的低電平脈沖寬度即可將EPROM 陣列(4k 字節(jié))和三個(gè)加密位整片擦除,代碼陣列在片擦除操作中將任何非空單元寫入”1”,這步

26、驟需在編程之前進(jìn)行。</p><p>  2.3讀片內(nèi)簽名字節(jié):</p><p>  89C51 單片機(jī)內(nèi)有3 個(gè)簽名字節(jié),地址為030H、031H 和032H。于聲明該器件的廠商、號(hào)和編程電壓。讀簽名字節(jié)的過程和單元030H、031H 和032H的正常校驗(yàn)相仿,只需要將P3.6 和P3.7 保持低電平,返回值意義如下:</p><p>  (030H) = 1EH

27、 聲明產(chǎn)品由ATMEL 公司制造。</p><p>  (031H) = 51H 聲明為89C51 單片機(jī)。</p><p>  (032H) = FFH 聲明為12V 編程電壓。</p><p>  (032H) = 05H 聲明為5 編程電壓。</p><p><b>  2.4 編程接口:</b></p>

28、;<p>  采用控制信號(hào)的正確組合可對Flash 閃速存儲(chǔ)陣列中的每一代碼字節(jié)進(jìn)行寫入和存儲(chǔ)器的整片擦除,寫操作周期是自身定時(shí)的,初始化后它將自動(dòng)定時(shí)到操作完成。微機(jī)接口實(shí)現(xiàn)兩種信息形式的交換。在計(jì)算機(jī)之外,由電子系統(tǒng)所處理的信息以一種物理信號(hào)形式存在,但在程序中,它是用數(shù)字表示的。任一接口的功能都可分為以某種形式進(jìn)行數(shù)據(jù)庫變換的一些操作,所以外部和內(nèi)部形式的轉(zhuǎn)換是由許多步驟完成的。模擬-數(shù)字轉(zhuǎn)換器(ADC)用來將連續(xù)變

29、化信號(hào)變成相應(yīng)的數(shù)字量,這數(shù)字量可是可能性的二進(jìn)制數(shù)值中的一固定值。如果傳感器輸出不是連續(xù)變化的,就不需模擬-數(shù)字轉(zhuǎn)換。這種情況下,信號(hào)調(diào)理單元必須將輸入信號(hào)變換成為另一信號(hào),也可直接與接口的下一部分,即微計(jì)算機(jī)本身的輸入輸出單元相連接。輸出接口采用相似的形式,明顯的差別在于信息流的方向相反;是從程序到外部世界。這種情況下,程序可稱為輸出程序,它監(jiān)督接口的操作并完成數(shù)字-模擬轉(zhuǎn)換器(DAC)所需數(shù)字的標(biāo)定。該子程序依次送出信息給輸出器件

30、,產(chǎn)生相應(yīng)的電信號(hào),由DAC 轉(zhuǎn)換成模擬形式。最后,信號(hào)經(jīng)調(diào)理(通常是放大)以形成適應(yīng)于執(zhí)行器操作的形式。在微機(jī)電路中使用的信號(hào)幾乎總是太小而不能被</p><p>  單片機(jī)可利用外圍設(shè)備中最基本的用于一般用途的I/O 接口,每個(gè)I/O 接口既可作為輸入端又可作為輸出端,每個(gè)I/O 接口的功能取決與程序初始化階段對數(shù)據(jù)方位寄存器相應(yīng)位進(jìn)行置一和清零操作,通過CPU 指令對數(shù)據(jù)寄存器相應(yīng)位進(jìn)行置一和清零來置一和清

31、零輸出端口,同樣輸入端口邏輯位也可以通過CPU 指令訪問。一些類型的串行口單元允許CPU 與外部設(shè)備進(jìn)行串口通信,用串口位代替平行位進(jìn)行通信需要少許的I/O 口,這樣使通信費(fèi)用降低但速度也相對慢些。串口傳送可以同步也可以異步。</p><p>  The General Situation of AT89C51</p><p>  Chapter 1 The application of

32、AT89C51</p><p>  Microcontrollers are used in a multitude of commercial applications such as modems, motor-control systems, air conditioner control systems, automotive engine and among others. The high proce

33、ssing speed and enhanced peripheral set of these microcontrollers make them suitable for such high-speed event-based applications. However, these critical application domains also require that these microcontrollers

34、 are highly reliable. The high reliability and low market risks can be ensured by a robust</p><p>  1.1 Introduction</p><p>  The 8-bit AT89C51 CHMOS microcontrollers are designed to handle high

35、-speed calculations and fast input/output operations. MCS 51 microcontrollers are typically used for high-speed event control systems. Commercial applications include modems, motor-control systems, printers, photocopiers

36、, air conditioner control systems, disk drives, and medical instruments. The automotive industry use MCS 51 microcontrollers in engine-control systems, airbags, suspension systems, and antilock braking systems (A</p&g

37、t;<p>  1.2 The AT89C51 provides the following standard features: </p><p>  4Kbytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bittimer/counters, a five vector two-level interrupt architecture,

38、a full duple serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The I

39、dle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt sys -tem to continue functioning. The Power-down Mode saves the RAM</p><p>  1-3Pin Description</p><p>  

40、VCC Supply voltage.</p><p>  GND Ground.</p><p>  Port 0:Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port

41、 0 pins, the pins can be used as high impedance inputs .Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pul

42、lups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pul</p><p>  Port 1:Port 1 is an 8-bit bi-directional I/O port with intern

43、al pullups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 1 pins that are externally

44、 being pulled low will source current (IIL) because of the internal pullups. Port 1 also receives the low-order address bytes during Flash programming and verification.</p><p>  Port 2:Port 2 is an 8-bit bi-

45、directional I/O port with internal pullups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,

46、 Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pullups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to Por

47、t 2 pins that are externally be</p><p>  Port 3:Port 3 is an 8-bit bi-directional I/O port with internal pull ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pin

48、s they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.</p><p>  Port 3 also se

49、rves the functions of various special feature soft the AT89C51 as listed below:</p><p>  RST:Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.</p>

50、;<p>  ALE/PROG:Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal op

51、eration ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory

52、. If desired, ALE operation can be disabled by setting bit 0 of SFR locati</p><p>  PSEN:Program Store Enable is the read strobe to external program memory. When theAT89C51 is executing code from external pr

53、ogram memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.</p><p>  EA/VPP:External Access Enable. EA must be strapped

54、to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should

55、be strapped to VCC for internal program executions. This pin all receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.</p><p>  XTAL1:Input to th

56、e inverting oscillator amplifier and input to the internal clock operating circuit.</p><p>  XTAL2:Output from the inverting oscillator amplifier. Oscillator CharacteristicsXTAL1 and XTAL2 are the input and

57、output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quarts crystal or ceramic resonator may be used. To drive the device from an extern

58、al clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal,</p><p>  Power-down Mode</p><

59、p>  In the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-d

60、own mode is terminated. The only exit from power-down is a hardware reset. Reset redefines the SFR but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating lev

61、el and must be held active long enough to allow the oscillator to r</p><p>  2 Programming Algorithm</p><p>  Before programming the AT89C51, the address, data and control signals should be set

62、up according to the Flash programming mode table and Figure 3 and Figure 4. To program the AT89C51, take the following steps.1. Input the desired memory location on the address lines.2. Input the appropriate data byte on

63、 the data lines. 3. Activate the correct combination of control signals. 4. Raise EA/VPP to 12V for the high-voltage programming mode. 5. Pulse ALE/PROG once to program a byte in the Flash array o</p><p>  2

64、.1Ready/Busy: </p><p>  The progress of byte programming can also be monitored by the RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high ag

65、ain when programming is done to indicate READY.</p><p>  Program Verify: </p><p>  If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address an

66、d data lines for verification. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled.</p><p>  2.2 Chip Erase: </p><p>

67、;  The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all “1”s. The chip erase operation must be execute

68、d before the code memory can be re-programmed.</p><p>  2.3 Reading the Signature Bytes:</p><p>  The signature bytes are read by the same procedure as a normal verification of locations 030H, 0

69、31H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned areas follows :</p><p>  (030H) = 1EH indicates manufactured by Atmel</p><p>  (031H) = 51H indicates

70、89C51</p><p>  (032H) = FFH indicates 12V programming</p><p>  (032H) = 05H indicates 5V programming</p><p>  2.4 Programming Interface</p><p>  Every code byte in the

71、Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is self timed and once initiated, will automatically time itself to complet

72、ion. A microcomputer interface converts information between two forms. Outside the microcomputer the information handled by an electronic system exists as a physical signal, but within the program, it is represented nume

73、rically. The function of any interfac</p><p>  The most basic form of peripheral available on microcontrollers is the general purpose I70 port. Each of the I/O pins can be used as either an input or an outpu

74、t. The function of each pin is determined by setting or clearing corresponding bits in a corresponding data direction register during the initialization stage of a program. Each output pin may be driven to either a logic

溫馨提示

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

評論

0/150

提交評論