EasyManua.ls Logo

ST VL6180X - Single-Shot Range Measurement; Continuous Range Measurement Mode

ST VL6180X
27 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DocID026571 Rev 1 7/27
AN4545 Performing range measurements
27
2.1 Performing a range measurement in single-shot mode
1. Check device is ready to start a range measurement. (Optional)
a) Check bit 0 of RESULT__RANGE_STATUS {0x4d} is set.
2. Start a range measurement.
a) Write 0x01 to SYSRANGE__START {0x18}.
3. Wait for range measurement to complete.
a) Poll RESULT__INTERRUPT_STATUS_GPIO {0x4f} register till bit 2 is set to 1.
(New Sample Ready threshold event).
4. Reading range result.
a) Read RESULT__RANGE_VAL {0x62}.
b) This is the range measurement between the VL6180X and target in mm
5. Clear the Interrupt status.
a) Write 0x07 to SYSTEM__INTERRUPT_CLEAR {0x15}.
6. Repeat the previous steps 1 to 4 for more range measurements.
2.2 Performing a range measurement in continuous mode
1. Check device is ready to start range measurement. (Optional)
2. Check bit 0 of RESULT__RANGE_STATUS {0x4d} is set.
3. Start range measurements.
a) Write 0x03 to SYSRANGE__START {0x18}.
4. Wait for range measurement to complete.
a) Poll RESULT__INTERRUPT_STATUS_GPIO {0x4f} register till bit 2 is set to 1.
(New Sample Ready threshold event).
5. Reading range result.
a) Read RESULT__RANGE_VAL {0x62}.
b) This is the range measurement between the VL6180X and target in mm.
6. Clear the Interrupt status.
a) Write 0x07 to SYSTEM__INTERRUPT_CLEAR {0x15}.
7. Repeat the steps 2 to 4 for more range measurements.
8. Stop range measurements.
a) Write 0x01 to SYSRANGE__START {0x18}.

Related product manuals