AnsweredAssumed Answered

Interpreting Hex Messages Sent to ADXL375

Question asked by agh5az on Feb 1, 2016
Latest reply on Feb 4, 2016 by neilzhao

I am working with an ADXL375 (including Eval Board) and am having trouble interpreting some of the hexadecimal messages that are passed to the latency, window, and registers. I downloaded example code for the accelerometer which contained the following lines:


  //Set the Tap Threshold to 3g

  writeRegister(THRESH_TAP, 0x38);

  //Set the Tap Duration that must be reached

  writeRegister(DURATION, 0x10);


  //100ms Latency before the second tap can occur.

  writeRegister(LATENT, 0x50);

  writeRegister(WINDOW, 0xFF);


However, I'm having a hard time understanding how the hexadecimal messages sent to the ADXL375 create the desired settings on the accelerometer. For instance how does writing 0x38 to the THRESH_TAP register indicate that the accelerometer should be set to 3g's? I recognize that there is a scale factor of 780mg/LSB, but what calculations were used when arriving at 0x38 as the solution?


The same confusion applies for each line of code. If anyone can help, I would greatly appreciate it!