Hola y disculpen por molestar con un tema ya tratado, pero tengo un MPU 6050 conectado a un pro mini 3,3 funcionando sin problemas con ángulos generados en el DMP leyendo FIFO sin interrupciones.
En estos días voy a recibir un RTC 3231 y veo que tiene la misma dirección que el MPU.
Vi la solución de poner AD0 en High y cambiar de 0x68 a 0x69 en MPU.
Tengo 2 preguntas:
Es posible conectar el rtc a los pines XDA y XCL del 6050 y leer fecha y hora a través de este usándolo como master y bypass con:
mpu.setI2CMasterModeEnabled();
mpu.setI2CBypassEnabled(); ?
Si lo anterior no es posible o es muy complicado para poner AD0 en high en el caso del pro mini 3,3 es suficiente con conectar AD0 a la salida 3,3 sin usar ninguna resistencia?
1000 disculpas por la molestia y muchísimas gracias.
The pin "AD0" selects between I2C address 0x68 and 0x69. That makes it possible to have two of these sensors in a project. Most breakout boards have a pullup or pulldown resistor to make AD0 default low or high. Connect AD0 to GND or 3.3V for the other I2C address.
Eso responde que puedes conectarlo directamente a 3.3V
Confirmando que ambos tienen la misma dirección 0x68 esta es una buena respuesta de StackOverflow al respecto
Looking at the GY-86 schematic I found, the AD0 pin is hard grounded on the board. This means that unless you can find a trace on the board to cut (unlikely), there is no way to change the MPU6050 slave address. As far as I can see, the DS2321 cannot change its address either.
This leaves you with a few choices:
Change out on of the devices to a different model with a different address. I expect you really don't want to do this.
If your master device (which you did not specify) has multiple I2C bus controllers, hook each device to a different bus.
Use an I2C multiplexer to put the devices on different "virtual" busses.
Here's a module with a 1-8 multiplexer which should do the job (though only a 1-2 is really necessary).
Entonces o cortas la pista lo unes AD0 a 3.3V o bien usas un multiplexor como el TCA9548 o bien la opción que planteas por el bus I2C secundario.
Muchísimas gracias por la pronta respuesta, les haré saber como le resuelvo.
La modificación de la dirección vía AD0 parece ser en principio lo más sencillo.