Hello,
I would like to implement distance measurement using a PIC18F27Q10 MCU.
I have connected a VL53L0X sensor and an SSD1306 OLED display to a common I2C bus.
The display works, but the TOF sensor does not.
In the test project, when the TOF sensor Component Macro runs, the CLK line remains "LOW" level in idle state, which causes the protocol not to work.
I updated all component macros to the latest release before testing.
I also tested the attached project with a PIC16F18875 MCU and it works fine with it.
Thank you in advance for your help.
Regards,
Sasi
The VL53L0X1 sensor does not work with the PIC18F27Q10 MCU.
-
- Posts: 127
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 12:11 pm
- Has thanked: 41 times
- Been thanked: 15 times
-
- Matrix Staff
- Posts: 1965
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 514 times
- Been thanked: 701 times
Re: The VL53L0X1 sensor does not work with the PIC18F27Q10 MCU.
Hi Sasi,
I've had a look at the component source and though there is a lot of code to drive this sensor I cannot see a reason for the lockup.
I think I have the sensor somewhere so I'll have a dig for it and see if I can find a way to replicate.
I've had a look at the component source and though there is a lot of code to drive this sensor I cannot see a reason for the lockup.
I think I have the sensor somewhere so I'll have a dig for it and see if I can find a way to replicate.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: The VL53L0X1 sensor does not work with the PIC18F27Q10 MCU.
Hi Ben,
I am attaching two pictures of the issue.
TOF initialization does not happen at startup either, the MCU tries to program the sensor, but they "don't understand each other".
It would be great if you could find a solution to this error. Regards,
Sasi
I am attaching two pictures of the issue.
TOF initialization does not happen at startup either, the MCU tries to program the sensor, but they "don't understand each other".
It would be great if you could find a solution to this error. Regards,
Sasi
Re: The VL53L0X1 sensor does not work with the PIC18F27Q10 MCU.
Hello Ben,
Since both I2C channels are operational, I attempted to connect the sensor and the display to separate channels.
In this configuration, the TOF sensor functioned correctly. The SCL line remained in its expected idle high state.
(I re-tested the setup using a PIC16F18857 MCU, and observed the same malfunction when the display and sensor were connected to the same I2C bus. Therefore, this issue is not specific to the PIC18F27Q10 device.
)
Regards,
Sasi
Since both I2C channels are operational, I attempted to connect the sensor and the display to separate channels.
In this configuration, the TOF sensor functioned correctly. The SCL line remained in its expected idle high state.
(I re-tested the setup using a PIC16F18857 MCU, and observed the same malfunction when the display and sensor were connected to the same I2C bus. Therefore, this issue is not specific to the PIC18F27Q10 device.

Regards,
Sasi