IC card reader/writer

Abstract: A protocol is previously set by a command transmitted from a host device (20) to a reader/writer (1). When an operation clock supplied from the reader/writer (1) is changed for an IC card to which a plurality of operation clocks can be applied, the host device (20) determines the operation clock based on initial information transmitted from the IC card inserted into the reader/writer (1), and if it is determined that the operation clock must be changed, it changes the operation clock. If the IC card has a plurality of operation modes, the reader/writer (1) supplies a reset signal to the IC card twice when the reader/writer (1) selects the operation mode of the IC card, and the contents of initial information items obtained at this time are determined t be different form each other after they are compared, the reader/writer (1) is set into one of the operation modes.

Description: This invention relates to an IC card reader/writer for reading out and writing information from or into IC cards having different protocols. For example, an IC card reader/writer incorporated into a cash processing device used in a financial organ or the like reads out various information stored in an IC card inserted therein by the user and supplies the readout information to the main body of a cash processing device which is connected as a host device to the reader/writer, and then the information is subjected to various processes. Further, the IC card reader/writer writes information from the main body of the device into the IC card. As the protocol permitting communication between the IC card and the IC card reader/writer, a "T=14" protocol is now mainly used in Japan and IC cards intended for the "T=14" protocol are dominant, and therefore, most of the IC card readers/writers are designed to deal with IC cards used for "T=14" protocol. On the other hand, in the world, the protocol of IC cards is standardized to a "T=1" or "T=0" protocol, and the protocol seems to become dominant in future in Japan. However, it is impossible to think that the "T=14" protocol is immediately changed to the "T=1" or "T=0" protocol, and in the transition period, IC cards of different types of protocols will be used. Therefore, if an IC card reader/writer is not designed to cope with the different types of protocols, IC card readers/writers respectively designed for the different types of protocols become necessary and this is inconvenient. EP 0 282 992 A2 discloses an IC card reader/writer comprising receiving means for receiving a command from a host device, analyzing means for analyzing the command received by the receiving means, and communication means for communicating with an IC card based on a standardized protocol for an initial communication with the IC card. In this prior art the IC card reader/writer does not select the clock frequency depending on the determined protocol. An object of this invention is to provide an IC card reader/writer capable of coping with IC cards of different types of protocols, coping with the function inherent to each protocol and significantly increasing the convenience thereof. This object is achieved by an IC card reader/writing according to claim 1. This invention can be more fully understood from the following detailed description of an embodiment when taken in conjunction with the accompanying drawings, in which: FIG. 1 is an external view of an IC card reader/writer according to one embodiment of this invention; FIG. 2 is a block diagram schematically showing the construction of the IC card reader/writer of FIG. 1; FIG. 3 is a diagram showing one example of the application mode of the IC card reader/writer in a case where a host device is connected to the IC card reader/writer of FIG. 1; FIG. 4 is a flowchart for illustrating the whole operation in the application mode of FIG. 3 according to the embodiment; There will now be describes an embodiment of this invention with reference to the accompanying drawings. FIG. 1 shows an appearance of an IC card reader/writer according to one embodiment of this invention. As shown in FIG. 1, an insertion slot 2 through which an IC card is inserted is formed in the front portion of an IC card reader/writer (which is hereinafter simply referred to as a reader/writer) 1 and a communication port (contact) for communication with the IC card inserted into the insertion slot is formed in the internal portion of the reader/writer 1 (refer to FIG. 2). Further, a communication port 3 constructed by a preset connector is provided on the rear surface side and the communication port 3 is connected to a host device (main body of the device) such as a cash register to permit communication with the host device. Further, a communication port 4 constructed by a preset connector for connection with a keypad used as an option is provided. FIG. 2 schematically shows the construction of the reader/writer 1. As shown in FIG. 2, a CPU 10 for controlling the whole portion of the reader/writer 1 is connected to a ROM 11, RAM 12, and communication interfaces 13 to 15 via a bus 16. In the ROM 11, an operation control program of the reader/writer 1 of this invention and the like are stored, and the CPU 10 is operated according to the program. Various data items necessary for control by the CPU 10 are temporarily stored in the RAM 12. The communication interface 13 acts as an interface for permitting communication with the host device via the communication port 3, subjects data from the host device to a preset converting process and then supplies the data to the CPU 10, and subjects data from the CPU 10 to a preset converting process and then supplies the data to the host device via the communication port 3. The communication interface 14 acts as an interface for permitting communication with the IC card via the communication port 5, subjects data from the IC card to a preset converting process and then supplies the data to the CPU 10, and subjects data from the CPU 10 to a preset converting process and then supplies the data to the IC card via the communication port 5. The communication interface 15 acts as an interface for permitting communication with the keypad via the communication port 4, and subjects data from the keypad to a preset converting process and then supplies the data to the CPU 10. FIG. 3 shows one example of the application mode of the reader/writer 1 in a case where the host device is connected to the reader/writer 1. As shown in FIG. 3, for example, a host device 20 is connected to the communication port 3 of the reader/writer 1 via an RS232C interface cable. Further, a keypad 21 is connected to the communication port 4 if necessary. The keypad is used by the user to input a pass word or the like at the time of usage of the reader/writer. In the following explanation, for simplicity, the reader/writer 1 is explained as a device designed to cope with the "T=14" protocol (block transfer protocol for use in Japan) and "T=1" protocol (block transfer protocol). The protocols which can be applied are not limited to the above two protocols. In the "T=14" protocol and "T=1" protocol, for example, the ways of re-transmission requests and commands used and the clock rates are different. The typical clock rates of the above protocols are 4.9 MHz in the "T=14" protocol and 3.5 MHz in the "T=1" protocol. The first embodiment is explained with reference to FIG. 4. The first embodiment has a feature that the reader/writer 1 selects a corresponding protocol according to data (command) supplied from the host device 20 in the application mode shown in FIG. 3. FIG. 4 is a flowchart for illustrating the whole operation process. First, in the step S1, a card insertion request command is transmitted from the host device 20 to the reader/writer 1. The content of the card insertion request command contains various data items for requesting the insertion of the IC card and data for setting each protocol (T=1 or T=14). The reader/writer 1 determines the protocol by analyzing the command and is set into the waiting state for insertion of the IC card (step S2). In this example, it is supposed that the "T=1" protocol is set as the result of analysis of the command (step S3a). Next, if insertion of an IC card into the insertion slot 2 is detected by a sensor disposed in the card insertion slot 2 of the reader/writer 1 (step S4), a power supply voltage and clock are supplied from the communication interface 14 to the IC card via the communication port 5 and resetting of the IC card (activation of the card) is effected (step S5). At this time, the clock to be supplied is different depending on the protocol, and as described above, a clock of 3.5 MHz is supplied in the case of "T=1" protocol and a clock of 4.9 MHz is supplied in the case of "T=14" protocol. In this example, the "T=1" protocol is set and a clock of 3.5 MHz is supplied. When an IC card corresponding to the "T=1" protocol is supplied with a clock of 3.5 MHz, it transmits initial information to the reader/writer 1 (step S6). In the case of IC card corresponding to the "T=14" protocol, the IC card transmits initial information to the reader/writer 1 when it is supplied with a clock of 4.9 MHz. The reader/writer 1 which has received the initial information from the IC card analyzes the content of the initial information. For example, the reader/writer 1 checks whether the IC card coincides with the protocol ("T=1" protocol, in this example) set in the step S3a based on data contained in the initial information which can be used to determine the protocol of the IC card (step S8). When an IC card of a protocol different from the protocol set in the reader/writer 1 is inserted, the protocol is checked in the step S8, and then the IC card is treated, e.g. ejected, as an abnormal card (step S15). In this case, if the host device 20 transmits data corresponding to another protocol, that is, "T=14" protocol to the reader/writer 1 as in the case of the step S1, the reader/writer 1 can set the protocol which permits communication with the IC card to the "T=14" protocol. On the other hand, if coincidence of the protocols is determined based on the initial information from the IC card in the step S8, the initial information is transmitted to the host device 20 via the communication interface 13 and communication port 3 (step S9). The reader/writer 1 keeps the communication protocol unchanged until a reader/writer initialization request command is received from the host device 20. The content of the reader/writer initialization request command contains various data for initializing the reader/writer. Therefore, in a period after the protocol is set until the reader/writer is initialized by the reader/writer initialization request command, the reader/writer treats a command for a different protocol as an abnormal command even if the command is received from the host device 20. Next, the protocol changing operation is explained. When the reader/writer initialization request command is received from the host device 20 (step S10), the reader/writer 1 analyzes the command (step S11) and initializes the reader/write 1 (step S12). That is, the communication protocol of the reader/writer 1 is also initialized (step S13). In this case, for example, the "T=1" protocol is used as the initially set protocol. After the reader/writer 1 has completed the initialization, status information obtained as the result of initialization is transmitted to the host device 20 (step S14). Thus, according to the embodiment, since a corresponding protocol is previously set according to a command supplied from the host device 20 to the reader/writer 1, the reader/writer 1 can cope with IC cards having different protocols. As described above, according to this invention, an IC card reader/writer can be provided which can deal with an IC card of a plurality of protocols, cope with the function inherent to each protocol and significantly increase the convenience thereof.

Claims: An IC card reader/writer comprising: first receiving means (S1) for receiving from a host device a command including protocol information corresponding to one of a plurality of protocols; first analyzing means (S2) for analyzing the command received by said first receiving means (S1); determining means (S3) for determining a protocol for communication with an IC card, based on the protocol information included in the command analyzed by said analyzing means (S2); activating means (S5) for activating said IC card with a clock having a specific frequency selected from different frequencies depending on the protocol determined by said determining means (S3); second receiving means (S6) for receiving initial information including protocol information of said IC card which is transmitted from said IC card, in response to activation of said activating means (S5); second analyzing means (S7) for analyzing the initial information received by said second receiving means (S6); comparing means (S8) for comparing an inherent protocol of said IC card which is included in the initial information analyzed by said second analyzing means (S7), with the protocol determined by said determining means (S3); transmitting means (S9) for transmitting the initial information analyzed by said second analyzing means (S7) to said host device (20), when the inherent information of said IC card coincides with the protocol determined by said determining means (S3); and communication means (10) for communicating with said IC card in accordance with a protocol corresponding to the initial information analyzed by said second analyzing means (S7).

Inventors: TOSHIYUKI KAWAGISHI, YOUKO KONDOU, TOSHIYUKI, KAWAGISHI, YOUKO, KONDOU, TOSHIYUKI, KAWAGISHI, C/O INTELLECTUAL PROP. DIV., YOUKO, KONDOU, C/O INTELLECTUAL PROP. DIV.
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1996
Main classification: G06K19
IPC codes: G06K7, G06K17