Keil Logo

Memory Classes and Layout

Memory Classes and Layout introduces the different memory types used to programming the 8051 microcontroller and variants. Memory classes identify distinct physical memory regions, which can be represented in a memory layout. Physical memory regions in an A51 system include:

Program Memory: in the classic 8051, this is a 64KB space called CODE. Typically, this region is a ROM space that used for the program code and constants. With the BL51, the physical program code memory can be expanded to 32 code banks with 64KB each. Constants are fetched with the MOVC instruction. In extended 8051 variants, program memory can have a size of up to 16MB called ECODE and HCONST.

Internal Data Memory: in the classic 8051, this is the on-chip RAM space with a maximum of 256 Bytes containing register banks, BIT space, direct addressable DATA space, and indirect addressable IDATA space. This region should be used for frequently used variables. In the NXP 80C51MX, this space is expanded to up to 64KB with an EDATA space.

External Data Memory: in classic 8051 devices, this area, called XDATA, is off-chip RAM with a space of up to 64KB. However, several new 8051 devices have additional on-chip RAM that is mapped into the XDATA space. Usually, this additional on-chip RAM has to be enabled via dedicated SFRs. In extended variants, external data memory of up to 16MB, called HDATA, might be available.

The memory classes and layout of several variants are described in:

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.