beautypg.com

Crc generation – Rainbow Electronics MAX66020 User Manual

Page 23

background image

MAX66020

ISO/IEC 14443 Type B-Compliant

1Kb Memory Fob

______________________________________________________________________________________

23

SLOT-MARKER command with a slot number that is
equal to R and then responds with ATQB. The master
must try all slot numbers from 2 to N to ensure that no
slave is missed.

The ATQB response contains a field named PUPI,
which is used to direct commands to a specific slave
during the anticollision process. When the master
receives an ATQB response, it should issue a matching
HLTB command to halt the slave, or issue a matching
ATTRIB command to assign a CID and place the slave
in the ACTIVE state. A slave in the ACTIVE state ignores
all REQB, WUPB, SLOT-MARKER, ATTRIB, and HLTB
commands, but responds to the DESELECT command.

An ATQB response received with a CRC error indicates
a collision because two or more slaves have responded
at the same time. Typically the master continues issuing
SLOT-MARKER commands to test for slaves with ran-
dom numbers R different from 1. If additional collisions
were encountered, the master must issue a new REQB
command, causing each slave in the field that is not in
the HALT or ACTIVE state to select a new random num-
ber R. The anticollision process then continues in this
manner until all slaves in the field have been identified
and put either into the HALT or ACTIVE state.

Figure 31 shows an example of the time-slot anticolli-
sion, assuming that there are four slaves in IDLE state
in the field. The process begins with the master send-
ing an REQB request with N = 1, which forces all slaves

to respond with ATQB, resulting in a collision. Knowing
that slaves are present, the master now sends REQB
with N = 8. This causes all slaves to select a random
number in the range of 1 to 8. This does not prevent
two slaves from choosing the same value for R, but the
higher N is, the less likely this is to occur. In the exam-
ple, slave C has chosen R = 1 and responds right after
REQB. The master now sends a SLOT-MARKER com-
mand with slot number 2 (SM2), which causes slave D
to respond. The master continues testing all slots, and,
if a slave with matching R is present, receives an
ATQB. In case the master detects a collision in a slot,
the slaves identified in the remaining slots need to be
put in the HALT or ACTIVE state first, before another
anticollision process is started. Note that there is no
need for the master to test the slots in numerical order,
as in the example.

CRC Generation

The ISO/IEC 14443 standard uses a 16-bit CRC, gener-
ated according to the CRC-16-CCITT polynomial func-
tion: X

16

+ X

12

+ X

5

+ 1 (Figure 32). This CRC is used

for error detection in request and response data pack-
ets and is always communicated in the inverted form.
After all data bytes are shifted into the CRC generator,
the state of the 16 flip-flops is parallel-copied to a shift
register and shifted out for transmission with the LSb
first. For more details on this CRC refer to ISO/IEC
14443-3, Annex B, CRC_B encoding.

TESTING FOR SLAVES

SLOT 1

SLOT 2

SLOT 3

SLOT 4 SLOT 5

SLOT 6

SLOT 7 SLOT 8

MASTER

REQB

(N = 1)

REQB

(N = 8)

SM2

SM3

SM4

SM5

SM6

SM7

SM8

SLAVE A

ATQB

(R = 3)

ATQB

SLAVE B

ATQB

(R = 6)

ATQB

SLAVE C

ATQB

(R = 1) ATQB

SLAVE D

ATQB

(R = 2)

ATQB

Figure 31. Time-Slot Anticollision Example