We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using AT89C5131 uC with hardwaired external 32K RAM from address 0x0000 to 0x07fff. I am able to read/write OnChip 1K RAM and External connected RAM by toggling EXTRAM Bit in AUXR register.
I wanted to declare huge amount of varaiables in both the RAMs for my static arrays by using -at- keyword. How can I do this in ERAM?
Why do you want to use the _at_ keyword?
Why don't you just leave allocating the addresses to the tools - especially if you have a "huge amount" of variables?!
I wanted to declare huge amount of varaiables in both the RAMs you have two choices 1) let the 1k be the permanent 'bottom' of the RAM 2) have a separate routine read_internal_ram()
Erik
3) Use XDATA banking?
Why do you want to use the _at_ keyword? I do (by other means) when using SILabs chips.
This allow 'sorting' of variables so that the most frequently accessed ones are in the faster internal RAM.
However, instead of using the _at_, which ever so easily lead to errors (overlap), what I do is to declare all RAM in an assembler module and have a .h module with all the extenals decalrations to it.
Basically I am planning to use both ERAM (1K) and External RAM (32K)for static dynamically change Que algorithams, and also in my program two interrupt ISR will access RAM locations on address bases.
Like data (for Direct Memory), xdata(External Memory) keil may be having keyword to access ERAM.
I don't know. Keil Guru's please help me??
The question was why do you specifically want to use _at_, rather than let the tools do the locating?
"Like data (for Direct Memory), xdata(External Memory) keil may be having keyword to access ERAM."
"XDATA" should not be thought of as "External Memory". Yes, that's how the term originated way back with the first Intel 8051 - when it always was literally external to the chip - but many modern derivatives have on-chip XRAM.
Instead, just think of "XDATA" as "memory accessed with the MOVX instruction"
"ERAM" is probably just a name for "On-chip XRAM" - check the Datasheet
Steve; I'm not familar with your device and it's addressing modes. If you are accessing the memory with instructions that will decode to the MOVX instruction, I suggest that you look at the absolute accessing macros defined in the absacc.h include file. Search the User's Guide for absacc.h. Bradford