Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

AVR8, Saving EEPROM Data to File

2 posters

Go down  Message [Page 1 of 1]

1AVR8, Saving EEPROM Data to File Empty AVR8, Saving EEPROM Data to File Wed Jun 07, 2023 1:44 pm

KerimF

KerimF

SimulIDE-R1677_Win32

Lately, I needed to analyze data written on EEPROM of ATmega8.
I noticed that the saved data, after running ‘Save EEPROM data to file', differs from the actual EEPROM data.

As an example, the two screenshots below show the difference after running AVDC_07_04bT.asm (uploaded already on the thread ‘About AVR8 IJMP instruction’; “AVDC_07_04bT_asm_sim.zip” and “AVDC_07_04bT_lst.zip”).

Added: what is the supposed format of this 'data' file; binary, hex or else? Thank you.


By the way, I wonder if it will be possible, in the future, to also save SRAM (or RAM) data to file.
Thank you.

AVR8, Saving EEPROM Data to File Avdc_011
AVR8, Saving EEPROM Data to File Avdc_012

2AVR8, Saving EEPROM Data to File Empty Re: AVR8, Saving EEPROM Data to File Wed Jun 07, 2023 4:18 pm

arcachofo

arcachofo

The file saved looks ok to me.

The problem is that you are opening a text file in an hex editor.

what is the supposed format of this 'data' file; binary, hex or else? Thank you.
Depends on the extension:

.data: comma-separated decimal values (open in text editor)
Any other: (for example .bin) raw binary (open in hex editor).

3AVR8, Saving EEPROM Data to File Empty Re: AVR8, Saving EEPROM Data to File Wed Jun 07, 2023 5:51 pm

KerimF

KerimF

arcachofo wrote:The file saved looks ok to me.

The problem is that you are opening a text file in an hex editor.

what is the supposed format of this 'data' file; binary, hex or else? Thank you.
Depends on the extension:

.data: comma-separated decimal values (open in text editor)
Any other: (for example .bin) raw binary (open in hex editor).

Naturally, I also opened it (.data) as a 'txt' file. I got (as it is expected after reading it as binary):
 65, 109, 112, 101, 114, 101,  68,  67,  95,  48,  55,  45,  52,  95,  95,  95
 15, 160, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
 19, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
145, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
 20, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255

Perhaps I still miss something because I couldn't find any possible correlation between the saved data and the original one.

Edited:
Only now I noticed that the data is in decimal format. Sorry.
I seldom read raw data in decimal.

OT:
My eyes read your clear remark:
.data: comma-separated decimal values
But my brain insisted to read it:
.data: comma-separated hex values
It did it just because it never had the chance to read a data file of such format Sad
But I may add/write tables of data (.db or .dw) in decimal in a code.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum