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.
Hi people, I've some troubles with some variables declaration. I'm using the old Keil compîler C51 V5.50. When writing :
U8 u8CommandIndex=0;
xdata U8 u8CommandIndex=0;
yes, I've set the end of XDATA as follow :
XDATALEN EQU 0F00H ; the length of XDATA memory in bytes. ; 8Kb = 1F00H ; 4Kb = 0F00H
IF XDATALEN <> 0 MOV DPTR,#XDATASTART MOV R7,#LOW (XDATALEN) IF (LOW (XDATALEN)) <> 0 MOV R6,#(HIGH XDATALEN) +1 ELSE MOV R6,#HIGH (XDATALEN) ENDIF CLR A XDATALOOP: MOVX @DPTR,A INC DPTR DJNZ R7,XDATALOOP DJNZ R6,XDATALOOP ENDIF
You need to modify startup so that the bits in the SFR are set for internal XRAM before the XDATA clear takes place. Erik
Exactly as Eric suggests! The XRAM on the 66x devices is NOT enabled by default. You must turn this memory on before you begin using it. Refer to the following knowledgebase article: http://www.keil.com/support/docs/1978.htm Jon
"The XRAM on the 66x devices is NOT enabled by default. You must turn this memory on before you begin using it." As I've said before: the Compiler & Linker setup options (usually) simply inform the tools about your target; they do not generate any code which may be necessary to configure the hardware - you have to write that yourself!! http://www.keil.com/forum/docs/thread2252.asp