Hi.
I am using a KXTJ3-1057 accelerometer with an MSP430G2533.
Using I2C, I can read the device ID (WhoAmI) and it appears I can write to the device. The I2C waveform looks fine on the oscilloscope with its I2C decode function.
InitI2C(MEMS_ADDR);
memsData[0] = 0x22; // Set CTRL_REG1: Standby mode, low current, acceleration data as interrupt, Range +/-2g, Wake-up function enabled
I2C_Master_WriteReg(MEMS_ADDR, 0x1B, memsData, 1);
memsData[0] = 0x18; // Set INT_CTRL_REG1: Physical interrupt pin enabled, polarity active high, interrupt pin latch until cleared by reading INT_REL, no self test polarity
I2C_Master_WriteReg(MEMS_ADDR, 0x1E, memsData, 1);
while(1);
The attached code should set the accelerometer's interrupt to trigger, but it does not when I move or shake the device. The interrupt output is always low. I don't know why and I have spent hours trying to find out why. The schematics are attached. On the MSP430, port 2.6 is set for interrupt triggering on a falling edge, set as an input with an internal pullup resistor.
This is a long shot, but anyone who has had to use a KXT accelerometer, might know what is wrong. I will owe you a beer if you can help solve this.
It is unfortunate I had to use this part. It was due to the global chip shortage - it was the only one we could get. In retrospect I would have used an ST or even a TI accelerometer, but it is too late now.