write and read calibration from eeprom