2014-06-12 09:55 AM
Hi I am using an Arduino UNO board to make an application to read the data of my M24SR64 antenna using I2C protocol. The problem is that I don't know if I am already communicating with it. I know from the datasheet that the address to read from a M24SR64 is 0xAD.
Here is the code of the Arduino UNO so I can read the data&sharpinclude <Wire.h>void setup(){ Serial.begin(9600); Wire.begin(); Serial.println(eepromRead()); }void loop(){}byte eepromRead(){ Wire.beginTransmission(0xAD); // Opens I2C communication with M24SR64 Wire.write(0); Wire.endTransmission(); Wire.requestFrom(0xAD, 1); while(!Wire.available()) { } return Wire.read();}I have also read in the datasheet that in order to read an NDEF file I have to Send the SelectNDEFTagApplication command, Select the CC file, Read the CC file, Select the NDEF file and Read the NDEF file. The problem here is that I don't know how to send all those commands using the Arduino and to which direction I have to send them. I really need help to interpret some data from the datasheet. I also attach an image of the oscilloscope when I update the code above when the Arduino and the M24SR64 are connected and I asked from the address 0xAD 1 byte. You can see that 4 bytes are being read. The first one is a 0xB4 and it is generated when I begin the transmission with address 0xAD, the next one is the zero I write with the command Wire.Write(0), the next byte is a 0xB6 and it is generated with the command Wire.requestFrom(0xAD,1). And the last byte it is the byte that I am asking for in the command Wire.requestFrom(0xAD,1). If I may have asked for 2 bytes, then 2 0xFF would appear at the end of the oscilloscope. I don't know if I am already communicating with the M24SR64 antenna with those data.I would be very thankful if you could help me. This is for a job I have to do this summer for the company I am working with. #arduino #m24srSolved! Go to Solution.
2015-06-30 04:52 AM
Hi ,
Have you tried with the Nucleo board X-NUCLEO-NFC01A1 that is powered through Arduino UNO R3 connectors? plus we are providing firmware & the STM32 Cube expansion SW I hope this is helping, Have a nice day, All the best, ST NFC/RFID support2014-06-15 07:50 PM
Hi,
I also do this with arduino. I use#define M24SR_ADDR 0x56 /*!< M24SR address 7-bit*/ It works. And I think the UNO's SRAM is not enough for ST NFC tag. Thanks Ten2014-06-16 12:23 PM
2014-06-16 06:25 PM
Hi,
Yes, If the SRAM is not enough. UNO will crash. I use 2560 to test. You can find the I2C address with I2C_scanner.The code here:http://playground.arduino.cc/Main/I2cScanner
Ten2014-06-18 01:09 PM
2014-06-19 06:12 PM
Hi Eduardo,
Yes, use 0x56 is correct in Arduino.You can refer to stsw-m24sr001 onhttp://www.st.com/stonline/stappl/productcatalog/app?page=partNumberSearchPage&levelid=SS1812&parentid=1871&resourcetype=SW.I also porting the code recently.Ten2015-01-27 09:20 AM
2015-06-30 04:52 AM
Hi ,
Have you tried with the Nucleo board X-NUCLEO-NFC01A1 that is powered through Arduino UNO R3 connectors? plus we are providing firmware & the STM32 Cube expansion SW I hope this is helping, Have a nice day, All the best, ST NFC/RFID support