Question asked by vindhyachal.takniki@gmail.com on Dec 27, 2014
Latest reply on Jan 6, 2015 by neilzhao

I have interfaced ADXL375 & I have some below. I have attached the code.

1. The offset I am getting is huge.

It is 1g approx on both x & y axis & 1.5g on z-axis.

I don't know what could be problem. I read offset registers , they are all zero in ADXL375.

He had removed the IC & resoldered new one & problem gone.

But I wan't to know what could be exact reason?

2. For ODR <= 800Hz, we multiply register value with 49 to get g value i.e:

g = (register_value * 49)

But when OCR = 1600 or 3200Hz, what is the factor.

I had red in datasheet that in this case LSB is always zero. So what will be coversion factor or it will remain same = 49.

3. I had calibrated the adxl375 by placing it in z = +1g & other axis = 0.

But I have seen example in which calibrate in all six axis is done:

But how to calculate final offset from these six offset values?

Or should I take there average.

4. Edit: I have been able to read DEV id properly & SPi speed is 3.75Mhz.

[CODE]

void main(void)

{

while(1)

{

//take 100 samples & average

x_val *= 49;

y_val *= 49;

z_val *= 49;

//offset for x:1274 , y: 1225 , z:1597

}

}

{

uint8_t values[6];

uint32_t error

*x_val = (s16_t)( ((u16_t)values[1] << 8U) | ((u16_t)values[0]) ) ;

*y_val = (s16_t)( ((u16_t)values[3] << 8U) | ((u16_t)values[2]) ) ;

*z_val = (s16_t)( ((u16_t)values[5] << 8U) | ((u16_t)values[4]) ) ;

}

{

uint8_t data;

SPI_MODE(3);

if(0xe5 != data)

{

error_trap();

}

/* power ctrl */

}

{

}

{

uint32_t cnt;

if(no_bytes > 1U)   /* for multi read bit 6 is also set */

{

}

/* sent bytes */

for(cnt = 0U ; (cnt< no_bytes) ; cnt++ )

{

}