Sign In

Difficulty To Keep EEPROM Data Safe While Flashing.

Rafeeq rafialan@gmail.com India

Hardware: Arduino Mega 2560 Software: Arduino Gui With C Language

Hello Avinash,

I need help in one issue (may be my less knowledge) i am facing.
I have my code which will write or save data into EEPROM memory during code operation.
during code testing When I update code and flash again entire EEPROM is getting erased.
This is very disturbing because EEPROM data is important and I wanted to keep it untouched while updating or testing code data.

Images

Replies

R Avinash
2017-01-08 16:07:45
The solution is very simple. But NOT possible in Arduino environment! Because it does NOT allows to change the Fuse bits of AVR MCUs
R Rafeeq
2017-01-10 03:50:47
Dear Avinash,
Thanks a lot for your support.
I am not very clear about Arduino environment you mean.
Let me explain little detail to my application.
I am not working on Arduino board, I am using Atmega 2560 chip on my project board.
Is this make you some thought?
Sorry to confuse you if I used Arduino board in previous message.
R RAFEEQ
2017-01-10 05:13:07
Dear Avinash,

Thank you for your reply.
I like to give little more details of my application.
I am using ATMEGA 2560 controller on separate board, not using Arduino MEGA board.
Sorry to confuse you by "Arduino MEGA" in my request.

Is ther any solution if i am using ATMEGA on different board ? or the limitation you mentioned applicable in all ATMEGA controller chips ?

R Avinash
2017-01-10 11:48:57
How you are programming the Chip? which hardware software you are using?
R Rafeeq
2017-01-11 00:12:33
Hi Avinash,

Answers to your questions,
1) I use USB ASP hardware ( AVR programmer from amazon) to program chip. Equivalent of your ASP programmer.

2) Arduino Software to compile and creation of HEX file.

3) extreme burner for download HEX file to chip.

4) I have a automation controller board with ATMEL2560 chip to be programmed. No Bootloder used.


Hope I answered your questions.
R Avinash
2017-01-11 04:09:55
Program the EESAVE bit in HIGH Fuse byte
R Avinash
2017-01-11 04:11:34
Go to Fuse Bits/Settings tab in extreme burner and click bit details under high fuse byte.
R RAFEEQ
2017-01-11 06:40:43
Hello Avinash,

Thank you for clarification.

I need little more details and support on playing with H Fuse, since I bricked one controler because of wrong fuse configuration.

1) please find attachment of my current fuse configuration. for H Fuse its 0xD9 i use now.
in your reply you suggest to set EESAVE bit alone, is iam write ?
so should I set this bit alone ? OR can I write the entire H FUSE configuration 2 byte (its 0xD9 currently) ? if YES how to get new two byte values considering EESAVE bit set ?

2) please help by sharing FUSE byte calculation document if available.

R Avinash
2017-01-11 16:08:14
Read the fuse using read commond. Then change EESAVE and write back.

Post a reply to Rafeeq

Think you can help Rafeeq ? Then post your thoughts that might help Rafeeq . You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.