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

Memory - variables - matrix

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



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

Memory - variables - matrix
PostPosted: Thu Jun 02, 2011 11:19 pm     Reply with quote

Hi
I want to have a big matrix in internal nonvolatile memory. boolean v[240][128].
How can I make the access very simple?
Also I want a big float vector of 1000 length.
Is there any way to use them as v[][] and f[] and specify the memory from the beginning ?:-?:D
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Fri Jun 03, 2011 2:10 am     Reply with quote

You don't say what chip?.
For the float, provided you are talking a modern chip, with enough memory, the compiler should be quite happy to have a const array this size.
For Boolean, there is a problem. The compiler _does not support_ arrays of boolean values (in the manual). You'd probably have to generate your own macro to take the two address values, and do the accesses into an int array, and then the required bit in this.

Best Wishes
noyz



Joined: 31 Jan 2009
Posts: 59

View user's profile Send private message

PostPosted: Sat Jun 04, 2011 11:42 pm     Reply with quote

PIC 18 F 8527
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