TWI_SAVE_CLOCK: rcall START_CONDITION cpi temp0, 0x10 ; 0x10 --> Repeat start condition brne DS1307_SAFE_ERROR ; send SLA+W rcall TWI_SLA_W ; hier erhalte ich generell 0x20 als status also NACK cpi temp0, 0x18 ; SLA+W is send - ACK is received brne DS1307_SAFE_ERROR ; send Adress (0x00) for Control register ldi temp0, 0x00 ;0x07 = DS1307 Control register rcall TWI_SEND_DATA cpi temp0, 0x28 ; data byte is send - ACK is received brne DS1307_SAFE_ERROR ; load display memory adress ldi XL, LOW(CLOCK) ldi XH, HIGH(CLOCK) adiw XH:XL, 1 ; SECONDS ************* ld temp0, X+ rcall CODE_DATA rcall TWI_SEND_DATA .... ;****************************************************************************** ;****************************************************************************** WAIT_DS1307: in temp0, TWCR sbrs temp0, TWINT rjmp WAIT_DS1307 in temp0, TWSR andi temp0, 0xF8 ret ; *************************************************************** START_CONDITION: ldi temp0, (1<