AnsweredAssumed Answered

ADIS16223 Why are the XYZ results of a static unit so high?

Question asked by StephanB on Sep 7, 2017
Latest reply on Sep 12, 2017 by NevadaMark

Why are the XYZ results of a static unit so high? The results do not look correct.

The code I use is:-

#define d_DELAYTIME_MICROS 20

          delayMicroseconds (d_DELAYTIME_MICROS) ;

          writeCommand[0] = 0xBF;

          writeCommand[1] = 0x08;

          wiringPiSPIDataRW (ce, writeCommand, 2);

          delay(30); //30ms

 

          ReadCAPTReg();  //Reads the registers

          for(int i=0; i < 1024;i++)

          {

            delayMicroseconds (d_DELAYTIME_MICROS) ;

            writeCommand[0] = 0x14; 

            writeCommand[1] = 0x00; 

            wiringPiSPIDataRW (ce, writeCommand, 2);          

            ValueX[i] = BitShiftCombine(writeCommand[0],writeCommand[1]);            

          }

I do the same loop for Y & Z but use the respective commands 0x16 and 0x18

I am running in default mode with NULL_X, NULL_Y and NULL_Z are Zero. Included below is Registers and raw data XY&Z

The XY Z values are raw. To get to G I divide by 210 but this would make the G force far too high for being still on my desk.

 

 

DIAG_STAT=80

Supply=3.239738 v

Temperature=22.556391 c

PeakX=-799 (raw)

PeakY=-750  (raw)

PeakZ=391  (raw)

CAPT_PNTR=0

NULL_X=0

NULL_Y=0

NULL_Z=0

CAPT_CTRL=32 (0x20)

CAPT_PRD=0

Record

X Raw

Y Raw

Z Raw

0

0

-293

-505

1

-342

-440

179

2

-473

-310

261

3

-456

-456

65

4

-342

-456

49

5

-261

-424

16

6

-326

-505

98

7

-359

-212

98

8

-391

-310

163

9

-244

-293

114

10

-310

-163

65

11

-407

-212

-81

12

-310

-277

-33

13

-391

-130

16

14

-407

-342

114

15

-473

-456

16

16

-293

-587

-179

17

-293

-505

-114

18

-277

-473

-163

19

-456

-521

0

20

-326

-326

81

21

-456

-440

33

Outcomes