diff code_part1/OSTC_code_asm_part1/i2c_eeprom.asm @ 539:a587f491693d

clock in I2C "bus failed" routine
author heinrichsweikamp
date Sun, 08 Jan 2012 18:52:19 +0100
parents 3091628b2742
children 77c8ff191cd7
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/i2c_eeprom.asm	Sun Jan 08 18:26:08 2012 +0100
+++ b/code_part1/OSTC_code_asm_part1/i2c_eeprom.asm	Sun Jan 08 18:52:19 2012 +0100
@@ -359,10 +359,17 @@
 I2CReset_1:
 	bsf			PORTC,3			; SCL=1
 	nop
+	nop
+	nop
+	nop
 	btfsc		PORTC,4			; SDA=1?
-	bra		I2CReset_2		; =1, SDA has been released from slave
+	bra			I2CReset_2		; =1, SDA has been released from slave
 	bcf			PORTC,3			; SCL=0	
+	nop
+	nop
 	bcf			PORTC,3
+	nop
+	nop
 	decfsz		i2c_temp,F
 	bra		I2CReset_1			; check for nine clock cycles
 I2CReset_2: