cancel
Showing results for 
Search instead for 
Did you mean: 

Access DDC SRAM space ?

babidesai123
Associate II
Posted on March 30, 2004 at 11:12

Access DDC SRAM space ?

4 REPLIES 4
babidesai123
Associate II
Posted on May 17, 2011 at 11:59

Hello,

Can anyone tell me ,how to access the SRAM reserved for DDC application ( 0xff00 to 0xffff) if we re not using the DDC chanel.

I tried to specify in KEIL the XRAM space 0xff00 to 0xffff . but it's showing : '' xadat memory range out of bounds.''

In our application, we are short of variables. , so wee wants to put the large queue in this memory spavce.

Purvi
sjo
Associate II
Posted on May 17, 2011 at 11:59

Personally I set pdata base for 0xFF00 (BL51 Locate tab) then declare the memory using:

pdata int var;

You could also use the xdata _at_ decalaration.

Regards

sjo
babidesai123
Associate II
Posted on May 17, 2011 at 11:59

hello,

thanks for the reply. I tried that way..but i am not able to read the data back (what i am stroing at power on)

it's not able to read that location

eg:

BL51 locate: pdata: 0xff00

pdata char var-extra3;

var_extar3=0x33;

put_char_q_tx(var_extar3);

sjo
Associate II
Posted on May 17, 2011 at 11:59

You are right, I have just realised the upsd unlike other 8032 based devices does not have a xram page register, so pdata will not work.

The only other solution is to make sure the xdata you are declaring is in another xram segment, this can be done by declaring the xdata in another file, use data via extern.

The keil linker tries to allocate all variables in the same xram segment, this causes problems when you have 2 xram areas.

Also remember to enable the ddc xram:

MOV A, #60H ; enable DDC XRAM

MOV DDCCON, A

in your startup file is enough.

and the checkbox ''Use On-chip xram ...'' is enabled.

Regards

sjo