Spi Message Overview; Spi Clock Phase And Polarity; Sensor Spi Module Reset - Ladybug LB5900 Series Interface Manual

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

Advertisement

SPI Message Overview

LB5900 sensors utilize textual SCPI (Standard Commands for Programmable Instruments)
commands. Commands are detailed in LadyBug's LB5900 Programming guide. Commands sent
to; and data received from the sensor are encoded as ASCII text; however the command header,
described below is binary along with the status byte.

SPI Clock Phase and Polarity

LadyBug sensors utilizes full-duplex SPI communication. Clocking mode / phase is an accepted
standard mode based on the clock's polarity (CPOL) and phase (CPHA). The term phase indicates
whether the bit-data is to be read on the leading or trailing edge of the clock; while the term
CPOL indicates the base, or off state of the clock.
With LB5900 sensors, the clock standby condition is on or V+, and data is captured on the trailing
edge of the clock. This is indicated as "Capture" in the timing diagram in Figure 18, which details
the sensors CPOL=1 and CPHA=1 SPI timing.
The clock is always generated by the master (user controller) and both the master and sensor
capture data on the trailing clock edge. The data state is expected to be stable for both ends of
the SPI connection when the clock transition occurs.
Figure 18 – Sensor Bit Timing Diagram
For the master (user controller) to receive data from the sensor, it must generate the clock, the
sensor will synchronize the return data with this clock. Normally, the master accomplishes this by
sending irrelevant data, often 0's, to its SPI module. The SPI module generates the clock signal. If
zeros are sent, the MOSI line remains at 0 during the transmission.

Sensor SPI Module Reset

●In SPI Mode, while the clock line remains in the inactive state, pulsing the Slave Select line low
twice for 1ms resets the Sensor's SPI module and issues a sensor DCL command. Refer to Figure
19, SPI Module Reset. This should be done at power up to eliminate erroneous data. The module
can also be reset by holding the Slave Select line low for greater than one second while the clock
DOC: SPII2CHDWBrief - V2.71 07/25/2017
PAGE 22

Advertisement

Table of Contents
loading

Table of Contents