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 CCS Technical Support

3-d array

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







3-d array
PostPosted: Wed Jan 12, 2005 5:21 pm     Reply with quote

javascript:emoticon('Question')
Question
Why is it that I can only declare:
byte const SAMPLE [4][8][8]= {elements}; and not:
byte const SAMPLE [5][8][8]= {more elements};
can CCS only handle so much?
Thanks.
rianna
Guest







3-d array
PostPosted: Wed Jan 12, 2005 5:27 pm     Reply with quote

Because 8*8*4 = 256. You can only fit about this much in some ROM banks (const?)
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

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

Re: 3-d array
PostPosted: Wed Jan 12, 2005 8:22 pm     Reply with quote

guest wrote:
javascript:emoticon('Question')
Question
Why is it that I can only declare:
byte const SAMPLE [4][8][8]= {elements}; and not:
byte const SAMPLE [5][8][8]= {more elements};
can CCS only handle so much?
Thanks.


Which PIC?

What was the error you got?

PIC16s can't have a constant structure bigger than 256. PIC16s don't have table read/write, so it's done by adding a value to the PC. Well, you can only add 256 bytes to the PC so that's your limit.

PS - it is these kind of limitations that the PIC18 do not have.
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