kxtj2(psoc4m accelerometer)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

what is the device address or slave address of kxtj2(accelerometer of psoc4m)?

0 Likes
7 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Address is 0x0F.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is more information.

   

0 Likes
Anonymous
Not applicable

A lot many thanks for your help. but i am using KXTJ2,whereas in the above table mentioned it is for KXTJ3.

0 Likes
Anonymous
Not applicable

uint32 SCB_I2CMasterWriteBuf(uint32 slaveAddress, uint8 * wrData, uint32 cnt, uint32 mode);

   

how do we define the value of uint32 mode(parameter i.e transfer mode)?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Have a look into the datasheet, the valid values are shown there.

   

Writing to slave Count bytes
I2C_MasterWriteBuf(SlaveAddress,DataPtr,Count,I2C_MODE_COMPLETE_XFER);

   

Reading from Slave sending register/command byte first:
I2C_MasterWriteBuf(SlaveAddress,&RegAddress,1,I2C_MODE_NO_STOP);
I2C_MasterReadBuf(SlaveAddress,DataPtr,Count,I2C_MODE_REPEAT_START);

   


Bob

0 Likes
Anonymous
Not applicable

but the data type of mode is uint32..and it is showing error by using the above sent statements.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

but the data type of mode is uint32. Who cares? the conversion will (if needed) be done by the compiler

   

.and it is showing error by using the above sent statements. My magic crystal ball doesn't show any reason, Can you please provide us with your complete project so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes