Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

initializing long array in memory

Status
Not open for further replies.

heybib

Newbie level 2
Joined
Aug 24, 2007
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,294
i 've to initialize an array of size 128 of long data type. i m getting an error of "dat item too big". with[/code]long a[128]; how to declare the array?
 

elec4fun

Full Member level 3
Joined
Jan 24, 2005
Messages
159
Helped
38
Reputation
76
Reaction score
31
Trophy points
1,308
Location
Nice, France
Activity points
897
What king of microcontroller are you using ? What compiler are you using ?
 

syrax

Full Member level 3
Joined
Sep 15, 2005
Messages
183
Helped
11
Reputation
22
Reaction score
3
Trophy points
1,298
Activity points
2,620
maybe u declare this array in RAM ....
 

heybib

Newbie level 2
Joined
Aug 24, 2007
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,294
uC is PIC 16F877A
and CCS C compiler

ya, the array is initilaizing in RAM but the RAM has limited capacity, i think
 

syrax

Full Member level 3
Joined
Sep 15, 2005
Messages
183
Helped
11
Reputation
22
Reaction score
3
Trophy points
1,298
Activity points
2,620
i use atmel MCU's and when declare long arrays i ise code memory becouse RAM is only 256 byte and when the array is bigger that RAM u may will have problems

try to declare in code memory
 

elec4fun

Full Member level 3
Joined
Jan 24, 2005
Messages
159
Helped
38
Reputation
76
Reaction score
31
Trophy points
1,308
Location
Nice, France
Activity points
897
Reading the datasheet, we can find that this µC has 368 bytes of RAM....So your 128x4 bytes doesn't fit in the RAM....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top