cancel
Showing results for 
Search instead for 
Did you mean: 

Which I2C address to the ST ToF sensors use?

John E KVAM
ST Employee

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

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


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

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.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

View solution in original post

1 REPLY 1
John E KVAM
ST Employee

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.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.