I try to use a HTU21D (3.3V) and a RS1307 (5V) at the same time on Arduino Pro Mini (5V). I connect the Arduino I2C wires to the 5V side on TXS0108E,so as RS1307, and connect HTU21D on the 3.3V side. But when I drive the OE on TXS0108E HIGH, the output of RS1307 became strange as below:
2165/165/165 (Saturday) 165:165:85
since midnight 1/1/1970 = 1552693585s = 17970d
now + 7d + 30s: 2019/3/23 12:16:31
24935
The Arduino can’t detect RS1307. But if I connect the OE to GND, RS1307 worked again, but HTU21D will stop working, since it will make TXS0108E into High-Z state.
So how to make HTU21D and RS1307 works at the same time using TXS0108E?
What is a RS1307? A real time clock chip I presume. But Google doesn’t know about it. A [DS1307 however. Is that it?
Without a schematic how you have everything connected, and the code with which you receive the I2C datastream little can be explained. As always, for I2C communication to work pull-up resistors need to be present between the data and clock lines and the supply voltage.
You need to be clearer on what those date and time values mean. I don’t understand what you are calculating there:
What time and date did you set the timekeeper registers to previously? (you have to correct the time/date as the battery supply could have ran out since leaving the factory or last powerup)
Which values from the timekeeper registers are received in the I2C stream now?