while(EECR & (1<<EEWE)) //Wait for completion of previous write EEAR = 14; // EEDR = Date; EECR |= (1<<EEMWE); EECR |= (1<<EEWE);