Author Topic: Save an array to non-volatile memory  (Read 8515 times)

Offline 240glt

  • PLUS+1 Developer
  • ***
  • Posts: 35
  • Karma: +1/-0
Save an array to non-volatile memory
« on: February 05, 2014, 09:09:04 AM »
What is the best way to save an array to non-volatile memory? Is there an easy way?

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 352
  • Karma: +8/-0
    • Marbek Elektronik
Re: Save an array to non-volatile memory
« Reply #1 on: March 08, 2014, 08:56:48 AM »
I suggest to split the arrray in U8.
(To save memory it might be better to combine 2 U8 to 1 U16. Test this.)
then save each Byte (or Word) to 1 NV.
To read the array, you should combine all NVs to an array.
« Last Edit: March 08, 2014, 06:35:06 PM by Marbek_Elektronik »
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung

kdcommon

  • Guest
Re: Save an array to non-volatile memory
« Reply #2 on: March 31, 2014, 04:57:11 AM »
Write is one by one to NV_ROM. And your array should avoid usin 'Insert' Function if your array is very long. Otherwise the each time a new value come in, all the elements will be wirte again otherwise only the new coming one. This will consuming a long time.