Hello,
I am trying to use the arduino SPI interface to read the ADIS16080 gyro. I have done other projects with SPI and haven't had any problems but I have been struggling with this all day and need some help. After hours of trying to print the data I finally gave up and went to the oscilloscope. I was probing the sclk pin and noticed that when I took any print statements out of the program I got a nice square wave that repeated at the same frequency. However, when I put the print command into the code the signal doesn't seem to be occurring at the same frequency (slightly hard to tell since I have an analog scope). Also, the gyro doesn't have any sort of interrupt to tell the arduino that the data is ready (I don't know if this is normal for other SPI interfaces but I have seen it on a few).
Here is the main code:
void loop() {
int data = 0;
digitalWrite(chipSelect, LOW);
data = SPI.transfer(0x03)<<8;
data |= SPI.transfer(0x10);
digitalWrite(chipSelect, HIGH);
// Serial.println(data);
}
And that is after setting up the gyro in setup().
Are there any common SPI interface issues that I am not aware of? Also I am not really sure how to determine the correct setClockDivider but I have tried it with all of the options and it didn't seem to make a difference in the output.
Thanks in advance for any help!