Communicating With The Serial Port; Figure 6 :: Serial Interface Connections - Lightware SF30/B Product Manual

Accelerated laser rangefinder
Hide thumbs Also See for SF30/B:
Table of Contents

Advertisement

The USB, serial, and analog output rates are decoupled from the exposure time setting. For example, you can still run with an
exposure time of ~50 microseconds, but only output at 40 results per second on the USB port. Each of these results will be made up
of a single laser shot, but by limiting the output you don't need to process all 20010 shots on your host controller.

7. Communicating with the serial port

The serial port is used to transmit distance readings to an embedded host processor such as the flight controller in a UAV. The
hardware interface uses 3.3 V logic levels and can be connected directly to any similar, compatible interface. The serial port
protocol should be set to 8 data bits, 1 stop bit and no parity or handshaking (8N1).
Distances are output as a 2 byte binary number. You can identify which byte you are reading by looking at the most significant bit. If
the MSB is not set then you have received the low byte, if the MSB is set then you have received the high byte. The high byte is
always sent first for an individual reading. The remaining 7 bits in each byte combine to make a 14 bit distance reading in
centimetres.
Composition of a reading:
Reading bits
High byte bits
Low byte bits
Example of converting the high and low bytes into a reading:
Reading = ((Byte_H & 0x7F) * 128) + (Byte_L & 0x7F)
Setting
4: Serial port baud rate
9600 ... 1440000 bps
5: Serial port output rate
39 ... 20010 readings / sec
The "4: Serial port baud rate" selection toggles through all the standard baud rates from 9600 to 1440000.
The "5: Serial port output rate" setting allows the output rate of the serial port to be set to any value within the limits imposed by
the exposure time. Values will also be limited by the serial port baud rate.
SF20 Rangefinder - Product manual - Revision 8

Figure 6 :: Serial interface connections

Byte
High byte
Low byte
13
12
11
10
9
8
6
5
4
3
2
1
Values
Selects the baud rate for the serial port.
Sets the rate at which new results are output from the serial port when
it is selected using "1: Output type".
If the chosen serial baud rate is too low then this value will be limited.
The maximum value is limited to the "2: Exposure time" setting.
|
|
9
of
14
© LightWare Optoelectronics (Pty) Ltd, 2018
SF30 Accelerated laser rangefinder
Description
MSB (Bit 7) set to 1.
MSB (Bit 7) set to 0.
7
6
5
4
3
2
0
6
5
4
3
2
Description
Product manual
1
0
1
0
|
www.lightware.co.za

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sf30 seriesSf30/c

Table of Contents