VN-200 User Manual
UM004
www.vectornav.com
17/47
Figure 7 - SPI Data Diagram
A response for a given SPI command will be sent over the MISO line on the next SPI transaction. Thus
the data received by the Master on the MISO line will always be the response to the previous
transaction. For example, if Yaw, Pitch, Roll and Angular Rates are desired, then the necessary SPI
transactions would proceed as shown below:
SPI Transaction 1
Line
Bytes
Description
SCK
8 bytes
MOSI
01 08 00 00 00 00 00 00 (shown as hex)
Read register 8 (Yaw, Pitch, Roll)
MISO
00 00 00 00 00 00 00 00 (shown as hex)
No response
SPI Transaction 2
Line
Bytes
Description
SCK
16 bytes
MOSI
01 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00
(shown as hex)
Read register 13 (Angular Rates)
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 3
Line
Bytes
Description
SCK
16 bytes
MOSI
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
(shown as hex)
No command
MISO
00 01 13 00 00 F5 BF BA 00 80 12 38 B8 CC 8D 3B
(shown as hex)
Rates = -0.001465, +0.000035,
+0.004327
During the first transaction the master sends the command to read register 8. The available registers
which can be read or written to are listed in Table 21 in Section 5. At the same time zeros are received
by the master, assuming no previous SPI command was sent to the VN-200 since reboot. On the second
transaction the master sends the command to read register 13. At the same time the response from the
previously requested register 8 is received by the master on the MISO line. It consists of four 32-bit
words. The first byte of the first word will always be zero. The second byte of the first word is the type
of command that this transaction is in response to. In this case it is a 0x01, which means that on the
previous transaction a read register command was issued. The third byte of the first word is the register
that was requested on the previous transaction. In this case it shows to be 0x08, which is the yaw, pitch,
roll register. The fourth byte of the first word is the error code for the previous transaction. Possible