EEPROM Issue


i reading rfid tags , writing them eeprom. had 1 on hand longest time , reads , writes every time.

the tag number 4d006a6f25

when read bytes out of eeprom , compare them read compares no issues.

to move beyond that, got more tags. these tags similar in numbering , here example:

840033789a

when read first byte out shows ffffff84 of course not compare read 84.

i suspect has how writing eeprom , worked first tag. different?

here code use write eeprom:

code: [select]


for (int = 0; < 5; i++)
{
  eeprom.write(eepromindex,code[i]);
  serial.print("index: ");
  serial.print(eepromindex);
  serial.print(",");
  serial.println(code[i],hex);
  eepromindex++;
}



code[] holds 5 bytes of tag id. eepromindex indexed each time write made.

the result of print is:

index: 0,84
index: 1,0
index: 2,33
index: 3,78
index: 4,9a

when compare eeprom off of subsequent read, print results of bytes until first failed match. these tags failing on first byte following serial print:

84:ffffff84

help!

you writing eeprom byte apart when trying write 5 bytes. overlap. there library eeprom write simplify trying do:

http://arduino.cc/playground/code/eepromwriteanything


Arduino Forum > Using Arduino > Storage > EEPROM Issue


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial