Advertisement

Quick Links

RFID 
SMART RFID MODULE 
 
 
YHY521X RFID module 
RFID/NFC Reader/Writer Module
User manual
Version 1.0
June, 2018

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the YHY521X and is the answer not in the manual?

Questions and answers

Summary of Contents for EHUOYAN YHY521X

  • Page 1 RFID  SMART RFID MODULE      YHY521X RFID module  RFID/NFC Reader/Writer Module User manual Version 1.0 June, 2018...
  • Page 2: Table Of Contents

    10.Digital interface ..........................8 10.1.UART interface ......................…….8 10.2.Selection of the transfer speeds ................…….8 10.3.Transfer protocol .....................…….8 10.3.1.Host to YHY521X transfer protocol ............…….9 10.3.2. YHY521X to Host transfer protocol ............…….9 11.Interrupt request system ......................10 12.Antenna Power ...........................10 13.External antenna ..........................10 14.YHY521X Command set ......................11 14.1.Commands overview ....................…….11...
  • Page 3 EHUOYAN YHY521X Manual 15.Electrial Characteristics ......................34 15.1.Operating condition ....................…….34 15.2.Current consumption .....................…….35 16.Package outline ..........................35 17.Contact information ........................36 Page 3 of 36...
  • Page 4: Introduction

    The digital part handles the complete ISO/IEC 14443A framing and error detection(Parity & CRC). In the master mode, YHY521X will seek the card or data itself and output to host automatically. In the slave mode, the module just needs only one command to perform one action, such as read or write data from card’s block.
  • Page 5: Application Information

    ▲ Size: 42mm × 26mm × 6mm ▲ Weight:8g 4. Application information YHY521X can be use on vending or game machine, secure access, parking, payment, ticketing, leisure, member ship, time & attendance, biometrics, IT-access, Identify, loyalty, Counter, data storage and fast data collection systems.
  • Page 6: Block Diagram

    YHY521X RFID module 7. Block diagram _ _____________________________ Figure 2. Simplified YHY521X Block diagram The Analog circuitry and MFRC522 handle the modulation and demodulation RFID signal. The MCU handles the protocol requirements for the communication schemes including the RF base protocols as well as the protocols for host communication.
  • Page 7: Pin Description

    Interrupt output, LOW level indicates card in the field J1-6 Reserved For Use J4 used for connect to external antenna. 9. Functional description _____________________________ YHY521X supports the Reader/Writer mode for ISO/IEC 14443A/MIFARE card. Figure 4 – YHY521X Reader/Writer mode Page 7 of 36...
  • Page 8: Digital Interface

    230.4 10.3 Transfer Protocol The original setting for the host and YHY521X communicates at 19200bps, N, 8, 1. In the slave mode, the host first sends the command and the module executes the operation and replies with a response to the command. The host can analyze the reply to check if the operation was successful or if any error occurred during the operation.
  • Page 9: Host To Yhy521X Transfer Protocol

    Code example: //-------------------------------------------------- if (cSendBuffer[i] == 0xAA) TI = 0; SBUF = 0; while (!TI); //-------------------------------------------------- 10.3.2 YHY521X to Host Transfer Protocol Table 6. UART frame send by YHY521X Header Length Status Data CSUM 2 Byte 1 Byte 1 Byte...
  • Page 10: Interrupt Request System

    CSUM=Length⊕Command⊕Response[0]⊕Response[1]⊕…⊕Response[n-1] 11. Interrupt Request System___ _____________________ The YHY521X indicates certain events by pin SIG. If activated, the signal on pin SIG maybe used to interrupt the host using its interrupt handling capabilities. This allows the implementation of efficient host software.
  • Page 11: Yhy521X Command Set

    Write NFC text into NTAG chip 0x42 Read NFC URL from NTAG chip Ntag_Read_URL 0x43 Ntag_Write_URL Write NFC URL into NTAG chip 14.2 Commands and Response After power on or reset YHY521X, the RED led will flash one time, it means Page 11 of 36...
  • Page 12: Detect_Clone

    AA BB 02 F3 FE Receive(Failure) AA BB Head Length Description Error 14.2.3 MConfigure This command will configure parameters to the YHY521X. After Reset YHY521X the configuration will active. Table 15. Command--:Host YHY521X Data Send Header Length Command XOR Checksum...
  • Page 13 D[0]:Auto code ----- 0—Auto function off ,the YHY521X will not auto seek card and the SIG pin is not active. 1—Auto seek card, if there are cards in the RF field, the RED led will light and SIG pin will output low level.
  • Page 14 Description Error If success then reset the YHY521X to active this function. The reader will read the card id itself when there is a card into the RF field and then output the id to host, at the same time the buzzer would beep one time if it is connecting to a buzzer.
  • Page 15 05: Baud code,19200bps If success then reset the YHY521X to active this function. The reader will read the NFC tag when there is a tag into the RF field and then output the status to host. Below is the output string.
  • Page 16: Download_Keys

    14.2.4 Download_Keys This command can load up to 40 groups keys to the YHY521X’s EEPROM, all the data stored in the EEPROM is encrypted. When auth mode is 1, the reader will use the EEPROM’s key to auth the card. After reset this keys will active.
  • Page 17: Antenna_Control

    Auto code:1Byte Auto code ----- 0—Auto function off ,the YHY521X will not auto seek card and the SIG pin is not active. 1—Auto seek card, if there are cards the RED led will light and SIG pin output low level.
  • Page 18: Card_Sleep

    EHUOYAN YHY521X Manual 3—Same 1, and it will read the selected block and upload to host, and then halt the card. Table 32. Response--: YHY521X Host Receive Head Length Status Data XOR Checksum Success 0xAA 0xBB 0x02 0x13 0x11 Failure...
  • Page 19: Card_Type

    This command reads card type. Table 54. Command--:Host YHY521X Data Send Header Length Command XOR Checksum 0xAA 0xBB 0x02 0x19 0x1B Table 55. Response--: YHY521X Host Receive Head Length Status Data XOR Checksum Card type: Success 0xAA 0xBB 0x04 0x19 2Bytes...
  • Page 20: Card_Id

    Manual Table 57. Command--:Host YHY521X Data Send Header Length Command XOR Checksum 0xAA 0xBB 0x02 0x20 0x22 Table 58. Response--: YHY521X Host Receive Head Length Status Data XOR Checksum Success 0xAA 0xBB 0x06 0x20 Card ID: 4Bytes Failure 0xAA 0xBB...
  • Page 21: Block_Write

    Key: 6 bytes, default “FFFFFFFFFFFF” BData: 16 bytes data to be write into card (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 64. Response--: YHY521X Host Receive Head...
  • Page 22: Value_Init

    EHUOYAN YHY521X Manual Length COMMAND Key type A Write Block 08(Sector 02,1 block ) FF FF FF FF FF FF Authenticate with Key A 00 ..FF 16 bytes data AA BB 02 22 20 Receive(Success) AA BB Head Length Description...
  • Page 23: Value_Read

    Key: 6 bytes, default “FFFFFFFFFFFF” (*) Value: 4 bytes value to be write into card, low byte first (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 67. Response--: YHY521X Host Receive Head...
  • Page 24: Value_Inc

    EHUOYAN YHY521X Manual (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 70. Response--: YHY521X Host Receive Head Length Status Data XOR Checksum Success 0xAA 0xBB 0x06 0x24 Value: 4Bytes...
  • Page 25: Value_Dec

    Key: 6 bytes, default “FFFFFFFFFFFF” (*) Value: 4 bytes value to decrement, low byte first (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 75. Response--: YHY521X Host Head Length...
  • Page 26: Value_Backup

    Key: 6 bytes, default “FFFFFFFFFFFF” (*) Source block: 1 byte Target block: 1 byte (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 78. Response--: YHY521X Host Receive Head Length...
  • Page 27: Sector_Read

    Key type: 1 byte, 0x00—Key A, 0x01—Key B. Sector number: 1 byte, 0x00..0x1F (0..31) Key: 6 bytes, default “FFFFFFFFFFFF” (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 81. Response--: YHY521X Host Receive Head Length...
  • Page 28: Sector_Write

    Key: 6 bytes, default “FFFFFFFFFFFF” SData: 48 Bytes data to be write into card (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 84. Response--: YHY521X Host Receive Head...
  • Page 29: Pages_Read_Ul

    Table 86. Command--:Host YHY521X Data Send Header Length Command XOR Checksum 0xAA 0xBB 0x03 0x28 Start page Table 87. Response--: YHY521X Host Receive Head Length Status Data XOR Checksum 4 pages data: Success 0xAA 0xBB 0x12 0x28 16Bytes Failure...
  • Page 30: Pages_Write_Ul

    Data Send Header Length Command XOR Checksum Page Info: 0xAA 0xBB 0x07 0x29 5 bytes Page Info: 1byte(page address)+4 bytes data Table 90. Response--: YHY521X Host Receive Head Length Status Data XOR Checksum Success 0xAA 0xBB 0x02 0x29 0x2B Failure...
  • Page 31: Ntag_Write_Text

    0xAA 0xBB Len1 0x41 Data Data=Lock+Len2+Text Lock: 00-rewrite, 01-Lock(read only) Len2: length of the text, up to 58 bytes; Text: NFC NDEF ascii code. ------------------------------------------------------------------- Table 96. Response--: YHY521X Host Receive Head Length Status Data XOR Checksum Success 0xAA 0xBB...
  • Page 32: Ntag_Read_Url

    22”to get the UID of the tag, at last you can send this command to read the NDEF URL data. For example, the URL is ‘ehuoyan.com’, then it will be shownas ‘56F79616E2E636F6D’. before this string, it will be use a hex code, for example, 0x01 means ‘http://www’.
  • Page 33: Ntag_Write_Url

    Ntag_Write_URL This command can write the NDEF URL data into the NTAG213 chip. For example to write ‘http://www.ehuoyan.com/’, the red string will replace by ‘0x01’, else will translate to ascii code string ‘6568756F79616E2E636F6D’. At the same time, you can LOCK this tag.
  • Page 34: Electrial Characteristics

    EHUOYAN YHY521X Manual ------------------------------------------------------------------- Table 103. Response--: YHY521X Host Head Length Status Data XOR Checksum Receive Success 0xAA 0xBB 0x02 0x43 Failure 0xAA 0xBB 0x02 0xBC 0xBE Table 104. Example AA BB 10 43 6568756F79616E2E636F6D 77 Send AA BB Head...
  • Page 35: Current Consumption

    CONDITIONS MIN TYP MAX UNIT Continuous read or write Antenna Soft Supply Current Power Down =2.7V-3.6V Module Hard µA Power Down ___ _____________________ 16. Package outline Figure 8– YHY521X Top view Figure 9– YHY521X Side View Page 35 of 36...
  • Page 36: Contact Information

    Manual Figure 10– YHY521X top view Figure 11– YHY521X back view ------------------------------------------------------------------------------------------------------------------------------------------ ___ _____________________ 17. Contact information To obtain information about EHUOYAN Inc sales and technical information, please reference the following information. Contact Information: Ehuoyan Co.,Ltd. Tel: +86-010-80128328 email: info@ehuoyan.com Web Site : http://www.ehuoyan.com/...

Table of Contents