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

Confuse with program memory and eeprom

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



Joined: 12 Feb 2009
Posts: 54

View user's profile Send private message

Confuse with program memory and eeprom
PostPosted: Sat Apr 04, 2009 7:43 am     Reply with quote

Hi,

A this moment, I'm trying to make a simple data logger where I can save data into pic memory. So the problem was I'm trying to save the data into on-chip program memory and not in eeprom. As far as I know, the memory size for eeprom is limited compared to on-chip memory.
Hope someone can clear me out about the problem that I have right now.

Thanks.
andyfraser



Joined: 04 May 2004
Posts: 47
Location: UK

View user's profile Send private message

Confuse with program memory and eeprom
PostPosted: Sat Apr 04, 2009 10:08 am     Reply with quote

As always, you should post your PIC type.

I would suggest that EEPROM is typically used to store settings and parameters and is usually too small to use as data logging memory. Also, the program memory is not really a suitable place to be storing logged data. You should look at external SPI/I2C EEPROM or even adding an SD card interface to your design.

Andy
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Apr 04, 2009 11:46 am     Reply with quote

CCS has an example of a data logger which uses flash memory:
Quote:
c:\program files\picc\examples\ex_logger.c

But be aware that flash memory has a limited number of write cycles
and you can burn it out if you write to it too many times. You didn't
say what PIC you are using. The PIC data sheet will tell the maximum
allowed number of write cyles for flash memory.
khalis



Joined: 12 Feb 2009
Posts: 54

View user's profile Send private message

PostPosted: Sun Apr 05, 2009 12:39 am     Reply with quote

Sorry because did not tell the PIC that I used. I'm using PIC18F2525 and I am planning to save 3 bytes at once. I need an explanation towards advantage and disadvantage between using program memory and eeprom. I have seen the example and is it 'flash memory', refers to program memory?
Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Apr 05, 2009 1:03 am     Reply with quote

Quote:

I need an explanation towards advantage and disadvantage between
using program memory and eeprom.

Here are some previous threads on the topic:
http://www.ccsinfo.com/forum/viewtopic.php?t=20016
http://www.ccsinfo.com/forum/viewtopic.php?t=19751
http://www.ccsinfo.com/forum/viewtopic.php?t=23336
http://www.ccsinfo.com/forum/viewtopic.php?t=35440
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