I2C with 3.3v board

Hi!

I was implementing I2C on my Teensy 4.1 board and the board is 3.3V logic. I get data but it's choppy data. I have the SDA and SCL lines connected directly to the SDA and SCL lines of the device I am trying to read from.

I successfully received consistent data using I2C on an Arduino Mega 2560 board so I switched the board out with my Teensy4.1 board and that's where I observed the inconsistent data.

I have a level shifting device txs0108e and I tried using it with no success.

I guess I am just confused on what is causing this inconsistent reading on the I2C lines.

BTW the device I am trying to read from is a Smart Li-on battery SMBus communication.

Thanks

What device, link please ?

The SMbus only operates at 100kHz and below.
Pullups need to be 8.5K or higher for 3.3V

bb-2557/U battery

datasheets:
Bren-Tronics SMBus - SBData Communication Points.pdf (496.7 KB)
sbdat110.pdf (138.8 KB)
smbus110.pdf (158.4 KB)

Surprisingly even with 10K pullups on the lines there is still inconsistent readings.

Are you using 100kHz?

Is implementing wire.begin() not already setting it at default to 100kHz?

Not sure for a Teensy.
Maybe you better set it just to be sure.

You need 4K7 pullups, 10K is probably too weak.

Placing your pullups to the 3V3 line should work. If the parts are of the new specification the operation will be marginal as the specification changed. I use something in the 3.3K range. The outputs of the I2C drivers (in chip) are open drain and do not source any current. This supplied solely by the pull up resistors. If they are to high in value the rise times go to pot and you can get intermittent results. Try this after you get your speed set to the appropriate value. Slower would be OK. Here is a link to the specification.

try with the following level shifter whose resistors work as pull-up.

shouldn't the pull-up be tied to the highest voltage?

That is below the recommended minimum for the SMBus

This is SMBus NOT I2C, they are different.

It's SMBus.

The SMBus was the second part which I did not address.

OP talks about SDA, SCL, and I2C in post #1?

Testing with 4.7K resulted in the same results as before.

To get the SMBus communication working on an Arduino compatible board I am using the I2C lines and the wire library.

The Teensy 4.1 i/o pins are 3.3v logic so that would be the highest voltage to tie the pull ups to.