beautypg.com

Rainbow Electronics DS2432 User Manual

Page 28

background image

PRELIMINARY

DS2432

28 of 30

With the Read Scratchpad command the CRC is generated by first clearing the CRC generator and then
shifting in the command code, the Target Addresses TA1 and TA2, the E/S byte, and the scratchpad data,
which may have been modified by the DS2432 (see Write Scratchpad command). The DS2432 will
transmit this CRC only if the reading continues through the end of the scratchpad.

With the Read Authenticated Page command the 16-bit CRC value is the result of shifting the command
byte into the cleared CRC generator, followed by the two address bytes, the data bytes, and the FFh byte.
The CRC that follows the Message Authentication Code (MAC) results from clearing the CRC generator
and then shifting in the 160-bit MAC in the same bit sequence as the master receives it.

For more details on generating CRC values including example implementations in both hardware and
software, see the “Book of DS19xx iButton Standards”.

CRC-16 HARDWARE DESCRIPTION AND POLYNOMIAL Figure 12

Polynomial = X

16

+ X

15

+ X

2

+ 1

X

0

X

1

X

2

X

3

X

4

X

5

X

6

X

7

X

8

X

9

X

10

X

11

X

12

X

13

X

14

X

15

X

16

1

st

STAGE

2

nd

STAGE

3

rd

STAGE

4

th

STAGE

6

th

STAGE

5

th

STAGE

7

th

STAGE

8

th

STAGE

9

th

STAGE

10

th

STAGE

11

th

STAGE

12

th

STAGE

13

th

STAGE

14

th

STAGE

15

th

STAGE

16

th

STAGE

INPUT DATA

CRC
OUTPUT