my Attiny85 losts the whole EEPROM data, if I turn the power of. I use the Arduino IDE and I'm sure, that The EEPROM was wrote, because I get Serial feedback. Here my code:
#include <EEPROM.h>
#include <SoftwareSerial.h>
SoftwareSerial SSerial(0, 1);
int addr = 0;
uint8_t val = 2;
void setup()
{
SSerial.begin(9600);
}
void loop()
{
EEPROM.write(addr, val);
delay(100);
uint8_t value = EEPROM.read(addr);
SSerial.print(addr);
SSerial.print("\t");
SSerial.print(value, DEC);
SSerial.println();
addr = addr + 1;
if (addr == 512)
while(1);
}
Thank you :)
Programming through ISP SPI erases eeprom (all values become 0xFF) by default but seems this feature can be setup in programmer settings. Programming through bootloader do not erase eeprom.
Thank you @Vladimir Tsykunov