View previous topic :: View next topic |
Author |
Message |
khalis
Joined: 12 Feb 2009 Posts: 54
|
Confuse with program memory and eeprom |
Posted: Sat Apr 04, 2009 7:43 am |
|
|
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
|
Confuse with program memory and eeprom |
Posted: Sat Apr 04, 2009 10:08 am |
|
|
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
|
|
Posted: Sat Apr 04, 2009 11:46 am |
|
|
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
|
|
Posted: Sun Apr 05, 2009 12:39 am |
|
|
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
|
|
|
|