AnsweredAssumed Answered

How to write to the ADIS16223 CAPT_CTRL register

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

CAPT_CTRL register is both read and write. I am OK reading it but would like some help on setting it.

 

I read it by sending

========

  writeCommand[0] = 0x1C;
  writeCommand[1] = 0x00;
  delayMicroseconds (d_DELAYTIME_MICROS) ;
  wiringPiSPIDataRW (ce, writeCommand, 2);

 

  delayMicroseconds (d_DELAYTIME_MICROS) ;
  Result[0]=writeCommand[0];
  Result[1]=writeCommand[1];   
 
  writeCommand[0] = 0x1C;
  writeCommand[1] = 0x00;
  wiringPiSPIDataRW (ce, writeCommand, 2);  
  Result[2]=writeCommand[0];
  Result[3]=writeCommand[1];

========

The above works fine for reading but how can I write to the register?

I see the data sheet explains this in "Table 15. CAPT_CTRL Bit Description" and just above that table but I am not sure exactly what byte to send / receive.

Examples of byte sending to set CAPT_CTRL to 0x20 and byte sending to set CAPT_CTRL to 0x00 would be much appreciated.

Outcomes