Eeprom writing and reading