Escolar Documentos
Profissional Documentos
Cultura Documentos
HID CORPORATION
5368
5398
6008
Standard Magnetic
Stripe Track II
Reader Output
< 25 leading 0s> B <data characters> F (LRC) < 165 trailing zeros >
B = Start character
F = Stop Character
LRC = Longitudinal redundancy check
FIGURE 1
Each character represents five bits consisting of four data bits and one odd
parity bit as shown here.
ddddp
xxxxo
d = data bit, p = odd parity, x = parity mask
E. Sprik
AN002f.doc
9/21/1998
Page 1
Clock-anddata Interface
data
50mS
max
clock/
strobe
bit time
strobe width
Note: the first 25 bits and trailing bits are zeros, not shown above.
bit time = 1.5ms (default)
strobe width = bit time/3 (33% of bit time), default = 500s
clock/strobe is valid 1.5ms (one clock cycle, min) after card present is asserted
data is valid 10s (min) before the negative edge of clock/strobe
card present returns to the high level 50 ms (max.) after the last clock/strobe.
FIGURE 2
Clock-and-data Reader
Output of Standard
Wiegand Formatted HID
Cards
By E. Sprik
AN002f.DOC
9/21/1998
Page 2
1A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A P P P P
X
X
X
X
X
X
X
X
E
X
X
X
X
X
X
X
X
O
X
X
X
X
X
X
X
X
E
X
X
X
X
X
X
X
X
E
1 = set bit
A = Card number, 32 bits, range = 0 to 99,999,999
Clock-and-data Reader
Output of Clock-and-data
H10320 Formatted Cards
By E. Sprik
AN002f.DOC
9/21/1998
Page 3
Conversion of Clock-and-data
Reader Output of Standard
Format Cards Back to the
Standard Wiegand Data
Structure
Page 4
P = Parity
A = Facility code, range = 0 to 255
B = Card Number, range = 0 to 65,535
Example :
Conversion of Clock-and-data
to Standard 26 Bit Output
O = Odd Parity
E = Even Parity
X = Parity mask
The Clock-and-data reader will output the data in the character format shown in
the previous sections. For the 26 bit format the leading characters will be
zeros. The first non zero character contains the start sentinel (this is the first
one bit). The start sentinel is at bit 27 for 26 bit cards. All bits following the
start sentinel are pertinent card data. In this case it is 26 bits of data.
Example: 26 bit format H10301, facility code = 5, card number = 8
The Clock-and-data reader will output the following:
<25 leading 0s> B 0000 0004 0240 0020 F < 165 trailing zeros>
Step 1 Drop the <25 leading zeros>, start (B) character, stop (F) character ,
LRC, and trailing zeros.
This leaves the following 9 characters of octal data.
402400020
Step 2 Starting on the right (least significant bit), convert the octal data
characters into the equivalent 3 bit binary groups. Drop all bits above
bit 26.
0 2
4 0 0 0 2 0
00 000 010 100 000 000 000 010 000
pd ddd ddd ddd ddd ddd ddd ddd ddp
Step 3 Strip off the parity bits. There should be 24 bits remaining.
000001010000000000001000= 24 bits
By E. Sprik
AN002f.DOC
9/21/1998
Page 5
dddddddddddddddddddddddd
Step 4 Regroup the remaining binary data into four bit binary sets
starting on the right hand side with the least significant bit.
0000 0101 0000 0000 0000 1000
dddd dddd dddd dddd dddd dddd
Step 5 Separate the characters based on the different facility code and card
number fields.
| facility |
card
|
| code |
number
|
0000 0101 0000 0000 0000 1000
f f f f f f f f cccc cccc cccc cccc
The first 2 hex characters represent the facility code (f) while the last
4 hex characters represent the card number (c).
Step 6 Convert the hex characters in each field into the equivalent decimal
number.
0000 0101 0000 0000 0000 1000
f f f f f f f f cccc cccc cccc cccc
0
5
0
0
0
8
The numbers in the facility code and card number fields will be the same
as the standard HID Wiegand reader will report.
0 5 = eight bit Facility Code = 5 decimal
0 0 0 0 8 = sixteen bit Card Number = 8 decimal
37 Bit Format
(H10302) Structure
PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP
EXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXO
Where
P = Parity
By E. Sprik
AN002f.DOC
9/21/1998
O = Odd Parity
Page 6
Example:
Conversion Clock-and-data to
37 Bit Format (H10302)
E = Even Parity
Step 2 Starting on the right (least significant bit), convert the octal data
characters into the equivalent 3 bit binary groups. Drop all bits above
bit 37.
0 0 0 0 0 0 0 5 7 2 6 1
0 000 000 000 000 000 000 000 101 111 010 110 001
p ddd ddd ddd ddd ddd ddd ddd ddd ddd ddd ddd ddp
Step 3 Strip off the parity bits. There should be 35 bits of data remaining.
000 000 000 000 000 000 000 101 111 010 110 00
ddd ddd ddd ddd ddd ddd ddd ddd ddd ddd ddd dd
Step 4 Regroup the remaining binary data into 4 bit binary sets starting on the
right hand side with the least significant bit.
000 0000 0000 0000 0000 0010 1111 0101 1000
ddd dddd dddd dddd dddd dddd dddd dddd dddd
By E. Sprik
AN002f.DOC
9/21/1998
Page 7
Step 5 Separate the characters based on the different facility code and card
number fields.
Since the Standard HID 37 bit format (H10302) only has a card
number field (c), this step is not needed. There is no Facility Code.
0
0
0
2
F
5
8
0000 0000 0000 0010 1111 0101 1000
cccc cccc cccc cccc cccc cccc cccc
Step 6 Convert the hex characters in each field to the equivalent decimal
number.
2F58 hex = 12,120 decimal
The final data is a 37 bit formatted card (H10302) with a decimal card
number of 12,120.
By E. Sprik
AN002f.DOC
9/21/1998
Page 8