Advanced
Register Protocol
– The SPI bus master lowers the CS line.
– The SPI bus master initiates a series of SPI bus transactions, where the number of individual
8-bit transfers is equal to the count previously specified, plus one additional transfer for a CRC
value transmitted by the nav-sensor.
– The SPI bus master raises the CS line to complete the read sequence.
CRC Calculation
The SPI protocol requires use of a
(CRC) allowing the detection of corrupted data
transmission over the high-speed SPI bus. Each SPI protocol message must end with a byte containing the
CRC value.
The SPI protocol uses a 7-bit CRC with a polynomial value of 0x91.
For example code to calculate the CRC value, please see Line 445 of the
navX-sensor Register Data Types
All multi-byte registers are in
format.
All registers with ‘signed’ data are
Data Type
Range
Byte Count
Unsigned Byte
0 to 255
1
Unsigned Short
0 to 65535
2
Signed Short
-32768 to 32768
2
signed hundredths
-327.68 to 327.67
2
Unsigned Hundredths
0.0 to 655.35
2
Signed Thousandths
-32.768 to 32.767
2
Signed Pi Radians
-2 to 2
2
-32768.9999 to 32767.9999
4
Unsigned Long
0 to 4294967295
4
*Unsigned Hundredths: original value * 100 to rounded to nearest integer
*Signed Hundredths: original value * 100 rounded to nearest integer
*Signed Thousandths: original value * 1000 rounted to nearest integer
*Signed Pi Radians: original value * 16384 rounded to nearest integer
navX-sensor Register Map
Address (Hex)
Name
Access
Range/Data Type
88