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?
 

What king of microcontroller are you using ? What compiler are you using ?
 

maybe u declare this array in RAM ....
 

uC is PIC 16F877A
and CCS C compiler

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

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
 

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.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…