Interrupts on Razor IMU 9 DOF board

Hello everyone!

I’m currently working with a razor IMU 9 DOF board from sparkfun (https://www.sparkfun.com/products/10736).

The ITG3200 has a register (reg. 26) which reports interrupt status.
Indeed, in register 23 we can choose to activate an interrupt that rises when new data is available.

Here is the problem; I would like the onboard Atmega328 to generate an interrupt when the ITG’s interrupt has risen, in order to “never” miss newly available data.

I know how to generate an interrupt based on an external pin, but in this case I have no access to these pins.

Currently I run an IF-statement on the onboard Atmega to check if this interrupt has been triggered or not, as follows;

void loop()
{
  //Check if new data is available
  char int_status = itgRead(itgAddress, INT_STATUS);
  boolean rawDataReady = bitRead(int_status, 0);
  
  if (rawDataReady)
  {  
  //elapsedTime = micros() - startTime;   
  //Create variables to hold the output rates.
  int xRate, yRate, zRate;

  //Read the x,y and z output rates from the gyroscope.
  xRate = readX();
  yRate = readY();
  zRate = readZ();

  //Print the output rates to the terminal, seperated by a TAB character.
  Serial.print(xRate);
  Serial.print('\t');
  Serial.print(yRate);
  Serial.print('\t');
  Serial.println(zRate);  
  //Serial.println(elapsedTime);
  
  rawDataReady = 0;
  }
}

Thank you for reading this.

PS-ITG-3200-00-01.4.pdf (1.13 MB)

the 328 can be intrerrupted by any i/o pin. port interrupt - then poll pins of that port. See datasheet for the mcu

Thank you for your help.

So, I select one of the i/o pins and declare it as an interrupt pin. How do I link this pin with the interrupt-register of the ITG3200?

I'm not sure I'm very clear about my problem. The ITG triggers an interrupt in one of its registers. I want this interrupt to trigger an interrupt of the Atmega328. I don't know how to do this without having access to the external pins of the Atmega.

Hi Vink

In the schematic of that breakout board, the INT output pin from the ITG-3200 is not connected to anything. This seems to be confirmed by looking at the board layout file.

So you would need to modify the board to connect the INT output to one of the 328's input pins.

Regards

Ray

Thank you very much Ray for your help!