/* SLdt 250823 Disclaimer: none. Sue me. ATtiny1614: schreiben auf EEPROM */ #define F_CPU 3333333 #include #include int main(void) { VPORTB.DIR = 0b00000100; // LED an B2 gegen GND *(uint8_t *) (0x1401) = 0xAB; *(uint8_t *) (0x1402) = 0xCD; *(uint8_t *) (0x1403) = 0xEF; _PROTECTED_WRITE_SPM(NVMCTRL.CTRLA, 3); // 0x3 ERWP Erase and write page (NVMCTRL.ADDR selects which memory) _delay_ms(10); if (*((uint8_t *) (0x1402)) == 0xCD) VPORTB.OUT = 0b00000100; while(1) { } }