MMA8452Q

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MMA8452Q

481 次查看
abulhasan
Contributor I

Dear all,

     Here I am just trying to communicate the MMA8452Q through I2C from Kinetis K40. The device address is given as 2A in WHO_AM_I register. But in the Datasheet of MMA8452Q they have given the device address as 0x3A and 0x3B. What is the actual device address to be programmed in the I2C1_D register in K40. Also pls let me know thw use of SA0 pin or bit.

Regards

Abulhasan

0 项奖励
回复
1 回复

389 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Abulhasan,

The MMA8452Q datasheet with below I2C device address:

MMA8452Q.jpg

You also could refer Kinetis TWR-K60D100M board I2C example code, which SA0 value is 1 and MMA8451Q device address is 0x1D.

For the I2C communication, it use below definition:

#define I2C_ADDR_MMA8451 (0x1d<<1)

The TWR-K60D100M  board I2C example code can be downloaded from below link:

KINETIS512_V2_SC:

K60_100: Kinetis K60 Ethernet Crypto 100 MHz MCUs

Wish it helps.

B.R.

Ma Hui

0 项奖励
回复