SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By GeneW
#72249
Is someone willing to explain under what Arduino program conditions the "repeated start condition" is sent? I am referring to code using the Wire TWI library.
By theatrus
#72277
It highly depends on the device you are talking to. Repeated starts chain together several I2C messages to one device without having to resend the ID, and can be used as a faster transfer mechanism.
By GeneW
#72322
The VTI SCP1000-D11 pressure sensor is what I am working with currently. It claims to have a TWI interface but during an 8-bit register read, it requires this sequence:
Code: Select all
slave address > write bit > ack > 8 bit slave register address > ack > restart > slave address > read bit > ack > slave register data > nak > 
stop
From the VTI FAQ for the part (not the data sheet as one would expect):
Check the TWI waveforms. Notice that 'Restart' bit can not be replaced by separate "Stop" and "Start" bits (SCP1000 requires the restart bit and it has to be only a Start bit (without a stop bit before it).
Hence my original question.
By GeneW
#72629
Well, after further study of the Wire library, I have concluded that it doesn't support the repeated start condition. It looks like it always inserts a stop condition before repeating the start condition.

If I interpret the I2C specification correctly, this is a deviation from that specification.

Maybe that's why Sparkfun only carries the SPI version of the SCP1000.