Hello everybody!. I programming in ASM51 in Keil tool with LX51. I have some problems with understanding memory model on C8051F00x device. If not difficult to prompt me: 1.I understand that CODE and XDATA memory space share the same memory space (0x0000 - 0x7FFF for C8051F005).Please explain me. Yes or no?? 2.I have problem with locate my static variable in XDATA memory. Ex:
XD_VARs SEGMENT XDATA AT 4000h rseg XD_VARs test_var : db 0x00,0x00
after build i get a variable placing in CODE memory segment(C:004000h) and readable by movc A,@A+DPTR instruction, when i try to read this variable by movx instr. i get some value locating in XDATA memory segment (at X:004000h). I also try to use absolute segment XSEG but this led to same results, and i not understand: if CODE and XDATA share same memory space, as one and the same address can be different values. How locate variable in XDATA space. Value i memory space i can see in memory window in Keil tool. 3.I understand that this is a problem is LX51. how to explain to him where some memory is ??.
Thank you for any help.
Thanks for help. I understand where i mistake. If I'm wrong correct me: DATA and IDATA space it's internal RAM memory with address from 0x0 to 0x7F upper 128bytes it'a : direct aces - SFR, indirect free memory to use(example for STACK). XDATA space it's internal additional RAM memory with adders from 0x0 to 0x7FF (2K) it's volatile memory for temporary storage, also this and previous type of memory should be initialized manual from my program and can not initialized during programming.In this memory type i only can reserve some space for use in the future. CODE it's ROM and FLASH memory with address from 0x0000 to 0x7FFF(32K) it's non volatile memory for program code storage and constant variable. I think the post is over.