Skip to main content
John E KVAM
ST Employee
February 23, 2021
Solved

Which I2C address to the ST ToF sensors use?

  • February 23, 2021
  • 1 reply
  • 1285 views

The ST data sheet says: “…uses a default device address of 0x52.

But is that the 7-bit base address, or the Write address?

This topic has been closed for replies.
Best answer by John E KVAM

The I2C address can be specified two ways.

As a base 7-bit address or as an 8-bit address with the LSB a write/read bit.

The bus wants to see address 0x52(write) or 0x53(read).

The problem is the I2C generally refers to the 7-bit address (0x29)

And one shifts the address left by one and adds the read/write bit.

But lots of people interpreted the 0x52 as the 7-bit address rather than the write address.

Put 0x29 in your code if the code is going to left shift by one and OR in the write/read bit.

And by the way, this is an amazingly common mistake.

Half the datasheets advertise the 7-bit address, and the other half specify the write address.

It’s very confusing.

Our data sheet says: “…uses a default device address of 0x52.

And does NOT specify which type of address it is.

1 reply

John E KVAM
John E KVAMAuthorBest answer
ST Employee
February 23, 2021

The I2C address can be specified two ways.

As a base 7-bit address or as an 8-bit address with the LSB a write/read bit.

The bus wants to see address 0x52(write) or 0x53(read).

The problem is the I2C generally refers to the 7-bit address (0x29)

And one shifts the address left by one and adds the read/write bit.

But lots of people interpreted the 0x52 as the 7-bit address rather than the write address.

Put 0x29 in your code if the code is going to left shift by one and OR in the write/read bit.

And by the way, this is an amazingly common mistake.

Half the datasheets advertise the 7-bit address, and the other half specify the write address.

It’s very confusing.

Our data sheet says: “…uses a default device address of 0x52.

And does NOT specify which type of address it is.