I'm trying to communicate in I2C between a MSP430FR2433 and an MPU6050. I can send the start bit then the slave address (0x68) followed by the write bit (0) but the slave send me a NACK. I'm using the GY-521 board and there are two pull-ups of 4k7. The clock is at 100 kHz which is under the maximum. I could once make the communication but since I always get a NACK
-
1\$\begingroup\$ Schematic? Are you sure that your MPU is powered correctly and pin AD0 is LOW? \$\endgroup\$ – mic May 2 '19 at 10:35
-
\$\begingroup\$ @mic The GY-521 board has a pulldown on AD0. \$\endgroup\$ – CL. May 2 '19 at 10:45
-
\$\begingroup\$ On the I²C bus, the high voltage level is the idle state. A NACK means that the slave device did not react at all. Maybe it isn't connected properly to the MSP or to the power supply. \$\endgroup\$ – CL. May 2 '19 at 10:47
-
\$\begingroup\$ @CL. Yes, just found the GY-521 schematic :-) Anyway, the pulldown may be broken ;-) But I agree it's more likely that there's a connection issue. \$\endgroup\$ – mic May 2 '19 at 10:52
-
\$\begingroup\$ personally, I don't see the need for R6, I'd just put AD0 straight to GND \$\endgroup\$ – pm101 May 2 '19 at 12:38
Have you considered the often confused issue of the slave address being considered a 7-bit quantity versus an 8-bit quantity?
When a slave address is considered an 8-bit quantity the least significant bit (LSB) of the address is the R/W bit so the slave device looks like it responds to two addresses, one for read and the other for write.
When specified as a 7-bit quantity the slave address is encoded as a value independent from the R/W bit.
Your waveform picture shows the 0x68 address encoded as 7-bits. But it could be that the device data sheet may have specified as an 8-bit in which case you may need to send out that first byte of the I2C protocol as a value of 0x68 instead of the 0xD0 value you have used now.
-
\$\begingroup\$ The MPU-6050 datasheet shows that the I²C address is 1101000. \$\endgroup\$ – CL. May 2 '19 at 12:01
-
\$\begingroup\$ @CL. - So seven bits then. Good to know. Likely a connection issue then. \$\endgroup\$ – Michael Karas May 2 '19 at 12:05
-
\$\begingroup\$ Thank you for the answer, after having checked your suggestion, I finially change the sensor and it works. \$\endgroup\$ – jessica schmid May 6 '19 at 14:23