CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

structure array size limit

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
eaton



Joined: 02 Oct 2004
Posts: 22
Location: cleveland

View user's profile Send private message Send e-mail

structure array size limit
PostPosted: Sun Aug 14, 2005 5:53 am     Reply with quote

Hello,
I have a structure that uses 18 bytes. I need an array of these. if the array size is greater than 14 it doesn't work. A 15 element array takes 270 bytes. 14 elements takes 252. Is there an 8-bit cut-off point in the size of a variable? Using compiler ver 3.169 and PIC18F252.

Thanks
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Sun Aug 14, 2005 8:19 am     Reply with quote

Read these for info on the problem that you are seeing and a possible work around:

http://www.ccsinfo.com/forum/viewtopic.php?t=21004&highlight=maximum+array+size

http://www.ccsinfo.com/forum/viewtopic.php?t=5598&highlight=maximum+array+size

Also:

It seems that the real problem is with bank addressing so indirect addressing should be okay. If you reserve that memory area and then assign a pointer to that location I believe that you might be able to access the data just fine. I'll let you be the one to try it out.
Ttelmah
Guest







PostPosted: Mon Aug 15, 2005 2:56 am     Reply with quote

There was a fix for this type of problem in 3.189. You may be able to bodge round it as Mark describes, but the current releases seem to handle larger sizes OK.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group