从机地址应该由从机决定,由从机的硬件连接决定,可以看下手册,: The slave address of the MPU-60X0 is b110100X which is 7 bits long. The LSB bit of the 7 bit address is determined by the logic level on pin AD0. This allows two MPU-60X0s to be connected to the same I2C bus.
When used in this configuration, the address of the one of the devices should be b1101000 (pin AD0 is logic
low) and the address of the other should be b1101001 (pin AD0 is logic high).
你软件上写0x68 0x69是没有作用的,只能由从机自己决定。
数据手册上有说明,不管AD0接高还是低,读出来的都是0x68。who am i寄存器的第0bit和第7bit是强制为0,1bit--6bit是固定的110100,所以两个器件读出来都是0110 1000(0x68)。要理解这个值只是表示"我是MPU6050",并不能区分是哪个MPU6050。只能通过从机地址0xD0或0xD2来区分是哪个MPU6050
When used in this configuration, the address of the one of the devices should be b1101000 (pin AD0 is logic
low) and the address of the other should be b1101001 (pin AD0 is logic high).
你软件上写0x68 0x69是没有作用的,只能由从机自己决定。
一周热门 更多>