DOC: SPII2CHDWBrief - V2.71 07/25/2017
PAGE 23
line remains in the inactive state.
Figure 19 - SPI Module Reset
Data format
SPI utilizes hardware sensor addressing. The first data sent to the sensor is the command header,
described next.
Command Header
All commands sent to the sensor include a binary-formatted header preceding the SCPI
command or data. The first byte of the Command Header (Header) indicates how the message
and any following sensor response will be handled. Figure 20 details the SPI Command Headers.
Figure 20 – SPI Command Header Table
Commands with no required response can be sent with a single communication if the sensor is
not busy. Busyness detection is recommended. Queries require at least two communications,
one to start a function, such as a measurement, then a second to read back the resultant data.
After the request is made to the sensor, the master (user controller) is required to allow
sufficient time for the sensor to process the function prior to requesting data. During the time
the sensor is processing data, the master can address other sensors. For example, a routine could
be created to start measurements on two sensors, then go back and read each one after a period
of time has elapsed. Busyness detection is recommended in all cases.
Previous SPI communication status
Command Header & Data Description
Length
Header
Write Command. Causes the sensor to execute the SCPI
command that follows the header. Data returned with the
command includes the Busy/Ready byte & previous
communication status.
4 bytes plus
command &
terminator
F0h
Read Status & Length. Returns the Busy/Ready byte, previous
SPI status, sensor status byte and the number of bytes that are
in the buffer ready to read.
6 bytes total
06h
Read Complete Output Buffer. Returns the complete output
buffer (up to 4096 bytes including terminator). The buffer will
be purged upon completion. Shortest buffer is 2 bytes long.
3 bytes plus the
buffer contents
(buff minimum 2)
Total Minimum 5.
0Ch