ZK-RFID102 UHF RFID Reader User's Manual V2.0
6
“Write Adr”.
Cyclic Redundancy Check (CRC) computation includes all data from Len. A reference CRC computation
program is presented as follow:
C-Example:
#define PRESET_VALUE 0xFFFF
#define POLYNOMIAL 0x8408
unsigned int uiCrc16Cal(unsigned char const * pucY, unsigned char ucX)
{
unsigned char ucI,ucJ;
unsigned short int uiCrcValue = PRESET_VALUE;
for(ucI = 0; ucI < ucX; ucI++)
{
uiCrcValue = uiCrcValue ^ *(pucY + ucI);
for(ucJ = 0; ucJ < 8; ucJ++)
{
if(uiCrcValue & 0x0001)
{
uiCrcValue = (uiCrcValue >> 1) ^ POLYNOMIAL;
}
else
{
uiCrcValue = (uiCrcValue >> 1);
}
}
}
return uiCrcValue;
}
4. OPERATION COMMAND (CMD) SUMMARY
4.1 EPC C1 G2
(
ISO18000-6C
)
COMMAND
NUM
COMMAND
CODE
COMMENT
1
Inventory
0x01
The function is used to inventory tags in the effective field and
get their EPC values.
2
Read Data
0x02
The function is used to read part or all of a Tag’s Password,
EPC, TID, or User memory. To the word as a unit, start to read
data from the designated address.
3
Write Data
0x03
The function is used to write several words in a Tag’s
Reserved, EPC, TID, or User memory.