Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need hlp in Keil uVision... ?

Status
Not open for further replies.

abdalla

Member level 4
Joined
Mar 22, 2006
Messages
79
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,802
Hi

i want to store a table of data in specific address location ?

so whn i burn my microcontroller the table is stored on the memory..

Note : __at keyword doesn`t support initlization so u must make initilize function in the main ...but i don`t like so...as i want to store my data on memory directly..........CAN u HLP



thx..?
 

This will store the data in the code space...

code unsigned char crcTable[] = {
0x00, 0x2f, 0x5e, 0x71, 0xbc, 0x93, 0xe2, 0xcd,
0x57, 0x78, 0x09, 0x26, 0xeb, 0xc4, 0xb5, 0x9a,
0xae, 0x81, 0xf0, 0xdf, 0x12, 0x3d, 0x4c, 0x63};

This will store the data in the external ram...
xdata unsigned char crcTable[] = {
0x00, 0x2f, 0x5e, 0x71, 0xbc, 0x93, 0xe2, 0xcd,
0x57, 0x78, 0x09, 0x26, 0xeb, 0xc4, 0xb5, 0x9a,
0xae, 0x81, 0xf0, 0xdf, 0x12, 0x3d, 0x4c, 0x63};

Does that help?
 

thx for ur reply


but it give me error
Main.c(4): error: #65: expected a ";"

it seems not to accept it as Token PLUS u didn`t specify the location ??
 

u don't need to know the location, u can use pointer to do it.

eq:

unsigned char crcTable[] = {0x00,0x2f,0x5e,0x71,0xbc, 0x93, 0xe2, 0xcd, 0x57, 0x78, 0x09, 0x26, 0xeb, 0xc4, 0xb5, 0x9a, 0xae, 0x81, 0xf0, 0xdf, 0x12, 0x3d, 0x4c, 0x63};
unsigned char *p;
to access the crcTable u can use pointer to do it.

p=crcTable;
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top