The digital part handles the complete ISO/IEC 14443A framing and error detection(Parity & CRC). In the master mode, YHY522R will seek the card or data itself and output to host automatically. In the slave mode, the module just needs only one command to finish one action, such as read or write data from card’s block.
YHY522R YPHDR9-5 7. Block diagram _ _____________________________ Figure 2. Simplified YHY522R 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.
10.1 RS232 Interface HOST YHY522 Figure 5 – YHY522R RS232 interface to host 10.3 Slection of the transfer speeds The default transfer speed is 19.2 kbit/s. To change the transfer speed, the host controller has to write a value for the new transfer speed by the CONFIG command, after reset the module, the new speed will active.
EHUOYAN YHY522R RFID module The original setting for the host and YHY522R 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.
12.1 Hard Power-down A Hard Power-down is enabled with sending command 0x03 to the YHY522R . This turns off all internal current sinks as well as the oscillator. All digital input buffers are separated from the input pads and clamped internally.
Figure 7– Reset timing 14. YHY522R Command Set ___ ____________________ 14.1 Commands overview The commands for the YHY522R include system commands and RFID commands. The system commands are use for controling the module settings and save parameters to the EEPROM.
0x41 Ntag_Write_Text Write NFC text into NTAG chip 14.2 Commands and Response After power on or reset YHY522R , the RED led will flash one time, It means that YHY522R is ready. ® If a Mifare tag detected by the module, pin IRQ will change from “1” to “0”...
AA BB Head Length Description Error 14.2.2 MSleep After executing this Command the YHY522R will power down, waking up the module it needs to give the RST pin a low-level pulse or Re-power on the module. Table 12. Command--:Host YHY522R Data...
D[0]:Auto code ----- 0—Auto function off ,the YHY522R will not auto seek card and the IRQ pin is not active. 1—Auto seek card, if there are cards in the RF field, the RED led will light and IRQ pin will output low level.
Page 15
Description Error If success then reset the YHY522R 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 16
01: Auth mode 1 08: Baud code,115200bps If success then reset the YHY522R to active this function. The reader will read the card block itself when there is a card into the RF field and then output the block data to host, at the same time the buzzer would beep one time if it is connecting to a buzzer.
14.2.4 Download_Keys This command can load up to 40 groups keys to the YHY522R ’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.
Auto code:1Byte Auto code ----- 0—Auto function off ,the YHY522R will not auto seek card and the IRQ pin is not active. 1—Auto seek card, if there are cards the RED led will light and IRQ pin output low level.
Access bits: 4 bytes---‘ FF 07 80 69’ Key B: 6 bytes ----default ‘FF FF FF FF FF FF’ (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 46. Response--: YHY522R Host Receive...
This command sets the Card into sleeping. After successfully operation the card will be halt. Reactivate the card need to remove the card from antenna area and put the card into antenna area again. Or reset the YHY522R to repower the card. Table 51. Command--:Host YHY522R...
Key type: 1 byte, 0x00—Key A, 0x01—Key B. Block number: 1 byte, 0x00..0xff (0..255) 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 61. Response--: YHY522R Host Receive Head...
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--: YHY522R Host Receive Head...
EHUOYAN YHY522R RFID module AA BB Head Length Description Status AA BB 02 DD DF Receive(Failure) AA BB Head Length Description Error *If write one block data include ‘AA’, then the ‘00’ will be added behind ‘AA’, but the length does not add 1.
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--: YHY522R Host Receive...
Key: 6 bytes, default “FFFFFFFFFFFF” (*) Value: 4 bytes value to increment, low byte first (*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes. Table 72. Response--: YHY522R Host Receive...
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--: YHY522R Host Receive...
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--: YHY522R Host Receive Head...
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--: YHY522R Host Receive Head...
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--: YHY522R Host Receive Head...
Page 31
This command reads 4 continuous pages data from the appointed start page. Table 86. Command--:Host YHY522R Data Header Length Command XOR Checksum Send 0xAA 0xBB 0x03 0x28 Start page Table 87. Response--: YHY522R Host Receive Head Length Status Data XOR Checksum 4 pages data: Success 0xAA 0xBB 0x12 0x28 16Bytes...
Page 32
EHUOYAN YHY522R RFID module Page Info: 0xAA 0xBB 0x07 0x29 5 bytes Page Info: 1byte(page address)+4 bytes data Table 90. Response--: YHY522R Host Receive Head Length Status Data XOR Checksum Success 0xAA 0xBB 0x02 0x29 0x2B Failure 0xAA 0xBB 0x02...
Page 33
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--: YHY522R Host Receive Head Length Status Data XOR Checksum Success 0xAA 0xBB...
EHUOYAN YHY522R RFID module AA BB 02 BE BC Receive(Failure) AA BB Head Length Description Error -------------------------------------------------------------------- ____________________ 15. Electrical Characteristics 15.1 Operating Condition Table 86: Operating Condition Range SYMBOL PARAMETER CONDITIONS UNIT Ambient Tamb °C Temperature DC Supply GND = 0V...
Page 35
EHUOYAN YHY522R RFID module Figure 8– YHY522R Top view Page 35 of 36...
Page 36
Figure 9– YHY522R Side View Figure 10– YHY522R Back side View ------------------------------------------------------------------------------------------------------------------------------------------ ___ _____________________ 17. Contact information To obtain information about EHUOYAN sales and technical information, please reference the following information. Contact Information: Ehuoyan Technology Co.,Ltd. Tel: +86-010-80128328 email: info@ehuoyan.com Web Site : http://www.ehuoyan.com/...
Need help?
Do you have a question about the YHY522R and is the answer not in the manual?
Questions and answers