Quote:Is this the only way a repeated start status code can be generated?
A special case occurs when a new Start condition is issued between a Start and Stop condition. This is referred to as a Repeated Start condition, and is used when the Master wishes to initiate a new transfer without relinquishing control of the bus.
I am using an ATmega88 TWI Master Receive to read three remote I2C ports. After reading the first port, the other two report status Repeated Start when a Start is sent. The status returned when reading each port is 0x58, which I think means the Master has sent the required NACK.
Here is the code I am using for I2C Stop:
TWI_Stop: ; It seems that a delay is needed before ; this is called. It works OK with ; ldi TEMP, 0x22 ;** this test code inserted. ; mov HEX, TEMP ;** ; rcall SendHex ;**goes thru here clr TEMP ;**I know, not needed ldi TEMP, (1<<TWINT|1<<TWSTO|1<<TWEN) ; sts TWCR, TEMP ; ret ;
The code commented out is to use the USART to help troubleshoot. The funny thing is that with that code in place, I no longer get the Repeated Start status.
Any ideas about what I'm doing wrong?