Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 5 of 7

I/O Interface for TTL Magnetic Stripe Readers Technical Reference Manual, pages 23 to 26

Pages 23 to 26 of 34: SECTION 5. BIDIRECTIONAL READING AND AMPLITUDE VARIATIONS; APPENDIX A. CHARACTER CONVERSION

The original document is the PDF (1.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the MagTek 101mm Swipe Reader

Page 23

SECTION 5. BIDIRECTIONAL READING AND AMPLITUDE VARIATIONS READING IN ONE DIRECTION VERSES BOTH DIRECTIONS 1.

The simplest way to read a card is in one direction only, with the Start Sentinel read first. If this method is chosen, normally each character is stored in one byte of memory. During the debug operation this Is a simple and clear method to see what is happening using 'In Circuit Emulation' (ICE).

2.

If reading in both directions is desired, the normal method is to scan the data in the forward direction and if no errors are found, then the data is sent. If an error is found, then the scan is done in the reverse direction. And if no error is found the data is sent in the forward direction (Start Sentinel first). If an error is found in both directions, then an error is Reported.

3.

To be able to process the data in both directions, it is necessary to pack the data into RAM without any unused bits between characters. In the case of 5 bit data, the first byte will have the first character plus 3 bits of the Second character. The second byte will have 2 bits of the second character, 5 bits of the third character and one bit of the fourth character, etc. With the data not being on byte boundaries, it can be difficult to decode it and especially difficult when looking at the data using ICE.

4.

When a card is read in the forward direction, the Start Sentinel is first, and the Start Sentinel was chosen so that the first bit would be a one. This makes it simple to tell when you have reached the end of leading clocking zeros and the first data bit. It also allows for the first bit to be on a Byte boundary. When a card is read in the reverse direction, there is no way to tell the boundary between the trailing zeros (which are now acting as the leading zeros) and the LRC character. For example, if the LRC is 1 (00001), then the first one bit will be encountered as the fifth bit of the message, and there is no easy way to tell when the trailing zeros stop and the LRC starts: B 5 F 1 000000000,11010,10101,11111,10000,00000000 which really looks like this: 0000000001101010101111111000000000000

As you can see if you are scanning right to left, it is not easy to tell where the clocking zeros stop and the message begins. 19

Page 24

I/O Interface for TTL Magnetic Stripe Readers

It is necessary to write a program that will: 1) go through memory, starting from the end that has the start sentinel, and 2) decode the characters (which may be forward or backwards depending on which way the card was swiped and not on a byte boundary), and 3) check for errors then transmit the characters forward back To the host. Another problem is that the LRC will assume the same value as the Start Sentinel some of the time, and when it does, then the character adjacent to it has to be tested to see if it is an end sentinel. If it is an end sentinel, then this character is an LRC otherwise it is a Start Sentinel. In this way you can make sure which end is really the beginning. See Appendix D, Bidirectional Reading. CARD READBACK AMPLITUDE VARIATIONS Causes of readback amplitude variations are as follows:

• Speed of the card - the faster, the more amplitude • Head contact, head pressure, smoothness of stripe, bumps • Quality of oxide • Orientation of oxide (polarization) • Thickness of oxide • Type of oxide, low or high coercivity To check the amplitude variations, connect a scope between ground (pin 5) and drive or gain set (pin 9 or 11), on the F2F read/decode IC. Swipe an encoded card, and check the scope for the variations above. The waveshape should be similar to Figure 2-1. For pin locations refer to Appendix B, Connection diagram (Pin Outs).

20

Page 25

APPENDIX A. CHARACTER CONVERSION TRACK 1 CHARACTER SET Card Data Character Space ! (ND) " (ND) # (OG) $ % (SS) & (ND) ' (ND) ( ) * (ND) + (ND) , (ND) . / 0 1 2 3 4 5 6 7 8 9 : (ND) ; (ND) < (ND) = (ND) > (ND) ? (ES)

P 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0

B6 B5 B4 B3 B2 B1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 0 0 1 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 0 1 1 0 0 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 1 1 1 1 0 0 1 1 1 1 1

ASCII P0 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F

P1 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF

EP A0 21 22 A3 24 A5 A6 27 28 A9 AA 2B AC 2D 2E AF 30 B1 B2 33 B4 35 36 B7 B8 39 3A BB 3C BD BE 3F

Card Data OP 20 A1 A2 23 A4 25 26 A7 A8 29 2A AB 2C AD AE 2F B0 31 32 B3 34 B5 B6 37 38 B9 BA 3B BC 3D 3E BF

Character @ (ND) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ (ND) \ (ND) ] (ND) ^ (FS) _ (ND)

TRACK 2 AND 3 CHARACTER SET Card Data ASCII Character P B4 B3 B2 B1 P0 P1 EP OP 0 1 0 0 0 0 30 B0 30 B0 1 0 0 0 0 1 31 B1 B1 31 2 0 0 0 1 0 32 B2 B2 32 3 1 0 0 1 1 33 B3 33 B3 4 0 0 1 0 0 34 B4 B4 34 5 1 0 1 0 1 35 B5 35 B5 6 1 0 1 1 0 36 B6 36 B6 7 0 0 1 1 1 37 B7 B7 37 P = Parity EP = Even Parity OP = Odd Parity P0 = Parity bit set to 0 P1 = Parity bit set to 1 SS = Start Sentinel ES = End Sentinel FS = Field Separator AS = Account Separator (Track 3 only) ND = Character Not Defined by Credit Card Standards OG = Optional Graphic

P 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1

Card Data Character 8 9 : (AS) ; (SS) < (ND) = (FS) > (ND) ? (ES)

P 0 1 1 0 1 0 0 1

ASCII

B6 B5 B4 B3 B2 B1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 0 1 1 0 0 1 1 1 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1

B4 B3 B2 B1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1

P0 P1 EP OP 40 C0 C0 40 41 C1 41 C1 42 C2 42 C2 43 C3 C3 43 44 C4 44 C4 45 C5 C5 45 46 C6 C6 46 47 C7 47 C7 48 C8 48 C8 49 C9 C9 49 4A CA CA 4A 4B CB 4B CB 4C CC CC 4C 4D CD 4D CD 4E CE 4E CE 4F CF CF 4F 50 D0 50 D0 51 D1 D1 51 52 D2 D2 52 53 D3 53 D3 54 D4 D4 54 55 D5 55 D5 56 D6 56 D6 57 D7 D7 57 58 D8 D8 58 59 D9 59 D9 5A DA 5A DA 5B DB DB 5B 5C DC 5C DC 5D DD DD 5D 5E DE DE 5E 5F DF 5F DF

ASCII P0 38 39 3A 3B 3C 3D 3E 3F

P1 B8 B9 BA BB BC BD BE BF

EP B8 39 3A BB 3C BD BE 3F

OP 38 B9 BA 3B BC 3D 3E BF

Hex Character

A B C D E F

REGISTERED TO ISO 9001:2000 20725 South Annalee, Carson, CA. 90746 Phone: (310) 631-8602, Help Line (651) 415-6800 Fax (310) 631-3956 http://www.magtek.com P/N 99875065-4, 4/03Copyright 2000-2003, Mag-Tek®, Inc

21

Page 26

I/O Interface for TTL Magnetic Stripe Readers

22