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, Would anyone please advise me the steps as how to configure the settings [startup.a51]?? so that program can access or allocate XDATA varibales in 32K memory size?? Thanking you in advance. Cheers, Simon
Thanks for your reply. My test program works with internal ERAM 768 bytes, like XRAM. When I install 32K RAM board, and with xdata variable declared to a larger size, it is not working. I have studied the data sheet and it says that AUXR register is required to set to 0x03 to enable 1. ALE active with MOVX or MOVC instruction [AO=1] 2. to enable external data memory access [EXTRAM=1] As there are a number of things I have to check, such as the memory board...etc., I would appreciate very much of your advice on whether the AURX=0x03 is set/ declared in the main program or in the startup.a51 file so that I can focus on trouble shooting other possibilites. Thank you very much for your time and advice. Simon
I didn't notice that you had specified the derivative in the subject line. Unfortunately I don't know anything about this derivative, maybe someone else can answer your question. It's a good idea to include all the pertinent information in the body of the message. Stefan
Hi Stefan, Thanks for your reply. I'll work on it and see how it will come out. Your advice is appreciated. Simon
I use that chip a lot. Your setting of AUXR is correct. If you have any PDATA or XDATA variables that are initialized at compile time (have values prior to executing Main), you need to set AUXR in STARTUP.A51. Do it immediately after the label "STARTUP1:". STARTUP calls C_Start to initialize variables after clearing RAM. Thus, it needs to have AUXR set correctly or internal RAM will be used for the first 256/768 (RC2/RD2) bytes of XDATA. Also, be careful with P2. If you use PDATA make sure it points to the correct page for your data. Just a final note. I always add the following:
sfr CKCON = 0x8F; // Clock control register
Hi Bob, I am so glad to receive your reply and thank you so much for your kind advice. It saved me a lot of time....and now I can go to enjoy a cup of coffee. Thanks again and have a nice day. Cheers, Simon