Multiple SPI Devices

The RoboRio SPI connector indicates 4 chip-select lines. Our team would like to run 2 gyros. Is there a driver available that allows use of other than CS_0? If there is a link to the source code could someone please provide it.

Thanks

What is the brand and part number for the gyros?

Some pre-written drivers hard-code this (not much that can be done), some allow it to be configured.

Although you didn’t ask, I’m curious - why two gyros?

1 Like

The ADXRS450 built into wpilib allows you to choose any of the chip selects.

Analog devices 450 and 453

How do we select a chip select other than zero? In terms of the code. The 450 and 453 are identical with respect to registers, commands, etc… The 453 does not have the connector.

Correct, the 450 and 453 are identical in registers and behavior - only the vibration rejection is different.

You’ll definitely need to wire a custom connector. Page 13 of the roboRIO manual shows the SPI connector pinout, including all four chip select lines.

On the software side, This constructor is the one where you can designate which chip select port each gyro should use.

Thanks. The connector changes are a given. Thanks for the info on the constructor. We will check it out.