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

memory usage

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



Joined: 11 May 2007
Posts: 57
Location: Montreal,Canada

View user's profile Send private message

memory usage
PostPosted: Sat Oct 09, 2010 7:58 am     Reply with quote

Say I am printing on a 4x20 LCD, to fill up the screen with datum I do this:
Code:
sprintf(cBuf,"All of line one data",var,var,...);
lcd_puts(cBuf);
sprintf(cBuf,"All of line two data",var,var,...);
lcd_puts(cBuf);
sprintf(cBuf,"All of line three data",var,var,...);
lcd_puts(cBuf);
sprintf(cBuf,"All of line four data",var,var,...);
lcd_puts(cBuf);

would it be better to use a different buffer for each line:

Code:
sprintf(cBuf1,"All of line one data",var,var,...);
lcd_puts(cBuf1);
sprintf(cBuf2,"All of line two data",var,var,...);
lcd_puts(cBuf2);
sprintf(cBuf3,"All of line three data",var,var,...);
lcd_puts(cBuf3);
sprintf(cBuf4,"All of line four data",var,var,...);
lcd_puts(cBuf4);

How many time practically can RAM cells be written to? Some person say
infinite but I don't think so. Anybody could shed light on this

AC
--------------
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Oct 09, 2010 1:11 pm     Reply with quote

Please don't start a new thread on each sprintf question. Add all new
questions to your existing sprintf thread. This will keep the forum more
organized. The answers will be easier to find when people search the
archives in the future.

Regarding your question about RAM endurance, see page 3 of this
Microchip brochure on their RAM products. They say SRAM has infinite
endurance.
http://ww1.microchip.com/downloads/en/DeviceDoc/22239a.pdf

If you need more documentation on the endurance of PIC ram memory,
you should email Microchip tech support.
Chibouraska



Joined: 11 May 2007
Posts: 57
Location: Montreal,Canada

View user's profile Send private message

PostPosted: Sat Oct 09, 2010 8:13 pm     Reply with quote

Ok great i understand and this is not really a programming question (RAM memory endurance) but thanks for your reply anyway.

AC
---------
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