MMA8452Q

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MMA8452Q

438 Views
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 Kudos
1 Reply

346 Views
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 Kudos