Command Header - Ladybug LB5900 Series Interface Manual

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

Advertisement

Command Header

●Messages sent to the sensor contain a binary-formatted header containing four bytes that are
sent immediately following the address byte. The first byte (Command Header) indicates how the
message and any following I2C reads will be handled. For example, if the master (user controller)
needs to read sensor status, the Command Header value of 06h should be written to the sensor;
the following read will return the status plus the length of any available data. Command Header
values are detailed in the table below. After the communication, a stop condition initiates the
command and causes the sensor to prepare as indicated. The next command can read back the
data, status, or execute the indicated command.
Command Header Description
●Send (write to sensor) Command plus Prepare Status & Length for the next
read back. Sends the SCPI command that follows the header and data length
and causes the sensor to prepare the status byte and the number of bytes
that are ready to be returned. If no SCPI command is included, causes the
sensor to prepare the status byte & number of bytes that are ready to be
returned by the sensor.
Direction (address byte R/W ̅ bit): 0 - Write to sensor
●Send (write to sensor) Next Read is Complete Output Buffer (Note: this
command does not read). Causes the sensor to prepare to send the entire
buffer on the next read. The buffer will be purged upon completion.
Direction (address byte R/W ̅ bit): 0 – Write to sensor
Note that reading data back from the sensor is done following one of the above commands and
is detailed below with each command header explanation.
DOC: SPII2CHDWBrief - V2.71 07/25/2017
Figure 10 – I2C Command Header Table
Header Value
06h
0Ch
PAGE 14

Advertisement

Table of Contents
loading

Table of Contents