Hi Alex,
Just a small issue with ITG3200 driver. The ITG3200 requires some delay after reset to stabilize values (10msec by datasheet, as I remember). Currently we do not have any delay before we starting calibration. As a result calibration not always succesfull. (sometimes I had values 3-5 instead of zeros). To solve this I have just put delay(100) at the end of the initialization procedure. (10msec was not enough in my case, for some reasons)
Regards,
ziss_dm
1_pretet7: ITG3200 driver: Initialization issue
Re: 1_pretet7: ITG3200 driver: Initialization issue
Hi Ziss_dm ;
Can you post your mod to put delay ?
Thank you.
Fab
Can you post your mod to put delay ?
Thank you.
Fab
Re: 1_pretet7: ITG3200 driver: Initialization issue
i have same problem, i do a second calibration and is ok....
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: 1_pretet7: ITG3200 driver: Initialization issue
thanks for the advice:
the code mod is here:
the code mod is here:
Code: Select all
...
#if defined(ITG3200)
static uint8_t rawADC_ITG3200[6];
void i2c_Gyro_init() {
delay(100);
i2c_rep_start(0XD0+0); // I2C write direction
i2c_write(0x3E); // Power Management register
i2c_write(0x80); // reset device
i2c_write(0x16); // register DLPF_CFG - low pass filter configuration & sample rate
i2c_write(0x1D); // 10Hz Low Pass Filter Bandwidth - Internal Sample Rate 1kHz
i2c_write(0x3E); // Power Management register
i2c_write(0x01); // PLL with X Gyro reference
delay(100);
gyroPresent = 1;
}
...