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

storing massive amount of data

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








storing massive amount of data
PostPosted: Wed Nov 23, 2005 11:00 am     Reply with quote

hi,

my code needs to access big size arrays, say one of them has nearly 700 elements, which are used to plot some graphics on LCD. I am finding trouble storing them coz' I am defining these arrays as constant which means they are stored in flash memory ( I am using 18f) but at the mean time I am running out of rom!

I am considering taking these big arrays out of rom and store them somewhere else. I considered eeprom but speed is demanding for the code which means refleshing the LCD with different bit maps in a high speed. Storing in eeprom would mean loading from eeprom which reduces the speed.

Any good thoughts at all?
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Wed Nov 23, 2005 11:37 am     Reply with quote

How many bytes do you need to store? How large is your code without the Arrays? What chip are you using?

Log into the forum.
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Nov 23, 2005 1:26 pm     Reply with quote

Check out thread http://www.ccsinfo.com/forum/viewtopic.php?p=51453&highlight=#51453 It starts on a differenr topic, but at the end a few mass-storeage methods are discussed.

Last edited by kender on Fri May 19, 2006 3:20 am; edited 1 time in total
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Nov 23, 2005 6:05 pm     Reply with quote

If you have exhausted the choice of 18F PICs (such as those with 256K program memory) you might want to look at MMC/SD. This gives you access to several GB per card. Because you do not need PC compatibility (do not need FAT file system), reading and writing is straight forward and at high speed.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
ye



Joined: 11 May 2005
Posts: 57
Location: london

View user's profile Send private message

PostPosted: Thu Nov 24, 2005 3:49 am     Reply with quote

Sorry neutone, now I log on.

I am using 18f8722 and so far I've used 60% of rom. I've roughly estimated that without all the constant arrays, there will be a reduction of nearly 20% - 25% of the entire rom space.



asmallri, I did think about MMC and actually I have some modules of code implementing MMC in hand. However the problem is not about the size of external memory, it's about the speed of loading and saving instead.

As I stressed all these templates are used as bit maps on LCD which means the speed is pretty critical.

I don't know in which way I could store these big arrays while keeping a good speed......

Cheers
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Nov 24, 2005 9:33 am     Reply with quote

ye wrote:

asmallri, I did think about MMC and actually I have some modules of code implementing MMC in hand. However the problem is not about the size of external memory, it's about the speed of loading and saving instead.

As I stressed all these templates are used as bit maps on LCD which means the speed is pretty critical.

I don't know in which way I could store these big arrays while keeping a good speed......

Cheers


A typical SD will run with a SPI bus speed of 25MHz, a typical MMC will run with a 20MHz SPI bus. Current generation SD and MMC cards are 10 to 50 times faster than the original cards, however, even at the speed of the original product you will not notice the affect of access speed as the LCD refresh rate will be slower than the rate you can access data.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
ye



Joined: 11 May 2005
Posts: 57
Location: london

View user's profile Send private message

PostPosted: Thu Nov 24, 2005 9:51 am     Reply with quote

what about storing them in internal rom using #rom or external eeprom, considering the speed again?
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Nov 24, 2005 3:10 pm     Reply with quote

Retrieval is much faster than storage for all these technologies.

internal rom and internal EEPROM are the fastest and are effectively equal in speed.

Other methods are slower because of the media access mechanisms and bus access speeds. For example, if you are using an external EEPROM with 1 400K I2C bus then your access speed is limited principly by the bus. A 24LCxx at 1M I2C bus will be ten times slower than a 25LCxx with a 10M SPI bus.

For an equal bus speed, an EEPROM will be faster than a SD Card.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Mark



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

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

PostPosted: Thu Nov 24, 2005 10:48 pm     Reply with quote

ye wrote:
what about storing them in internal rom using #rom or external eeprom, considering the speed again?


I thought you said you were storing them in rom now.
ye



Joined: 11 May 2005
Posts: 57
Location: london

View user's profile Send private message

PostPosted: Fri Nov 25, 2005 4:41 am     Reply with quote

Thank you guys, I think I have got the answers to this problem which has been haunting me for long.

All the best
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