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
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