导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→COME,ON!

* 34392: 救命!!关于AT89C2051的P1口的用法!!??

   xiao_die 
xiao_die发表的帖子 

 COME,ON!
Restrictions on Certain Instructions
The AT89C2051 and is an economical and cost-effective member of Atmel’s growing family of microcontrollers. It contains 2K bytes of flash program memory. It is fully com-patible with the MCS-51 architecture, and can be programmed using the MCS-51 instruction set. However,there are a few considerations one must keep in mind when utilizing certain instructions to program this device.
  All the instructions related to jumping or branching should be restricted such that the destination address falls within the physical program memory space of the device, which is 2K for the AT89C2051. This should be the responsibility of the software programmer. For example, LJMP 7E0H would be a valid instruction for the T89C2051 (with 2K of memory), whereas LJMP 900H would not.
1. Branching instructions:
LCALL, LJMP, ACALL, AJMP, SJMP, JMP @A+DPTR
  These unconditional branching instructions will execute correctly as long as the programmer keeps in mind that the destination branching address must fall within the physical boundaries of the program memory size (locations 00H to 7FFH for the 89C2051). Violating the physical space limits may cause unknown program behavior.
CJNE [...], DJNZ [...], JB, JNB, JC, JNC, JBC, JZ, JNZ With these conditional branching instructions the same rule above applies. Again, violating the memory boundaries
may cause erratic execution.
For applications involving interrupts the normal interrupt service routine address locations of the 80C51 family archi-tecture have been preserved.
2. MOVX-related instructions, Data Memory:
  The AT89C2051 contains 128 bytes of internal data mem-ory.Thus, in the AT89C2051 the stack depth is limited to 128 bytes, the amount of available RAM. External DATA memory access is not supported in this device, nor is exter-nal
PROGRAM memory execution. Therefore, no MOVX [...] instructions should be included in the program. A typical 80C51 assembler will still assemble instructions,
even if they are written in violation of the restrictions men-tioned above. It is the responsibility of the controller user to know the physical features and limitations of the device being used and adjust the ins t ructions used correspondingly.


发表时间:2003年6月14日14:39:42

  
回复该帖

本主题共有 13 帖,分页:>>>>>该主题的所有内容[13]条

 *树形目录 只列出部分跟帖的标题以及简单的摘要信息 该主题的部分跟帖如下:

  34394.[详细]谢谢!你在那里找到的?
摘要:你用过双串口的MCU吗?你有这方面的资料吗?我现在急需!谢谢你!、......(63字)
- [alvinyang][1269次] 2003年6月14日

  34398.[详细]没有用过,你去www.21ic.com看看!
摘要:我目前只知道W77E58,DS80C320有双串口!......(37字)
- [xiao_die][1258次] 2003年6月14日

[上一篇帖子]:IIC 存储卡,但比24c0X系列卡的加密性能好,有取代24c0X系列的趋势。它是西门子产
[下一篇帖子]:AT89C2051没有P2和P0口!Port 3   Port