2022-11-04 12:49 AM
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
Solved! Go to Solution.
2022-11-10 06:49 AM
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:
Best reagrds.
2022-11-07 02:22 AM
Hello,
You can find this information in the datasheet, on chapter "6.3 Device addressing"
The ST25DV04K has tow I2C slave addresses:
Best regards.
2022-11-09 03:22 AM
Thank you!
so I would write the device selection code to A6?
2022-11-09 08:49 AM
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.
2022-11-10 12:23 AM
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 ?
2022-11-10 06:49 AM
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:
Best reagrds.