2019-06-20 02:43 AM
Hello everyone!
I using STM8L050J3 and I wana read UID of DYNAMIC Tag ST25DV04K by I2C.
I've read in datasheet of ST25DV04K and saw that: Address I2C of ST25DV04K = 0xA6 or 0xAE.
I used those address in my program but I get this bug.
Please, Can you explain it for me?
Thanks,
Solved! Go to Solution.
2019-06-20 07:47 PM
Thanks @JL. Lebon_O
My Salave_Address = 0xAE.
This is bug of program:
When I connect to OLED and use Address OLED => Everything OK but use 0xAE or 0xA6 of ST25DV04K, I get this bug.
Best regards,
2019-06-20 06:10 AM
Hello,
What is your SLAVE_ADDRESS value in DYN_read_UID function? To read UID, it should be AEh (system memory.
Another point: in DYN_read_UID, you are using the I2C_SendData with an unit16. Please ensure that this function is sending the 2 bytes of the unit16 correctly (to read UID, you should send 00h, check for ack then 18h and check for ack. At the end, the I2C command should looks like: Start/AEh/00h/18h/Start/AFh/UID1/UID2/UID3/UID4/UID5/UID6/UID7/Stop
In the DYN_Write function, in the same way, 2 byte for memory address should be send after the device address (here the I2C_SendData function is sending only an uint8, which is different from the same function unsed in DYN_read_UID)
Best regards.
2019-06-20 07:47 PM
Thanks @JL. Lebon_O
My Salave_Address = 0xAE.
This is bug of program:
When I connect to OLED and use Address OLED => Everything OK but use 0xAE or 0xA6 of ST25DV04K, I get this bug.
Best regards,