36 loop_until_bit_is_clear(PINC,CLK);
38 loop_until_bit_is_set(PINC,CLK);
40 uint8_t databit = PINC&(1<<SDA);
44 static uint8_t receivebuffer = 0;
45 static uint8_t bitcounter = 0;
46 static uint8_t eepromaddress1 = 0xF;
48 receivebuffer |= (databit << bitcounter);
51 if (bitcounter == 8) {
54 eeprom_write_byte((uint8_t *) eepromaddress1,receivebuffer);