ARM Technical Support Knowledge Articles

HOW TO USE 256 BYTES DATA SPACE

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I have an 8051 device that has 256 bytes DATA RAM, but it appears that I can only access the first 128 bytes. How can I enable the remaining memory?

ANSWER

The 8051 architecture differs between DATA and IDATA. When a device has 256 bytes on-chip RAM space, the first 128 bytes can be only accessed in DATA space whereas the entire 256 bytes space can be accessed as IDATA.

In the C compiler you must define variables that should be placed above the 128 bytes limit using the idata memory type.

Example:

unsigned char idata uc;  // variable in IDATA can be located above 0x80

MORE INFORMATION

SEE ALSO

Article last edited on: 2006-11-15 17:56:24

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential