juani_c 66 Posted December 22, 2015 Share Posted December 22, 2015 I'm trying to comunicate with a FXOS8700CQ. (Energia 13-MSP430G2553) When I use this code: Wire.beginTransmission(0x1E); // Initialize the Tx buffer Wire.write(FXOS8700CQ_OUT_X_MSB); // Put slave register address in Tx buffer Wire.endTransmission(false); // Send the Tx buffer, but send a restart to keep connection alive Wire.requestFrom(0x1E, 6); // Read bytes from slave register address i=0; while (Wire.available()) { dest[i++] = Wire.read(); } I get what it's seen in the bottom of the image. The second time the addres is sent it should be a "read" instead of "write". When using just Wire.endTransmission();, that is whitout "false", the STOP is sent (top of the image), this is not how the communication with the sensor should be, BUT now the second time the addres is sent correct as a "read". It's like the Wire.requestFrom() is not actually reading. Any ideas? Quote Link to post Share on other sites
energia 485 Posted December 23, 2015 Share Posted December 23, 2015 Hi @@juani_c, this is what is called a repeated start. We have tried to implement this for the MSP430 but have not been able to get it to work reliably. We are still looking into it but it has been pushed down the list since the majority of the I2C sensors do not need a repeated start. Robert juani_c 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.