已回答假定已回答

问题: ADXL345数据读取问题?请各位大虾帮忙啊!!急!!

Run 在 2012-12-26 詢問的問題
最後回覆由wangmigooo於2013-1-13提供

我采用的方法是用4线spi方式,I/O口模拟通信
采用块读取方式,即连续读取X0,X1,Y0,Y1,Z0,Z1数据
数据格式为13位全分辨率,右对齐,1600hz采样,正常工作模式,
现象:1,
目前我读取寄存器0x00值为0xE5,正确,
同时读取我配置好的寄存器的值也是正确的
但是我读取加速度信息时,返回的数据很奇怪,波动很大,乘以系数3.9后根本得不到静止放置的1g
2,
正负轴的趋势是正确的,但是特别是Z轴,返回的数据很大,DATAZ1大都是0x0A ,0x08,0x06, 0x04这些值 ,跟符号位对应不上。
符号位应该为全是1或者全是0,这个理解正吧??
3,
我采用单独读取X0,X1,Y0,Y1,Z0,Z1数据,和我用块读取,所返回的数据大小不一样,有数据对比,见附件。
4,
我没有配置FIFO寄存器,这个会不会对我采集数据有影响?? 必须要配置这个寄存器吗??
5,
对数据速率选择上有没有什么要求,需要特别注意什么??

 


ACC_DATAx, ACC_DATAy,
ACC_DATAz

 

*****************Z轴朝上**************************
-499.200012,
-4013.100098, -126921.601562
998.400024, -1704.300049,
-127795.203125
-241.800003, -7008.299805, -95846.398438
-31.200001,
-3482.699951, -127795.203125
-787.799988, -5011.500000,
-95846.398438
-1505.400024, -3014.699951, -95846.398438
-1248.000000,
-2640.300049, -94972.796875
-1536.599976, 6021.600098,
-127420.796875
-1193.400024, -3732.300049, -127420.796875
-70.199997,
-1517.099976, -127795.203125
-1505.400024, -2016.300049,
-95347.203125
-694.200012, -50.700001, -127795.203125
-748.799988,
-3576.300049, -126921.601562
-631.799988, -5011.500000,
-126921.601562
-1630.199951, -955.500000, -127795.203125
-1029.599976,
-3295.500000, -95721.601562
-1006.200012, -1049.099976,
-127545.601562
-1372.800049, -7445.100098, -94972.796875
-499.200012,
-5729.100098, -95347.203125
-226.199997, -5073.899902,
-126921.601562
-1879.800049, -2109.899902,
-127795.203125

 

*******************Z轴朝下**************************
-725.400024,
-5510.700195, 95846.398438
-335.399994, -2078.699951,
64771.199219
-795.599976, -3014.699951, 95846.398438
-1443.000000,
-4980.299805, 64771.199219
-1248.000000, 5990.399902,
95846.398438
-1996.800049, 6988.799805, 64646.398438
-694.200012,
-5011.500000, 95971.203125
-1029.599976, 3244.800049,
64022.398438
-265.200012, -6945.899902, 96720.000000
-507.000000,
-3014.699951, 64022.398438
-397.799988, -3014.699951,
64396.800781
-631.799988, -7819.500000, 64771.199219
-62.400002,
-4231.500000, 96720.000000
-1630.199951, 3463.199951,
95846.398438
-257.399994, -3014.699951, 95846.398438
-1505.400024,
-3888.300049, 96720.000000
-1411.800049, 3494.399902,
96220.796875
-1879.800049, 2090.399902, 95971.203125

結果