cancel
Showing results for 
Search instead for 
Did you mean: 

st25dv04k address to send

HKhan.4
Associate II

Good day 

I am currently trying to get a st25dv04k running on an nrf9160dk using i2c. At the moment i'm having trouble 'waking' up the slave as i'm not sure what address to send the startup condition to. Please assist if possible.

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
JL. Lebon
ST Employee

Hi,

Actually, what you call the devSelCode is the slave address. It is coded on 7 bits and you have to add the LSB bit to 0 or 1 depending if you want to do a read or a write. This is how I2C works.

Here is the I2C signals with the values you should put in bits:

0693W00000WI1WNQA1.pngBest reagrds.

View solution in original post

5 REPLIES 5
JL. Lebon
ST Employee

Hello,

You can find this information in the datasheet, on chapter "6.3 Device addressing"

The ST25DV04K has tow I2C slave addresses:

  • A7/A6 to access the user memory (A7 to read and A6 to write)
  • AF/AE to access the system memory (AF to read, Ae to writer).

Best regards.

HKhan.4
Associate II

Thank you!

so I would write the device selection code to A6?

JL. Lebon
ST Employee

Yes if you want to write into user memory.

Your I2C command would look like this

Start/0xA6/Ack/MSB of memory address/Ack/LSB of memory address/Ack/your data.../Ack/Stop

Best regards.

HKhan.4
Associate II

HI again

My intention is to just try and receive an ACK bit back from the device to prove that the connection exists. So just for clarity , I need to write devSelCode[8] = {1, 0, 1, 0, 0, 1, 1, 0}; to which slave address ?

JL. Lebon
ST Employee

Hi,

Actually, what you call the devSelCode is the slave address. It is coded on 7 bits and you have to add the LSB bit to 0 or 1 depending if you want to do a read or a write. This is how I2C works.

Here is the I2C signals with the values you should put in bits:

0693W00000WI1WNQA1.pngBest reagrds.