Check program for LIS3DH bug fixed rev.
I fixed bugs in my library LIS3DH and updated it as Rev.7. This is a check program for LIS3DH lib.
Followings are PC console output data.
003854,new,[m/s2],-0.1079,+0.1177,+9.3457,[mg], -10, +14, +957 003855,new,[m/s2],-0.0588,+0.0686,+9.3555,[mg], -9, +11, +956 003856,new,[m/s2],-0.0686,+0.0883,+9.3163,[mg], -11, +8, +953 003857,new,[m/s2],-0.0981,+0.1275,+9.3752,[mg], -9, +13, +953 003858,new,[m/s2],-0.0981,+0.0294,+9.3457,[mg], -13, +10, +953
In addition, you can see reg. contents.
LIS3DH ultra low-power high performance 3-axes 'nano' accelerometer STATUS_AUX=0xff OUT_ADC1_L=0x00, OUT_ADC1_H=0x00 OUT_ADC2_L=0x00, OUT_ADC2_H=0x00 OUT_ADC3_L=0x00, OUT_ADC3_H=0x00 INT_COUNTER_REG=0x00 WHO_AM_I=0x33 TEMP_CFG_REG=0x00 CTRL_REG1=0x47, CTRL_REG2=0x00, CTRL_REG3=0x00 CTRL_REG4=0x08, CTRL_REG5=0x00, CTRL_REG6=0x00 REFERENCE=0x00 STATUS_REG=0xff OUT_X_L=0xc0, OUT_X_H=0xff OUT_Y_L=0x10, OUT_Y_H=0x00 OUT_Z_L=0x60, OUT_Z_H=0x3b FIFO_CTRL_REG=0x00, FIFO_SRC_REG=0x20 INT1_CFG=0x00, INT1_SOURCE=0x00, INT1_THS=0x00, INT1_DURATION=0x00 CLICK_CFG=0x00, CLICK_SRC=0x00, CLICK_THS=0x00 TIME_LIMIT=0x00, TIME_LATENCY=0x00, TIME_WINDOW=0x00
Here is meaning of data.
<Setting condition> STATUS_AUX=0xff -> new data are avairable but all data are over-run condition OUT_ADC1_L=0x00, OUT_ADC1_H=0x00 OUT_ADC2_L=0x00, OUT_ADC2_H=0x00 OUT_ADC3_L=0x00, OUT_ADC3_H=0x00 -> all ADC data are Zero INT_COUNTER_REG=0x00 -> ? WHO_AM_I=0x33 -> I'm LIS3DH TEMP_CFG_REG=0x00 -> ADC: disabled, Temperature sensor (T): disabled CTRL_REG1=0x47 -> Data rate selection: 50Hz, Low power mode: disabled, XYZ axes: all enabled CTRL_REG2=0x00 -> High pass filter mode selection: normal, Filtered data selection: internal filter bypassed High pass filter: bypassed CTRL_REG3=0x00 -> All kinds of interrupt: disabled CTRL_REG4=0x08 -> Block data update:continuos update, Big/little endian data selection: Data LSB/lower address Full scale selection. default value: +/-2G, High resolution output mode: disabled CTRL_REG5=0x00 -> FIFO disable CTRL_REG6=0x00 -> ? REFERENCE=0x00 -> Reference value for Interrupt generation=0 STATUS_REG=0xff -> new data are avairable but all data are over-run condition OUT_X_L=0xc0, OUT_X_H=0xff -> 0xffc0 -> -64/16 -> -4 OUT_Y_L=0x10, OUT_Y_H=0x00 -> 0x0010 -> 16/16 -> 1 OUT_Z_L=0x60, OUT_Z_H=0x3b -> 0x3b60 -> 15200/16 ->950 FIFO_CTRL_REG=0x00 -> FIFO mode selection: bypassed FIFO_SRC_REG=0x20 -> FIFO: empty INT1_CFG=0x00, INT1_SOURCE=0x00, INT1_THS=0x00, INT1_DURATION=0x00 -> Interrupt related reg's are not used CLICK_CFG=0x00, CLICK_SRC=0x00, CLICK_THS=0x00 -> Click action: not used TIME_LIMIT=0x00, TIME_LATENCY=0x00, TIME_WINDOW=0x00 -> Click related reg's are nit used