added LC functions and eeprom cal