AnsweredAssumed Answered

Please help the adis16000 use.

Question asked by gony on Jun 18, 2015
Latest reply on Jun 24, 2015 by NevadaMark

Dear Mr.

By using a wandboard, I connect the ADIS16000 and ADIS16229.

so not really well.

The sensor data doesn't read.

You set a regster to any kind of order, and please inform a sensor whether I can connect.

I attach under code.

Please tell if there is the sample code.

 

        //wireless vibrator

           int i, value = 0x0;

           unsigned short reg;

 

           //page0 <- channel0

           spi_regwrite(0, 0x0, 0x0);

           sleep(1);



           LOGD("=== page0 ====");
           //read page0 -> defualt data

           for (i = 0; i < 0x2e/2; i++) {

                  reg = spi_regread(0, value);

                  LOGD("0x%02x : 0x%04x\n", value, reg);

                  value += 0x2;

           }

 

           //add sensor

           spi_regbytewrite(0, 0x12, 0x1);//0x9201

           usleep(700000);

           spi_regbytewrite(0, 0x14, 0x1);//cmd_data ->node1


           sleep(10);


           //dual Memory I/F

           spi_regbytewrite(0, 0x12, 0x2);//0x9202

           spi_regbytewrite(0, 0x13, 0x10);//0x9310



    // read page0
           LOGD("=== page0 ====");

           value = 0x0;

           for (i = 0; i < 0x2e/2; i++) {

                      reg = spi_regread(0, value);

                      LOGD("0x%02x : 0x%04x\n", value, reg);

                      value += 0x2;

           }

           // read page1
           LOGD("=== page1 ====");

           spi_regwrite(0, 0x0, 0x1);

           value = 0x0;

           sleep(1);

           for (i = 0; i < 0x6e/2; i++) {

                      reg = spi_regread(0, value);

                      LOGD("0x%02x : 0x%04x\n", value, reg);

                      value += 0x2;

           }

Outcomes