Previous | Table of Contents | Next |
The I/O line comprises a half-duplex channel; that is, either the card or the reader can transmit data over the same channel, but they both cannot be transmitting at the same time. So as part of the power-up sequence, both the reader and the card enter a receive state in which theyre listening to the I/O line. With the commencement of the reset operation, the reader remains in the receive state while the card must enter a send state in order to send the ATR back to the reader. From this point on, the two ends of the channel alternate between send states and receive states. With a half-duplex channel, there is no reliable way for either end to asynchronously change a state from send to receive or from receive to send. Rather, if this is desired, that end must go into a receive state and allow a time-out of the operation in progress; then a reader end will always try to re-establish a known sequence by re-entering a send state.
The CLK and I/O lines can support a wide variety of data transmission speeds. The specific speed is defined by the card and is conveyed back to the reader through an optional character in the ATR. The transmission speed is set through the establishment of one bit time on the I/O line, which means that an interval is established at which the I/O line may be sampled in order to read a bit and then each successive bit. This time is defined as an elementary time unit (etu) and is established through a linear relationship between several factors. Note that the TS character was returned before any definition of the etu could be made. This is possible because the etu during the ATR sequence is always specified to be
etu0=372/(CLK frequency)
where the CLK frequency is always between 1 MHz and 5 MHz; in fact, the frequency is almost always selected such that the initial data transfer rate is 9,600 bits per second.
Once an RST signal is sent from the reader to the card, the card must respond with the first character of the ATR within 40,000 CLK cycles. The card might not respond with an ATR for a number of reasons, the most prevalent being that the card is inserted incorrectly into the reader (probably upside down). In some instances, the card may not be functioning because it has been damaged or broken. Whatever the case, if the ATR is not returned within the prescribed time, the reader should begin a sequence to power down the card. During this sequence, the reader sets the RST, CLK, and I/O lines low and drops voltage on the VCC line to nominal 0 (that is, less than 0.4 v).
The ATR is a string of characters returned from the card to the reader following the successful completion of the power-up sequence. As defined in ISO/IEC 7816-3, the ATR consists of 33 or fewer characters comprising the following elements:
The historical characters can be defined at the discretion of the card manufacturer or the card issuer. These characters are typically used to convey some type of designation of the type, model, and use of this specific card. When used in this way, the historical characters provide a modest mechanism through which systems can automatically detect the use of an inserted card (within that system) and can initiate other actions (or software) accordingly. The check character provides a mechanism through which the integrity of the ATR can be measured; that is, whether a transmission error has occurred in sending the characters from the card to the reader.
The structure of the ATR is illustrated in Table 3.5. As discussed previously, the initial TS character is used to establish the bit-signaling and bit-ordering conventions between the reader and the card. The T0 character is used to signal the presence or absence of subsequent interface characters or historical characters. The interface characters are used to tailor the characteristics of the I/O channel, including the specific protocol used by the card and reader during subsequent exchange of commands (from the reader to the card) and responses (from the card to the reader). The historical characters, if present, are used to convey card-manufacturer-specific information from the card to the read, and hence to the application system being served by the reader. There is really no established standard for the information presented in the historical bits.
Character ID | Definition |
---|---|
Initial Character Section | |
TS | Mandatory initial character |
Format Character Section | |
T0 | Indicator for presence of interface characters |
Interface Characters Section | |
TA1 | Global, codes F1 and D1 |
TB1 | Global, codes 11 and Pl1 |
TC1 | Global, code N |
TD1 | Codes Y2 and T |
TA2 | Specific |
TB2 | Global, code Pl2 |
TC2 | Specific |
TD2 | Codes Y3 and T |
TA3 | TAi, TBi, and TCi are specific |
TDi | Codes Yi + 1 and T |
Historical Character Section | |
T1 | (Maximum of 15 characters) |
TK | Card-specific information |
Check Character Section | |
TCK | Optional check character |
Previous | Table of Contents | Next |