Eeprom issue?

Hello,

I am writing 22bytes of data to eeprom

for this i define a starting adress (in this case 0x40), then i use a for loop to write data. After writing, i check the data:

This is what my checking system delivers:

//read eprom before write
EEPROM: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
// print data out to serial
DATA:     00 1C 00 28 28 00 00 03 E7 50 1B 00 00 01 01 01 02 01 03 E7 FF FF  
//write and then read data of eeprom
EEPROM: 00 1C 00 28 28 00 00 03 E7 50 1B 00 00 01 01 01 02 01 03 E7 FF FF

for further programming steps, i want to acces specific bytes on the eprom with single "EEPROM write"

for example the 10th byte of the 22bytes

uint8_t value = EEPROM.read(0x50); //0x40 start + 10bytes = 0x50

in the correct case i should see:

serial.println(value,HEX);

printing "1B"

but instead i get a "2".

If i accces adress 49 i get correct "50".
So there isnt a general error here.

My thoughts where that maybe the eeprom has a defective sector, so it tried many starting adresses, but i always get the same issue?

What could be the problem?

0x50 - 0x40 = 0x10 = 16 (DEC)

1st: 0x40
2nd: 0x41
.
.
.
10th: 0x49

The EEPROM seems to me good but not your math. :wink:

Budvar10:
0x50 - 0x40 = 0x10 = 16 (DEC)

1st: 0x40
2nd: 0x41
.
.
.
10th: 0x49

The EEPROM seems to me good but not your math. :wink:

Yes... it was late that day :frowning: