We are using the ADXRS453 evaluation board vs. the ADXRS450. The 450 has a default chip select of ‘0’ which can be changed with a jumper. For operation of two gyros (ADXRS453) we need to distinguish between CS0 and CS1 on the RoboRio connector. The registers of the two chips are essentially identical but the available constructors (at least at first glance) do not include an argument that specifies the chip select. Has anyone got a solution for this? Thanks
Looking at the documentation for the ADXRS450_Gyro
, there is a constructor ADXRS450_Gyro(SPI.Port)
, which allows you to specify an SPI.Port
enum. Among the possible values for this enum are SPI.Port.kOnboardCS0
to SPI.Port.kOnboardCS3
. I’ve never tried it, but I’m pretty sure you can use these to specify the CS.
The larger issue with trying to operate two gyros is there’s only a single auto SPI engine in the FPGA, which is what is used to collect the data from the gyro. So if you create two instances the second one won’t work. It’s possible to collect the data manually (which is what we did before auto SPI was available), but you’ll have to get the ADXRS450 Gyro class from before the auto SPI change and modify it. Also, the accuracy will be lower and the CPU usage significantly higher.
Why do you need two gyros?
If you’re using two gyros to track two different axes of rotation you might be better off going with a single tri-axis gyro due to the concerns Peter already mentioned above. If you’re wanting to average measurements between the two for better accuracy, then you might want to look at an IMU instead (ADI has two options on FIRST Choice, or the NavX or Pigeon are other options available outside just FIRST Choice if you don’t have any points left)
Peter:
Thanks for the clarification. We had mounted two gyros (for two axes of rotation) and the RoboRio connector led me to think that we had full SPI capability for up to 4 SPI devices. Fortunately, only one is essential. We’ll take the easy path and use one gyro.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.