This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2530模拟IIC读取三轴加速度传感器ADXL345的值

Other Parts Discussed in Thread: CC2530, CC2538

本人用CC2530模拟IIC读取三轴加速度传感器ADXL345的值,通过模拟的程序可以正确读取传感器ID的值0XE5,手动往其中可写的寄存器写一个值比如0xee,然后读出来也是对的,但是我读三轴对应的寄存器的值确实错误的,不知道什么原因,请大家帮忙分析分析可能引起此问题的原因。。谢谢了

水平放置在桌面的数据:

上面这是正确读数,下面是我的读数跟这个相差甚远的,错的离谱

 

 

我的代码在附件中

 

 

ADXL345.rar