2026-05-28 10:56 PM
Hello,
I am trying to communicate with a VL53L1X sensor using a PIC18F16Q41 hardware I2C peripheral (MCC-generated driver).
The sensor module is AE-VL53L1X from Akizuki Denshi (Japan), which includes the original ST VL53L1X sensor and onboard level shifter.
Current issue:
The sensor ACKs correctly, but reading the Model ID register (0x010F) always returns 0x00 instead of the expected 0xEA.
Current I2C sequence:
START
W 0x29 ACK
0x01 ACK
0x0F ACK
STOP
(wait about 1 ms)
START
R 0x29 ACK
0x00 NACK (expected 0xEA)
STOP
What I already confirmed:
* Wrong I2C addresses correctly return NACK from the sensor
* XSHUT is correctly pulled up
* Sensor power is stable before PIC startup
* Oscilloscope confirms correct ACK/NACK behavior
Important comparison:
Using a RATOC USB-I2C converter with the same sensor module, register 0x010F correctly returns 0xEA.
So the sensor module itself appears to work correctly.
I compared the oscilloscope waveforms between RATOC and PIC.
One difference is the STOP timing generated by the PIC hardware I2C, but according to the VL53L1X datasheet timing requirements, it still appears to satisfy STOP timing specifications.
The attached SDA/SCL waveforms show some overshoot/ringing because the wiring is relatively long (about 50 cm total).
However, the same wiring length and similar overshoot are also present when using the RATOC USB-I2C converter, and in that case the VL53L1X correctly returns 0xEA from register 0x010F.
Therefore, the overshoot itself does not appear to be the root cause.
Has anyone experienced compatibility issues between VL53L1X and PIC18 hardware I2C peripherals?
Or is there anything special about VL53L1X register read timing/state handling that might explain why ACK works correctly but the returned data becomes 0x00?
Thank you very much.