Is there any Memory Types available to access 2K Bytes On-Chip XRAM or How to access 2K Bytes On-Chip XRAM in ADuC 841. Note: i have used the this statement to access internal XRAM @Decl.c i have mapped all the registers related to ADuC 841 #define Internal_XRAM CFG841 = 0xFF; typedef unsigned char BYTE; extern BYTE data Table[1000]; @main.c #include "Decl.c" BYTE data Table[1000]; void main() { Internal_XRAM ; } error: DATA Segment too large
Look up the xdata keyword in the manual.
XDATA is for External Memory access
XDATA is for External Memory access Wrong. Look it up in the Manual.
This is often a matter of the utimate confusion (especially for beginners) In the olden days, when the king of diamonds were still a jack, the '51 had 128 bytes of DATA RAM and the '52 had 128 bytes of DATA RAM and 128 bytes of IDATA RAM. If that was not enough, you could connect an eXternal DATA SRAM. Thus XDATA. Developers heard our cries and added more on chip memory, but since the architecture had no addressing possible for more DATA or IDATA, they had to invent, here it comes, "internal external data RAM". Let me use the name EDATA for it (Extended). EDATA is implemented so that if a certain bit is (re)set in a given SFR XDATA (C) movx(asm) will access EDATA instead of generating the signals to access external data memory. Now, since this is a hardware issue, Keil does nothing to (re)set the memory selection bit. Thus, if you do not want the bit in the state described as the default in the chips datasheet, you must change it immediately after the label STARTUP1: in startup.a51 (use a renamed copy). Erik
"XDATA is for External Memory access" Remember that 'C' is case-sensitive; Stefan told you to look up the xdata (lowercase) keyword - XDATA (uppercase) could be something completely different (it is not a Keil keyword!)
BYTE data Table[1000];
DATA Segment too large
Rajkumar, Once enabled through the 841's config register, its internal XRAM is accessed (in C51) just as if it were external SRAM mapped to xdata.
Are you actually using the ADuC841 in a product? Last time I checked the 841 anamoly list, the device did not look very useful or robust. I've been sticking with the 831. The only benefit I saw with the 841 was the reduced number of clocks per instruction.