Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Question answered in tutorial/FAQs

???
10/27/01 20:07
Read: times


 
#16089 - RE: Using first 256 bytes of RAM with 8052
Ah, yes. A classic question that every 8051/52 programmer initially encounters.

The 8052 has multiple, independent address spaces, without overlap. The tutorial mentioned ealier refers to three memory spaces. Actually, there are even more. The following Keil application note is a good starting place.
http://www.keil.com/appnotes/files/apnt_101.pdf

CODE: 64K-bytes in size and is separate from data (the 8051 is "Harvard architecture" processor meaning that code and data are separate).

DATA: 128 bytes of RAM inside the processor, located at addresses 0 to 0x7F.

SFR: Potentially 128 bytes of addressable registers that control various on-chip peripherals, depending on which particular 8051 variant you are using. Not all locations may physically exist, only those controlling a peripheral. Located at address 0x80 to 0xFF.

IDATA: Indirectly addressed data. Available only on 8052-style architectures, not on 8051s. Indirect addressing is required to access the upper 128 bytes of RAM inside the processor because these RAM locations occupy the same addresses as the directly-addressed SFR registers. IDATA covers all RAM locations from 0 to 0xFF but is required to access RAM locations 0x80 to 0xFF. Why this hassle? Well, as with most Intel architectures, the 8052 evolved from a previous, successful architecture. IDATA allowed Intel to stuff another 128 bytes into the 8051 architecture without destroying the instruction set.

XDATA: eXternal DATA. This memory space allows you to access up to 64K-bytes of "external" RAM. I purposely put double-quotes around external because the XDATA RAM can also reside on-chip, but not physically part of the 8051/52. Triscend E5 devices are a classic example with up to 64k-bytes of RAM on chip. XDATA address space does not overlap any of the others. As an aside, you can actually address up to 16M-bytes of XDATA RAM using a Triscend E5. Some would be on-chip, the remainder accessed off-chip using data mappers to perform data banking. The E5's data mappers convert the 8051/52's 16-bit address into a 32-bit physical address.

PDATA: A way to access XDATA and 256 pages of 256 bytes each. I'm not going into much detail on purpose.

Once you get past this initial "mystery", the 8051 is actually a fairly simple beast to program.


List of 10 messages in thread
TopicAuthorDate
Using first 256 bytes of RAM with 8052            01/01/70 00:00      
   The 8052. Any documents and tutorial ?            01/01/70 00:00      
      RE: The 8052. Any documents and tutorial ?            01/01/70 00:00      
RE: Using first 256 bytes of RAM with 8052            01/01/70 00:00      
RE: Using first 256 bytes of RAM with 8052            01/01/70 00:00      
RE: Using first 256 bytes of RAM with 8052            01/01/70 00:00      
RE: Using first 256 bytes of RAM with 8052            01/01/70 00:00      
RE: Using first 256 bytes of RAM with 8052            01/01/70 00:00      
RE: Using first 256 bytes of RAM with 8052            01/01/70 00:00      
RE: Using first 256 bytes of RAM with 8052            01/01/70 00:00      

Back to Subject List