Direct write to EEPROM atmega328

I expect the answer is NO , but thought I'd ask.

If I have a programmed up 328 (UNO)

Is there anyway that a value can then, afterwards, be directly written to EEPROM, without overwritting (accessing) the existing code and without any specific function for that purpose within that code.

Thinking either by UART or ICSP??

thx

Like you, I expect the answer is no, but why do you want to do it ?

I haven’t done it for a couple of years, but if l recall,, ATMEL/Microchip Studio can do it via ICSP.

IIRC, it can program Flash, EEPROM separately with the ICE programmers.

2 Likes

@hammy That is the route I would explore - and I also need it very shortly, as I have a need to be able to, post-upload, modify a few servo parameters. Original plan was to upload a new sketch that just modified the EEPROM, then re-upload the main code, but it would be far easier to just change a few constants in the EEPROM - somehow; I presume it's possible, but can't advise on technique. I'll be looking into this today or tomorrow, so if anyone else has any tips or pointers, you'll be educating two of us!

1 Like

I did find this little gem:

which would suit my need to simply change the RS485 address in each node.
For larger reprogramming, I'd explore this:
https://www.nongnu.org/avr-libc/user-manual/using_avrprog.html
But, we'd need to generate a hex file...
More later.

i have TL866A programmer and able to change EEPROM byte wise, or entirely, in socket or over ICSP

Have you considered implementing a 'diagnostic' mode to allow your code to program the EEPROM? You could require a special password or specific hardware state to activate this mode. This approach is commonly used in automotive modules, typically through a diagnostic tool.

I use the following GUI Interface (Fig-1) and the AVR Programmer (Fig-2) to perform read write operations with EEPROM Memory of AVR MCUs without disturbing the content of the Falsh Memory.


Figure-1:

AVRProgrammerTechShopBD
Figure-2:

ThanksI'll have a look at those ideas...... if/when I can get IDE 2 (latest version) to upload to its selected COM port .................... whilst 1.8 still works fine grrrrrrrrrrrrrrrrrrrrrrr.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.