Page 1 of 1

Writing values in internal EEPROM (SOLVED)

Posted: Thu Jun 05, 2014 4:17 pm
by Crenwick
Hello all,

Is there a limitation in the number of values to write to internal EEPROM at once ?

I have 250 values to write

0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 11, 13, 14, 15, 16, 18, 19, 20, 22, 23, 25, 27, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 53, 55, 57, 60, 62, 65, 68, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 107, 110, 113, 117, 120, 124, 127, 131, 135, 139, 142, 146, 150, 154, 158, 162, 167, 171, 175, 179, 184, 188, 192, 197, 201, 206, 211, 215, 220, 225, 230, 235, 240, 245, 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 8, 31, 100, 96, 100, 0, 0, 0, 0, 0, 4, 5, 57, 100, 87, 0, 8, 15, 20, 25, 35, 5, 1, 1, 85, 100, 95, 100, 81, 0, 0, 0, 0, 0, 0, 87, 100, 57, 5, 16, 13, 5, 0, 0, 0, 85, 1, 1, 5, 48, 38, 28, 17, 8, 0

But after compiling only a few (and not the good one) are written.

Here is a little program I made to test
Flowcode1.fcfx
(4.79 KiB) Downloaded 230 times
Regards,

Re: Writing values in internal EEPROM

Posted: Thu Jun 05, 2014 4:46 pm
by Benj
Hello Bernard,

Looking at the C code these are the values that are being set.

Code: Select all

#ifdef MX_CAL_PIC
#pragma DATA _EEPROM, 0,0,0,0,0,1,1,1,2,2,3,3,4,4,5,6,7,8,8,9,10,11,13,14,15,16,18
#endif
Which is nothing like what it should be. I'll have a dig into the component now and see if I can work out why this is failing.

Re: Writing values in internal EEPROM

Posted: Thu Jun 05, 2014 5:05 pm
by Benj
Hello,

I think I have now fixed the problem, it seemed the EEPROM component had a cap on how many characters were in the initialiser string so I have now upped this to 1000 characters which seems to be making it work through to the C correctly.
eeprom.fcpx
(18.07 KiB) Downloaded 239 times

Code: Select all

#ifdef MX_CAL_PIC
#pragma DATA _EEPROM, 0,0,0,0,0,1,1,1,2,2,3,3,4,4,5,6,7,8,8,9,10,11,13,14,15,16,18,19,20,22,23,25,27,28,30,32,34,36,38,40,42,44,46,48,50,53,55,57,60,62,65,68,70,73,76,79,82,85,88,91,94,97,100,103,107,110,113,117,120,124,127,131,135,139,142,146,150,154,158,162,167,171,175,179,184,188,192,197,201,206,211,215,220,225,230,235,240,245,250,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,8,31,100,96,100,0,0,0,0,0,4,5,57,100,87,0,8,15,20,25,35,5,1,1,85,100,95,100,81,0,0,0,0,0,0,87,100,57,5,16,13,5,0,0,0,85,1,1,5,48,38,28,17,8,0
#endif
Let me know how you get on.

Re: Writing values in internal EEPROM

Posted: Thu Jun 05, 2014 7:00 pm
by Crenwick
PERFECT !

That's great & fast service Ben !

Many thank's,

PS : Tested and working :wink: