cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L0X I2C Commands

RNobe
Associate

​Can someone point me in the direction where I can find a document giving the I2C register locations to control the VL53L0X. I am trying to read out ranges using an FPGA and the standard I2C bus but all I have found is the device address is 0x52.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

​ST did not publish the register map for this part. Instead they tried to make it easy for you and published an API. Using the API, you need only to write the software layer between the API and your MCU's I2C commands, and you should be ready to roll.

The API functions are a lot easier than poking at registers.

Unfortunately ST's API is a bit large. It's very complete, but it's large.

Both Sparkfun and Polulu wrote a smaller API. Theirs are less complete - but they're small and might do what you need.

My suggestion would be to get the code from ST's web site:

https://www.st.com/content/st_com/en/products/embedded-software/proximity-sensors-software/stsw-img005.html

Give it a try - it should be easy enough.

If you have a really small MCU (or an FPGA), you can also look at the versions from SparkFun or Polulu. (There might be others.)

I always add that if you use their software, send them a few dollars. They're great companies who do awesome work, but they don't make any money off their software.

As you are trying to get an FPGA to work. Look at the SparkFun software. The code they wrote is particularly straight forward.


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

3 REPLIES 3
John E KVAM
ST Employee

​ST did not publish the register map for this part. Instead they tried to make it easy for you and published an API. Using the API, you need only to write the software layer between the API and your MCU's I2C commands, and you should be ready to roll.

The API functions are a lot easier than poking at registers.

Unfortunately ST's API is a bit large. It's very complete, but it's large.

Both Sparkfun and Polulu wrote a smaller API. Theirs are less complete - but they're small and might do what you need.

My suggestion would be to get the code from ST's web site:

https://www.st.com/content/st_com/en/products/embedded-software/proximity-sensors-software/stsw-img005.html

Give it a try - it should be easy enough.

If you have a really small MCU (or an FPGA), you can also look at the versions from SparkFun or Polulu. (There might be others.)

I always add that if you use their software, send them a few dollars. They're great companies who do awesome work, but they don't make any money off their software.

As you are trying to get an FPGA to work. Look at the SparkFun software. The code they wrote is particularly straight forward.


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.
S.Ma
Principal

If you use the long range version, VL53L1X, don't use the SW007, use SW009

https://www.st.com/content/st_com/en/products/embedded-software/proximity-sensors-software/stsw-img009.html

It's few files (as a sensor should be), and there are functions to enable non blocking (launch, poll for data available, read data).

With I2C by GPIO (no clock stretch support), it works fine.

​Thanks John,

I have the device running on my desktop using the code from ST will figure out the calibration routines and go from there.

Ryan