null
UHF RFID EPC Memory Bank: What is the CRC-16?

UHF RFID EPC Memory Bank: What is the CRC-16?

Published by on

In Class 1 Gen2 UHF RFID tags, a CRC-16 and a 16-bit Protocol Control (PC) precede the tag’s EPC number in the EPC memory bank, a requirement that was first outlined in Gen2 v1.1. If you have ever seen this information and wondered what purpose it serves, this article is for you - let's walk through it.

What is a CRC-16?

A CRC, also called a Cyclic Redundancy Check, is a double check feature that helps a tag ensure that all Reader to Tag commands are valid, and helps a reader ensure that all backscattered Tag to Reader commands are valid. The CRC-16 is located at the very beginning of the EPC memory bank, from 00h - 0Fh. An Impinj Monza R6 IC Gen2 Interface Memory Map is provided below that shows the location of the CRC-16 and the PC. 

According to Gen2 v1 and later versions, there are two types of CRCs - a CRC-16, and a CRC-5. A CRC-16 is used in error detection in Interrogator-to-Tag Select, Inventory, and Access commands, as well as in Tag-to-Interrogator in most commands. A CRC-5 is used for error detection in Interrogator-to-Tag Query commands. To read more in depth about the CRC-16 - take a look at the EPC Gen2 v2 Standard and jump to page 10 for a definition, page 45 for more info on the EPC memory and CRC-16's, and page 139 for example CRC-16's.

What is a 16-bit PC?

A 16-bit Protocol Control (PC) is a string of bits located directly after the CRC-16 in the EPC memory bank, from 10h - 1Fh. The Protocol Control is a little more straightforward than the CRC-16 because the bit values are used to define certain characteristics about the tag’s IC.

  • Bits located between 10h - 14h denote the length of the EPC memory bank including the PC.
  • Bit 15h is the User-memory indicator, or UMI that indicates whether the tag has a User Memory bank that is capable of allocating memory.
  • Bit 16h is the XI, indicator which indicates if the tag has an extended memory.
  • Bit 17h is the T numbering system identifier toggle (NSI) which indicates if the tag is set for a GS1 or non-GS1 Application.
  • Bits 18h - 1Fh are Reserved for Future Use or an Application Family Identifier.

To read more in depth about the 16-bit Protocol Control - take a look at the EPC Gen2 v2 Standard and jump to page 46.

How do the CRC-16 and 16-bit PC Affect You?

In most demo software programs, when reading UHF RFID tags, the software simply displays the EPC number, as shown below. If you haven’t seen extra hexadecimal characters in front of your EPC number, then your software is set to just show you the EPC number - the writable data.

However, other software programs show (or include the option to show) the CRC-16, 16-bit PC, and the EPC number, which can be confusing for users that aren't aware of the CRC and PC.

In the screenshot below, we are reading UHF RFID tags in Impinj’s ItemTest Software v2.6 in the “Inventory” Showcase, which is designed to show users multiple tag reads at once. In this view, only an RFID tag’s EPC number is shown.

In the screenshot below, we have right clicked on one of the tag’s EPC numbers, and opened up the tag data in the “Tag Memory” Showcase. In this Showcase, you can see that ItemTest shows both the ‘typical’ EPC, in the top box, and in the middle, under “Tag Memory”, the ‘entire’ EPC memory - including the CRC, PC, and EPC number is shown.

While the prefixes are clearly shown in the denoted boxes below, as you can see, the EPC number simply picks up in the third word (box) and matches the corresponding EPC above.

IMPORTANT NOTE: 

It is very important to note that, although the CRC-16 and PC are shown and can be clicked on and, depending on the software, possibly changed, that you do not attempt to change these important identifiers. These bits that precede the EPC, as explained above, are extremely important parts of how an RFID tag functions and if they are tampered with, the tag could no longer be usable.

If you do not wish to see these identifiers when you display an RFID tag’s EPC number, certain demo software products include a “Word Offset” feature. The Word Offset feature simply moves the start location of the tag’s data forward by a selected number of words (each word is 16 bits). Because the CRC-16 and PC are both 16 bits, which translates into 8 hexadecimal characters, each of these occupy one word of memory.

Binary (bits)

0101 1110 | 1001 1100 | 0011 0000 | 0000 0000

Hexadecimal Characters (hex)

5E | 9C | 30 | 00

Words (sets of 4)

5E9C | 3000

(For an easy binary - hex - ascii reference chart, click here)

Because there are two groups of 4 characters, simply change the word offset to “2”. See the screenshot below for clarification. 

IMPORTANT NOTE: 

If you are using the “Word Offset” parameter, remember that you are asking the data to display excluding the first two words (8 hexadecimal characters), which means that the total Word Count will change. Because we are excluding two words, we need to change the “Word Count” parameter from “8” to “6”, as you will see I did in the screenshot above.

If you do not change the Word Count, the Software will look for 8 words and not find them, throwing an error message of “ERROR: An unidentified error occurred” - see the image below for reference. 

CONCLUSION

For any other questions related to the CRC-16 or the 16-bit Protocol Control (PC), comment below or contact us! For more information about a UHF Gen2 tag’s memory bank, checkout the articles below.