-
Notifications
You must be signed in to change notification settings - Fork 54
Description
The VL53L1X datasheet says there are two modes which correspond to different IOVDD voltages:
Section 5.2
https://www.st.com/resource/en/datasheet/vl53l1x.pdf
The VL53L1X user manual then tells the user how to switch between these modes (this seems to be for the old API):
In the register configuration array in the code here, there seems to be a contradiction:
SparkFun_VL53L1X_Arduino_Library/src/vl53l1x_class.cpp
Lines 54 to 55 in 1773c55
0x00, /* 0x2e : bit 0 if I2C pulled up at 1.8V, else set bit 0 to 1 (pull up at AVDD) */ | |
0x00, /* 0x2f : bit 0 if GPIO pulled up at 1.8V, else set bit 0 to 1 (pull up at AVDD) */ |
Unless I'm misunderstanding this, it seems that bit 0 should be set for both of these register values. The two pins ~INT and ~SHUT are pulled up to AVDD (3.3V) on the SparkFun board.
Does anyone know what these registers actually do? Do they enable some internal pull-ups which are not used here because the SparkFun board has pull-ups?
The pololu library does seem to support switching between the modes:
https://github.com/pololu/vl53l1x-arduino/blob/0636d160b61c54ee4ae249427fa8d67efb818f06/VL53L1X.cpp#L30-L35
Their board also pulls-up these pins to AVDD.