VN-200 User Manual
UM004
www.vectornav.com
18/47
error codes are listed in Table 20 in Section 4.5. The remaining three 4-byte words are the yaw, pitch,
and roll respectively given as single-precision floating-point numbers. The floating-point numbers are
consistent with the IEEE 754 standard. On the third SPI transaction, 16 bytes are clocked on the SCK
line, during which zeros are sent by the master as no further data is required from the sensor. These 16
bytes are clocked out the SPI for the sole purpose of reading the response from the previous read
register 13 command. The response consists of four 32-bit words, starting with the zero byte, the
requested command byte, register ID, error code, and three single-precision floating-point numbers. If
only one register is required on a regular basis then this can be accomplished by sending the same
command twice to the VN-200. The response received on the second transaction will contain the most
up to date values for the desired register.
SPI Transaction 1
Line
Bytes
Description
SCK
16 bytes
MOSI
01 08 00 00 00 00 00 00 00 00 00 00 00 00 00
00 (shown as hex)
Read register 8 (Yaw, Pitch, Roll)
MISO
00 01 08 00 39 8A 02 43 FD 43 97 C1 CD 9D 67
42 (shown as hex)
Yaw, Pitch, Roll = +130.54, -18.91, +57.90
SPI Transaction 2
Line
Bytes
Description
SCK
16 bytes
MOSI
01 08 00 00 00 00 00 00 00 00 00 00 00 00 00
00 (shown as hex)
Read Register 8 (Yaw, Pitch, Roll)
MISO
00 01 08 00 C5 9A 02 43 51 50 97 C1 32 9A 67
42 (shown as hex)
Yaw, Pitch, Roll = +130.60, -18.91, +57.90
At first the device would be initialized by sending the eight bytes 01 08 00 00 00 00 00 00, requesting a
read of the yaw, pitch, roll register. The response from the second transaction would be the response to
the requested yaw, pitch, roll from the first transaction. The minimum time required between SPI
transactions is 50 µs.