hi to use on chip xram of my p87c51RD+. I have made following changes in my code which are recomended here. http://www.keil.com/support/docs/1758.htm but my code stuck on this loop.
IDATALOOP: MOV @R0,A DJNZ R0,IDATALOOP
hi, Maybe you should use MOVX instead MOV and DPTR instead R0. http://www.8052.com/forum/read.phtml?id=80001 Regards, Oleg
Hi Farhan, I am a little unclear as to what your problem(s) is/are. If you know that you are getting stuck on the loop to clear IDATA, I am suprised as this is tried and tested code and you will not get stuck in an infinite loop even if you start with R0 set to 00h, then why not just set :- IDATALEN EQU 00H so this code is not included so you can see if your code gets past this point? If you ar using the PHILIPS P87c51rd+ then I hope you have not copied verbatim what is shown in "1758.htm" as this quite clearly relates to a diffent chip, so for you chip you should have :- XDATASTART EQU 00000H XDATALEN EQU 0300H to clear the onchip EXTRAM which according to the data sheet is enabled by default. Also you should not include (if you have added it) this line :- ANL 0B1h, #01h show in the keil app note. Alternativly if you want to disable the internal EXTRAM then you should include the following line:- ORL 08Eh, #02h which will set the EXTRAM bit within the AUXR register.