通信工程專業(yè)英語論文.doc
《通信工程專業(yè)英語論文.doc》由會員分享,可在線閱讀,更多相關《通信工程專業(yè)英語論文.doc(36頁珍藏版)》請在裝配圖網上搜索。
The General Situation of AT89C51 The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash Programmable and Erasable Read Only Memory (PEROM) and 128 bytes RAM. The device is manufactured using Atmel’s high density nonvolatile memory technology and is compatible with the industry standard MCS-51? instruction set and pin out. The chip combines a versatile 8-bit CPU with Flash on a monolithic chip; the Atmel AT89C51 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. Features: ? Compatible with MCS-51? Products ? 4K Bytes of In-System Reprogrammable Flash Memory ? Endurance: 1,000 Write/Erase Cycles ? Fully Static Operation: 0 Hz to 24 MHz ? Three-Level Program Memory Lock ? 128 x 8-Bit Internal RAM ? 32 Programmable I/O Lines ? Two 16-Bit Timer/Counters ? Six Interrupt Sources ? Programmable Serial Channel ? Low Power Idle and Power Down Modes The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex 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 Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power Down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset. Block Diagram Pin Description: VCC Supply voltage. GND Ground. Port 0:Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. (Sink/flow) 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 pull-ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull-ups are required during program verification. Port 1:Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification. Port 2:Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application it uses strong internal pull-ups when emitting 1s. During accesses to external data memories that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3:Port 3 is an 8-bit bidirectional 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 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C51 as listed below: Port pin alternate functions P3.0 rxd (serial input port) P3.1 txd (serial output port) P3.2 ^int0 (external interrupt0) P3.3 ^int1 (external interrupt1) P3.4 t0 (timer0 external input) P3.5 t1 (timer1 external input) P3.6 ^WR (external data memory write strobe) P3.7 ^rd (external data memory read strobe) Port 3 also receives some control signals for Flash programming and verification. RST:Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. 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 operation 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. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN:Program Store Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP:External Access Enable. EA must be strapped 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(LB1) is programmed, EA will be internally latched (fasten with a latch) on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage(VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1:Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2:Output from the inverting oscillator amplifier. Oscillator Characteristics:XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external 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, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low times specifications must be observed. Idle Mode:In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory. Status of External Pins During Idle and Power Down Modes mode Program memory ALE ^psen Port0 Port1 Port2 Port3 idle internal 1 1 data data data Data Idle External 1 1 float Data data Data Power down Internal 0 0 Data Data Data Data Power down External 0 0 float data Data data Power Down Mode 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 down mode is terminated. The only exit from power down is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize. Program Memory Lock Bits On the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below: Lock Bit Protection Modes Program lock bits Protection type Lb1 Lb2 Lb3 1 U U U No program lock features 2 P U U Movc instructions executed from external program memory are disable from fetching code bytes from internal memory, ^ea is sampled and latched on reset, and further programming of the flash disabled 3 P P U Same as mode 2, also verify is disable. 4 P P P Same as mode 3, also external execution is disabled. When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly. Programming the Flash:The AT89C51 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH) and ready to be programmed. The programming interface accepts either a high-voltage (12-volt) or a low-voltage (VCC) program enable signal. The low voltage programming mode provides a convenient way to program the AT89C51 inside the user’s system, while the high-voltage programming mode is compatible with conventional third party Flash or EPROM programmers. The AT89C51 is shipped with either the high-voltage or low-voltage programming mode enabled. The respective top-side marking and device signature codes are listed in the following table. Vpp=12v Vpp=5v Top-side mark AT89C51 xxxx yyww AT89C51 xxxx-5 yyww signature (030H)=1EH (031H)=51H (032H)=FFH (030H)=1EH (031H)=51H (032H)=05H The AT89C51 code memory array is programmed byte-bybyte in either programming mode. To program any nonblank byte in the on-chip Flash Programmable and Erasable Read Only Memory, the entire memory must be erased using the Chip Erase Mode. Programming Algorithm: Before programming the AT89C51, the address, data and control signals should be set up according to the Flash programming mode table and Figures 3 and 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 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 or the lock bits. The byte-write cycle is self-timed and typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached. Data Polling: The AT89C51 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written datum on PO.7. Once the write cycle has been completed, true data are valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated. Ready/Busy: 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 again when programming is done to indicate READY. Program Verify: If lock bits LB1 and LB2 have not been programmed, the programmed code data can be read back via the address and 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. Chip Erase: The entire Flash Programmable and Erasable Read Only Memory 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 executed before the code memory can be re-programmed. Reading the Signature Bytes: The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned are as follows. (030H) = 1EH indicates manufactured by Atmel (031H) = 51H indicates 89C51 (032H) = FFH indicates 12V programming (032H) = 05H indicates 5V programming Programming Interface Every code byte in the 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 selftimed and once initiated, will automatically time itself to completion. AT89C51的概況 AT89C51是美國ATMEL公司生產的低電壓,高性能CMOS8位單片機,片內含4Kbytes的快速可擦寫的只讀程序存儲器(PEROM)和128 bytes 的隨機存取數(shù)據(jù)存儲器(RAM),器件采用ATMEL公司的高密度、非易失性存儲技術生產,兼容標準MCS-51產品指令系統(tǒng),片內置通用8位中央處理器(CPU)和flish存儲單元,功能強大AT89C51單片機可為您提供許多高性價比的應用場合,可靈活應用于各種控制領域。 主要性能參數(shù): 與MCS-51產品指令系統(tǒng)完全兼容 4K字節(jié)可重復寫flash閃速存儲器 1000次擦寫周期 全靜態(tài)操作:0HZ-24MHZ 三級加密程序存儲器 128*8字節(jié)內部RAM 32個可編程I/O口 2個16位定時/計數(shù)器 6個中斷源 可編程串行UART通道 低功耗空閑和掉電模式 功能特性概述 AT89C51提供以下標準功能:4K 字節(jié)flish閃速存儲器,128字節(jié)內部RAM,32個I/O口線,兩個16位定時/計數(shù)器,一個5向量兩級中斷結構,一個全雙工串行通信口,片內振蕩器及時鐘電路。同時,AT89C51可降至0HZ的靜態(tài)邏輯操作,并支持兩種軟件可選的節(jié)電工作模式??臻e方式停止CPU的工作,但允許RAM,定時/計數(shù)器,串行通信口及中斷系統(tǒng)繼續(xù)工作。掉電方式保存RAM中的內容,但振蕩器停止工作并禁止其它所有部件工作直到下一個硬件復位。 引腳功能說明 Vcc:電源電壓 GND:地 P0口:P0口是一組8位漏極開路型雙向I/O口,也即地址/數(shù)據(jù)總線復位口。作為輸出口用時,每位能吸收電流的方式驅動8個邏輯門電路,對端口寫“1”可 作為高阻抗輸入端用。 在訪問外部數(shù)據(jù)存儲器或程序存儲器時,這組口線分時轉換地址(低8位)和數(shù)據(jù)總線復用,在訪問期間激活內部上拉電阻。 P1口:P1是一個帶內部上拉電阻的8位雙向I/O口,P1的輸出緩沖級可驅動(吸收或輸出電流)4個TTL邏輯門電路。對端口寫“1”,通過內部的上拉電阻把端口拉到高電平,此時可做熟出口。做輸出口使用時,因為內部存在上拉電阻,某個引腳被外部信號拉低時會輸出一個電流(Iil). Flash編程和程序校驗期間,P1接受低8位地址。 P2口:P2是一個帶有內部上拉電阻的8位雙向I/O口,P2的輸出緩沖級可驅動(吸收或輸出電流)4個TTL邏輯門電路。對端口寫“1”,通過內部地山拉電阻把端口拉到高電平,此時可作為輸出口,作輸出口使用時,因為內部存在上拉電阻,某個引腳被外部信號拉低時會輸出一個電流(Iil)。 在訪問外部程序存儲器獲16位地址的外部數(shù)據(jù)存儲器(例如執(zhí)行 MOVX @DPTR指令)時,P2口送出高8位地址數(shù)據(jù)。在訪問8位地址的外部數(shù)據(jù)存儲器(如執(zhí)行 MOVX @RI指令)時,P2口線上的內容(也即特殊功能寄存器(SFR)區(qū)中R2寄存器的內容),在整個訪問期間不改變。 Flash編程或校驗時,P2亦接受高地址和其它控制信號。 P3口:P3口是一組帶有內部上拉電阻的8位雙向I/O口。P3口輸出緩沖級可驅動(吸收或輸出電流)4個TTL邏輯門電路。對P3口寫入“1”時,他們被內部上拉電阻拉高并可作為輸出口。做輸出端時,被外部拉低的P3口將用上拉電阻輸出電流(Iil)。P3口除了作為一般的I/O口線外,更重要的用途是它的第二功能,如下表所示: 端口引腳 第二功能 P3.0 rxd (串行輸入口) P3.1 txd (串行輸出口) P3.2 ^int0 (外中斷0) P3.3 ^int1 (外中斷1) P3.4 t0 (定時/計數(shù)器0) P3.5 t1 (定時/計數(shù)器1) P3.6 ^WR (外部數(shù)據(jù)存儲器寫選通) P3.7 ^RD (外部數(shù)據(jù)存儲器讀選通) P3口還接收一些用于flash閃速存儲器編程和程序校驗的控制信號。 RST:復位輸入。當振蕩器工作時,RST引腳出現(xiàn)兩個機器周期以上高電平將使單片機復位。 ALE/PROG:當訪問外部程序存儲器或數(shù)據(jù)存儲器時,ALE(地址所存允許)輸出脈沖用于所存地址的低8位字節(jié)。即使不訪問外部存儲器,ALE仍以時鐘振蕩頻率的1/6輸出固定的正脈沖信號,因此它可對外輸出時鐘或用于定時目的。要注意的是:每當訪問外部數(shù)據(jù)存儲器時將跳過一個ALE脈沖。 對flash存儲器編程期間,該引腳還用于輸入編程脈沖(^PROG)。 如有不要,可通過對特殊功能寄存器(SFR)區(qū)中的8EH單元的D0位置位,可禁止ALE操作。該外置位后,只要一條MOVX和MOVC指令ALE才會被激活。此外,該引腳會被微弱拉高,單片機執(zhí)行外部程序時,應設置ALE無效。 PSEN:程序存儲允許(^PSEN)輸出是外部程序存儲器的讀選通信號,當AT89C51由外部程序存儲器取指令(或數(shù)據(jù))時,每個機器周期兩個^PSEN有效,即輸出兩個脈沖。在此期間,當訪問外部數(shù)據(jù)存儲器,這兩次有效的^PSEN信號不出現(xiàn)。 EA/VPP:外部訪問允許。欲使CPU僅訪問外部程序存儲器(地址為0000H---FFFFH),EA端必須保持低電平(接地)。需注意的是; 如果加密位LB1被編程,復位時內部會鎖存EA端狀態(tài)。 如 EA端為高電平(接VCC端),CPU則執(zhí)行內部程序存儲器中的指令。 Flash存儲器編程時,該引腳加上+12V的編程允許電源VPP,當然這必須是該器件是使用12V編程電壓VPP. XTAL1: 振蕩器反相放大器的及內部時鐘發(fā)生器的輸出端。 XTAL2: 振蕩器反相放大器的輸出端。 時鐘振蕩器:AT89C51中有一個用于構成內部振蕩器的高增益反相放大器,引腳XTAL1和XTAL2分別是該放大器的輸入端和輸出端。這個放大器與作為反饋的片外石英晶體或陶瓷諧振器一起構成自激振蕩器,振蕩電路參見圖5。 外接石英晶體(或陶瓷諧振器)及電容C1、C2接在放大器的反饋回路中構成并聯(lián)振蕩電路。對外接電容C1、C2雖然沒有十分嚴格的要求,但電容容量的大小會輕微影響振蕩頻率的高低、振蕩器的穩(wěn)定性、起振的難易程度及溫度穩(wěn)定性,如果使用石英晶體,我們推薦電容使用30PF+10PF,而如使用陶瓷諧振器建議選擇40PF+10PF。 用戶也可以采用外部時鐘。采用外部時鐘的電路如圖5右所示。這種情況下,外部時鐘脈沖接到XTAL1端,即內部時鐘發(fā)生器的輸入端,XTAL2則懸空 由于外部時鐘信號是通過一個2分頻觸發(fā)器后作為內部時鐘信號的,所以對外部時鐘信號的占空比沒有特殊要求,但最小高電平持續(xù)時間和最大的低電平持續(xù)時間應符合產品技術要求。 空閑模式:在空閑工作模式狀態(tài),CPU保持睡眠狀態(tài)而所有片內的外設仍保持激活狀態(tài),這種方式由軟件產生。此時,片內RAM和所有特殊功能寄存器的內容保持不變??臻e模式可由任何允許的中斷請求或硬件復位終止。 終止空閑工作模式的方法有兩種,其一是任何一條被允許中斷的事件被激活,即可終止空閑工作模式。程序會首先響應中斷,進入中斷服務程序,執(zhí)行完中斷服務程序并僅隨終端返回指令,下一條要執(zhí)行的指令就是使單片機進入空閑模式那條指令后面的一條指令。其二是通過硬件復位也可將空閑工作模式終止,需要注意的是,當由硬件復位來終止空閑模式時,CPU通常是從激活空閑模式那條指令的下一條指令開始繼續(xù)執(zhí)行程序的,要完成內部復位操作,硬件復位脈沖要保持兩個機器周期(24個時鐘周期)有效,在這種情況下,內部禁止CPU訪問片內RAM,而允許訪問其它端口。為了避免可能對端口產生以外寫入,激活空閑模式的那條指令后一條指令不應該是一條對端口或外部存儲器的寫入指令。 空閑和掉電模式外部引腳狀態(tài) 模式 程序存儲器 ALE ^PSEN PORT0 PORT1 PORT2 PORT3 空閑模式 內部 1 1 數(shù)據(jù) 數(shù)據(jù) 數(shù)據(jù) 數(shù)據(jù) 空閑模式 外部 1 1 浮空 數(shù)據(jù) 數(shù)據(jù) 數(shù)據(jù) 掉電模式 內部 0 0 數(shù)據(jù) 數(shù)據(jù) 數(shù)據(jù) 數(shù)據(jù) 掉電模式 外部 0 0 浮空 數(shù)據(jù) 數(shù)據(jù) 數(shù)據(jù) 掉電模式 在掉電模式下,震蕩器停止工作,進入掉電模式的指令是最后一條被執(zhí)行的指令,片內RAM和特殊功能寄存器的內容在終止掉電模式前被凍結。退出掉電模式的唯一方法是硬件復位,復位后將重新定義全部特殊功能寄存器但不改變RAM中的內容,在VCC恢復到正常工作電平前,復位應無效,且必須保持一定時間以使振蕩器重啟動并穩(wěn)定工作。 程序存儲器的加密 :AT89C51可使用對芯片上的3個加密位進行編程(P)或不編程(U)來得到如下表所示的功能: 加密位保護功能表 程序加密位 保護類型 LB1 LB2 LB3 1 U U U 沒有程序保護功能 2 P U U 禁止從外部程序存儲器中執(zhí)行MOVC指令讀取內部程序存儲器的內容 3 P P U 除上表功能外,還禁止程序校驗 4 P P P 除以上功能外,同時禁止外部執(zhí)行 當加密位LB1被編程時,在復位期間,EA端的邏輯電平被采樣并鎖存,如果單片機上電后一直沒有復位,則鎖存起的初始值是一個隨機數(shù),且這個隨機數(shù)會一直保持到真正復位為止。為使單片機能正常工作,被鎖存的EA電平值必須與該引腳當前的邏輯電平一致。此外,加密位只能通過整片擦除的方法清除。 FLASH閃速存儲器的編程:AT89C51單片機內部有4K字節(jié)的FLASH PEROM,這個FLASH存儲陣列出廠時已處于擦除狀態(tài)(即所有存儲單元的內容均為FFH),用戶隨時可對其進行編程。編程接口可接收高電平(+12V)或低電平(VCC)的允許編程信號,低電平編程模式適合于用戶再線編程系統(tǒng),而高電平編程模式可與通用EPROM編程器兼容。 AT89C51單片機中,有些屬于低電壓編程方式,而有些則是高電平編程方式,用戶可從芯片上的型號和讀取芯片內的簽名字節(jié)獲得該信息,見下表。 Vpp=12v Vpp=5v 芯片頂面標識 AT89C51 xxxx yyww AT89C51 xxxx-5 yyww 簽名字節(jié) (030H)=1EH (031H)=51H (032H)=FFH (030H)=1EH (031H)=51H (032H)=05H AT89C51的程序存儲器陣列是采用字節(jié)寫入方式編程的,每次寫入一個字節(jié),要對整個芯片內的PEROM程序存儲器寫入一個非空字節(jié),必須使用片擦除的方式將整個存儲器的內容清除。 編程方法:編程前,需按表1、圖3和圖4所示設置好地址,數(shù)據(jù)及控制信號, AT89C51編程方法如下: 1.在地址線上加上要編程單元的地址信號。 2.在數(shù)據(jù)線上加上要寫入的數(shù)據(jù)字節(jié)。 3.激活相應的控制信號。 4.在高電壓編程方式時,將^EA/VPP端加上+12V編程電壓。 5.每對FLASH存儲陣列寫入一個字節(jié)或每寫入一個程序加密位,加上一個ALE/^PROG編程脈沖,改變編程單元的地址和寫入的數(shù)據(jù),重復1—5步驟,直到全部文件編程結束。每個字節(jié)寫入周期是自身定時地,通常約為1.5ms。 數(shù)據(jù)查詢:AT89C51單片機用數(shù)據(jù)查詢方式來檢測一個寫周期是否結束,在一個寫周期中,如需要讀取最后寫入的那個字節(jié),則讀出的數(shù)據(jù)的最高位(P0.7)是原來寫入字節(jié)最高位的反碼。寫周期完成后,有效的數(shù)據(jù)就會出現(xiàn)在所有輸出端上,此時,可進入下一個字節(jié)的寫周期,寫周期開始后,可在任意時刻進行數(shù)據(jù)查詢。 READY/^BUSY:字節(jié)編程的進度可通過“RDY/^BSY”輸出信號監(jiān)測,編程期間,ALE變?yōu)楦唠娖健癏”后P3.4(RDY/^BSY)端電平被拉低,表示正在編程狀態(tài)(忙狀態(tài))。編程完成后,P3.4變?yōu)楦唠娖奖硎緶蕚渚途w狀態(tài)。 程序校驗:如果加密位LB1、LB2沒有進行編程,則代碼數(shù)據(jù)可通過地址和數(shù)據(jù)線讀回原編寫的數(shù)據(jù)。加密位不可能直接變化。證實加密位的完成通過觀察它們的特點和能力。 芯片擦除:利用控制信號的正確組合(表1)并保持ALE/^PROG引腳10ms的低電平脈沖寬度即可將PEROM陣列(4k字節(jié))整片擦除,代碼陣列在擦除操作中將任何非空單元寫入“1”,這步驟需要再編程之前進行。 讀片內簽名字節(jié):AT89C51單片機內有3個簽名字節(jié),地址為030H、031H和032H。用于聲明該器件的廠商、型號和編程電壓。讀簽名字節(jié)的過程和單元030H、031H和032H的正常校驗相仿,只需將P3.6和P3.7保持低電平,返回值意義如下: (030H)=1EH聲明產品由ATMEL公司制造。 (031H)=51H聲明為AT89C51單片機。 (032H)=FFH聲明為12V編程電壓。 (032H)=05H聲明為5V編程電壓。 編程接口:采用控制信號的正確組合可對FLASH閃速存儲陣列中的每一代碼字節(jié)進行寫入和存儲器的整片擦除,寫操作周期是自身定時的,初始化后它將自動定時到操作完成。 英文原文 Description The at89s52 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash Programmable and Erasable Read Only Memory (PEROM) and 128 bytes RAM. The device is manufactured using Atmel’s high density nonvolatile memory technology and is compatible with the industry standard MCS-51? instruction set and pinout. The chip combines a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel at89s52 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. Features: ? Compatible with MCS-51? Products ? 4K Bytes of In-System Reprogrammable Flash Memory ? Endurance: 1,000 Write/Erase Cycles ? Fully Static Operation: 0 Hz to 24 MHz ? Three-Level Program Memory Lock ? 128 x 8-Bit Internal RAM ? 32 Programmable I/O Lines ? Two 16-Bit Timer/Counters ? Six Interrupt Sources ? Programmable Serial Channel ? Low Power Idle and Power Down Modes The at89s52 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the at89s52 is des- 配套講稿:
如PPT文件的首頁顯示word圖標,表示該PPT已包含配套word講稿。雙擊word圖標可打開word文檔。
- 特殊限制:
部分文檔作品中含有的國旗、國徽等圖片,僅作為作品整體效果示例展示,禁止商用。設計者僅對作品中獨創(chuàng)性部分享有著作權。
- 關 鍵 詞:
- 通信工程 專業(yè) 英語論文
裝配圖網所有資源均是用戶自行上傳分享,僅供網友學習交流,未經上傳用戶書面授權,請勿作他用。
鏈接地址:http://www.820124.com/p-5401205.html