Communication Examples; Measurement Example - Ladybug LB5900 Series Interface Manual

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

Advertisement

Communication Examples

The following examples detail communications between the User Controller and LB5900 sensor
in SPI mode. The commands information is detailed in Hex data form in full bytes with bit data
flow not shown. Please refer the SPI message information for bit flow, clocking and additional SPI
enable information.
Each SPI transaction is started when the SS (active low) line is enabled (lowered). The complete
transaction is made, and then the SS line returned to the inactive level (high), completing the
transaction.

Measurement Example

The measurement example includes measurement setup, initiation of the measurement and reading
back the data.
The following commands will be utilized in the order shown.
# 1 SYST:PRES DEF
#2 TRIG:DEL:AUTO 0
#3 INIT:CONT 0
#4 AVER:COUN:AUTO 0
#5 FREQ 1020 MHZ
#6 AVER:COUN 10
#7 READ?
Sending the commands
It is recommended that Command Header 06h, Read Status and Length be utilized prior to sending
each command. This will assure that the sensor is ready to accept the command. This is
recommended because commands can be sent much faster than the sensor can process them.
To the Sensor: 060000000000
Return if busy:FFE000000000 DO NOT SND COMAND-WAIT UNTIL REDY
Note the returned second byte is shown as E0 however it could be different and contain an error
Return if ready:00E000000000 SENSOR CAN ACCEPT A COMAND
Note the returned second byte is shown as E0 however it could be different and contain an error
The commands:
#1 SYST:PRES DEF
To the Sensor: F000000ESYST:PRES DEF00
Expected return:00E000000000000000000000
DOC: SPII2CHDWBrief - V2.71 07/25/2017
Clears any settings
Turns off Trigger delay
Sets the sensor for single triggered measurements
Turns off automatic averaging
Sets the frequency
Sets Averaging to 10
Makes the measurement (Repeat as needed)
Send exactly 6 bytes
Sets the sensor to a known state
PAGE 29

Advertisement

Table of Contents
loading

Table of Contents