changeset 539:a587f491693d

clock in I2C "bus failed" routine
author heinrichsweikamp
date Sun, 08 Jan 2012 18:52:19 +0100
parents 5eff719fd292
children 9e838e0b3749
files code_part1/OSTC_code_asm_part1/i2c_eeprom.asm
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
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: