【正文】
and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillat or amplifier. Special Function Registers A map of the onchip memory area called the Special Function Register (SFR) space is shown in Table 1. Note that not all of the addresses are occupied, and unoccupied addresses may not be implemented on the chip. Read accesses to these addresses will in general return random data, and write accesses will have an indeterminate effect. User software should not write 1s to these unlisted locations, since they may be used in future products to invoke new features. In that case, the reset or inactive values of the new bits will always be 0. Interrupt Registers The individual interrupt enable bits are in the IE register. Two priorities can be set for each of the five interrupt sources in the IP register. Data Memory The AT89C51 implements 256 bytes of onchip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. That means the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper128 bytes of RAM or the SFR space. Instructions that use direct addressing access SFR space. For example, the following direct addressing instruction accesses the 5 SFR at location 0A0H (which is P2). MOV 0A0H, data Instructions that use indirect addressing access the upper 128 bytes of RAM. For example, the following indirect addressing instruction, where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H). MOV R0, data Note that stack operations are examples of indirect addressing, so the upper 128 bytes of data RAM are available as stack space. Timer 0 and 1 Timer 0 and Timer 1 is a 16bit Timer/Counter AT89C51 (8 位微控制單片機(jī),片內(nèi)含 4K BYTES 可反復(fù)擦寫(xiě)存儲(chǔ)器 ) 主要性能參數(shù): 。 2 個(gè) 16 位定時(shí) /計(jì)數(shù)器 。 引腳功能說(shuō)明: 。 P1口: P1是一個(gè)帶內(nèi)部上拉電阻的 8位雙向 I/O口, P1的 輸出緩沖級(jí)可驅(qū)動(dòng)(吸收或輸出電流) 4個(gè) TTL邏輯門(mén)電路。 FLASH編程或校驗(yàn)時(shí), P2接受高位地址和一些控制器。 RST: 復(fù)位輸入。該位置位后,只有一條 MOVX和 MOVC指令才能將 ALE激活。需要注意的是:如果加密位 LB1被編程,復(fù)位時(shí)內(nèi)部會(huì)鎖存 EA端狀態(tài)。特殊 功能寄存器: 在 AT89C51片內(nèi)存儲(chǔ)器中, 80HFFH共 128個(gè)單元為特殊功能寄存器( SFE), SFR的地址空間映象如表 2所示。 當(dāng)一條指令訪問(wèn) 7EH以上的內(nèi)部地址單元時(shí),指令中使用的尋址方式不同的,也即尋址方 9 式?jīng)Q定是訪問(wèn)高 128字節(jié) RAM還是訪問(wèn)特殊功能