Ladybug LB5900 Series Interface Manual page 31

Power sensor, spi & i2c interface
Hide thumbs Also See for LB5900 Series:
Table of Contents

Advertisement

To the sensor: F000000EFREQ 1020 MHZ00
At this point, a 1ms delay can be added or a "Read Status and Length" loop reading the status can
utilized. For details on a "Read Status and Length" Loop refer to the READ? Command at the end
of this section.
#6 AVER:COUN 10
To the sensor: F000000DAVER:COUN 1000
At this point, a 1ms delay can be added or a "Read Status and Length" loop reading the status can
utilized. For details on a "Read Status and Length" Loop refer to the READ? Command at the end
of this section.
#7 READ?
Read initiates the measurement. Once complete the measurement will be read using Header 0Ch
Read Complete Output Buffer. Depending on the number of averages and other settings, making
the measurement will take a relatively long period of time. An estimated time will be utilized
before testing for measurement completion.
To the sensor: F0000006READ?00
A delay of 250ms is added at this point in the controller program because it is known that the
measurement will take at least that long.
Now test the sensor to see if the measurement is complete.
To the Sensor: 060000000000
Return if busy:FFE000000000 Sensor not Ready
Note: The returned second byte is shown as E0 however it could contain an error
Note: The measurement completion state is not available because the sensor is not ready
Return if Sensor Ready but measurement is not complerte:00E000000000
Return if Sensor Ready and measurement is complerte:00E010000010 (Hex)
A loop can be setup to return back before the 250ms delay to prevent excess measurement
interruption. Note that the ready return indicates that there are 16 bytes in the buffer.
●Get the measurement:
Send the header plus enough zeros to clock in the entire 16 byte message and terminator. In the
example below, the first of the return bytes ("-") was clocked in by the last of the 4 byte header
and an additional 15 bytes must be send to read back the 16 byte message.
●To the Sensor (in HEX): 0C000010000000000000000000000000000000
Return: 00E010-6.84101868E+0100 Note: Bold indicates hex pair
Measurement value: -6.84101868E+01 Default units are dBm
DOC: SPII2CHDWBrief - V2.71 07/25/2017
Sets Averaging to 10
Makes the measurement
Send all 6 bytes
PAGE 31

Advertisement

Table of Contents
loading

Table of Contents