Page 1 of 1

Read and write an array to the microcontroller EEPROM

Posted: Fri May 30, 2025 6:41 pm
by Carmelo
I have a variable set as an array of 10 elements and I would like to read and write all the data of that array into EEprom memory.
Can it be done in some way or do you have to read and write them cyclically, one by one each element of the array in a memory location?

C.

Re: Read and write an array to the microcontroller EEPROM

Posted: Fri May 30, 2025 7:25 pm
by medelec35
Hello.
You can use a loop and increment the count of the loop the count will be the address and send one element at a time as the data value.'
I can post a simple example if you like?
Just don't keep writing as there is a limit to how many times EEPROM can be written to.

Re: Read and write an array to the microcontroller EEPROM

Posted: Fri May 30, 2025 8:16 pm
by Carmelo
Muchas gracias por la respuesta.
Agradecía el ejemplo.

C.

Re: Read and write an array to the microcontroller EEPROM

Posted: Sun Jun 08, 2025 1:32 pm
by liudeqiang_2008
medelec35 wrote:
Fri May 30, 2025 7:25 pm
Hello.
You can use a loop and increment the count of the loop the count will be the address and send one element at a time as the data value.'
I can post a simple example if you like?
Just don't keep writing as there is a limit to how many times EEPROM can be written to.
Hello
Could you please post a simple example? I am now have the same question.
Many thanks!

Best regards
Deqiang