2025-01-26 10:23 AM - last edited on 2025-01-26 11:53 PM by SofLit
Hi everybody.
Please help me.
I bought a VL53L4ED sensor and would like to learn how to use it.
I have found a number of documents and driver examples, but have been unable to find a document describing the internal registers and their function. (programming manual) .
I must be looking for it wrong. Can you please direct me to the proper document?
Thank you very much.
Jaroslav
2025-01-29 07:46 AM
The VL53L4ED is an extended temperature version of the VL53L4CD. The CD is a bit cheaper, so I'd go with that one.
If you have power and ground, and the I2C lines are hooked up correctly, and the XShut line is lifted high there is nothing that can prevent the chip from responding.
But try this...
Search GitHub for the VL53L1, or L4 and your MCU. With a little luck someone has done the work for you.
Try this snippet of code. change the the L1 to L4X and your model ID will be different. But you should get a response.
(The L1X and the L4CD are the same silicon but with different optics.
VL53L1_RdByte(Dev, 0x010F, &byteData);
printf("VL53L1X Model_ID: %02X\n\r", byteData);
VL53L1_RdByte(Dev, 0x0110, &byteData);
printf("VL53L1X Module_Type: %02X\n\r", byteData);
VL53L1_RdWord(Dev, 0x010F, &wordData);
printf("VL53L1X: %02X\n\r", wordData);
I got:
VL53L1X Model_ID: EA
VL53L1X Module_Type: CC
VL53L1X: EACC
There is also an 'is_booted' function that should return a 1. Can't get much simpler than that.
I didn't know I2C can go down to 20KHz. Might want to crank that up to 100KHz.
- john