EHUOYAN
YHY522R
RFID module
Page 10 of 36
1. Header:
This header has 2 bytes that indicates the beginning of a frame. These 2
bytes should be always 0xAA 0xBB.
2. Length:
This byte is used to indicate the length of the payload data. This includes
the Length, Command and the Data bytes
3. Status:
This is the status for which the response is being sent back. If ok then the
module return the command which host has sent, if failure it return the
ones-complement code. For example, the command is 0x19, then the
ones-complement code is 0xe6.
4. Data
: This contains the result data if an operation was successful. It may be empty.
5. CSUM:
This is the checksum byte. This byte is used on the host as well as the
module to check the validity of the packet and to trap any data
corruption. This is calculated by
XOR
all the bytes in the packet except
the Header and CSUM byte.
CSUM=Length
⊕
Command
⊕
Response[0]
⊕
Response[1]
⊕
…
⊕
Response[n-1]
AA BB 06 20
3D 98 62 01
E0
0x20: Auto scan UID.
3D 98 62 01: UID
12
. Power Reduction mode
___ _____________________
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.
The output pins are frozen at a certain value.
12.2 Transmitter Soft Power-down
The Transmitter Soft Power-down mode is entered immediately after send
command
0x11
to the YHY522R . The module will switch off the antenna
power, but the mcu is still working.
13
. Reset
___ ___________________ _
The YHY522R is reset when a low level is present on the RST pin for
longer than the minimum pulse length. During Reset, all I/O pins are set to
their initial states, and the program starts execution from the Reset Vector.
Table 7: Reset Characteristics