I am using P89V51RD2 and I want a description about the memory models. I want to use the whole 1KB RAM of the controller. I tried to search for the memory model, but was confused by the data given on the page below.
www.esacademy.com/.../c02.htm
It says that you can only access 256 bytes of RAM even though you use LARGE model. Can anyone figure it out?
You might find this tutorial more helpful:
www.8052.com/tutmemor.phtml
It does make the common mistake of implying that "CODE" is synonymous with "ROM", and "XDATA" is synonymous with "RAM". (In the vast majority of cases, CODE space will, in fact, contain ROM and XDATA will, in fact, contain RAM - but there is absolutely nothing in the architecture that requires this).
It also doesn't mention the possiblity of on-chip XDATA.
"I am using P89V51RD2 and I want a description about the memory models."
For definitive details about any product, always start with the product's own manuals:
http://www.keil.com/support/man/docs/c51/c51_le_memmodels.htm
http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm
"confused by the data given on the page below."
Well, that diagram certainly looks confusing - misleading, even!
For a start, it's not to scale. It also doesn't make clear which address spaces are distinct - like CODE and XDATA - and which physically overlap - like XDATA and PDATA, or DATA, the Register Banks, and the lower end of IDATA.
Again, you'd probably be better to go back to the original source documents - the so-called "bible" for the 8051:
Chapter 1 - 80C51 Family Architecture: www.nxp.com/.../80C51_FAM_ARCH_1.pdf
Chapter 2 - 80C51 Family Programmer’s Guide and Instruction Set: www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf
Chapter 3 - 80C51 Family Hardware Description: www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf
You might find that Figure 2 on p2 and Figures 6-8 on p3 of Chapter 1 give a better illustration of the memory spaces...
"It says that you can only access 256 bytes of RAM even though you use LARGE model."
I hope it doesn't actually say that - because that is complete nonsense!
View all questions in Keil forum