Kauai Labs navX2-MXP User Manual page 90

Robotics navigation sensor
Table of Contents

Advertisement

Advanced
Register Protocol
When accessing the navX-sensor via the SPI bus, this following pattern is used:
– When the SPI bus master is not communicating with the navX-sensor, the SPI bus master must hold the
chip select (CS) line high.
– The SPI bus master lowers the CS line.
– The SPI bus master next transmits the register address it intends to read from or write to. If writing, the
upper bit (0x80) must be set; if this upper bit is clear, this indicates a read transaction.
– If the SPI bus master is reading, it next transmits the count of registers it wishes to read from. This
count must be at least 1, and must be not exceed the maximum register address less the requested register
address.
– If the SPI bus master is writing, it transmits the register value to be written to the specified register
address.
– The SPI bus master finally transmits an 8-bit CRC (see CRC calculation section below) which is
calculated on the register address and count values previously transmitted.
– If the SPI bus master is writing, it raises the CS line to complete the write sequence.
– If the SPI bus master is reading:
– The SPI bus master raises the CS line.
– The SPI bus master delays for 200 microseconds, giving the navX-sensor sufficient time to prepare for
the upcoming SPI bus transaction.
87

Advertisement

Table of Contents
loading

Related Products for Kauai Labs navX2-MXP

Table of Contents