C51: VARIABLES IN LARGE AND COMPACT MEMORY MODEL DON'T WORK
Information in this article applies to:
I have a project using an 8051 with 32KB external RAM. If I use SMALL memory model with some variable explicitly defined to use external data memory like:
int xdata aaa;
everything complies OK and works fine. But, if I use compact or large memory model, my program complies ok but the board just won't work.
All the memory model option controls is the default location of variables declared without a memory specifier. Small memory model will put unspecified variables in DATA, Compact uses PDATA, and Large uses XDATA. If your hardware is having trouble with builds under other memory models, chances are the board is not set up properly to handle the accesses you're now performing.
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Sunday, September 10, 2000
of your data.