JPH07271926A - Ic card reader/writer - Google Patents

Ic card reader/writer

Info

Publication number
JPH07271926A
JPH07271926A JP6085640A JP8564094A JPH07271926A JP H07271926 A JPH07271926 A JP H07271926A JP 6085640 A JP6085640 A JP 6085640A JP 8564094 A JP8564094 A JP 8564094A JP H07271926 A JPH07271926 A JP H07271926A
Authority
JP
Japan
Prior art keywords
clock
writer
card reader
card
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6085640A
Other languages
Japanese (ja)
Inventor
Seiji Hirano
誠治 平野
Giichi Yorimoto
義一 寄本
Akiyuki Yura
彰之 由良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toppan Inc
Original Assignee
Toppan Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP6085640A priority Critical patent/JPH07271926A/en
Publication of JPH07271926A publication Critical patent/JPH07271926A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To miniaturize and simplify an IC card reader/writer. CONSTITUTION:The clock produced by a crystal 101 is frequency divided at the inside of a CPU 100 into a system clock theta and a synchronizing clock SCK of different frequencies. When the start-stop communication is carried out to an IC card, a buffer 102 is activated and the clock theta is outputted. Meanwhile a buffer 103 is activated and the clock SCK is outputted when the clock synchronizing communication is carried out to the IC card. The clock produced by a single oscillator is frequency divided for generation of plural clocks of different frequencies. Thereby, the constitution of an IC card reader/writer can be simplified.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ICカードリーダライ
タ、詳しくは同期式、調歩同期式の通信を切り換え可能
なICカードリーダライタに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an IC card reader / writer, and more particularly to an IC card reader / writer capable of switching between synchronous and asynchronous communication.

【0002】[0002]

【従来の技術】近年、メモリおよびマイクロコンピュー
タを搭載したICカードが利用され始めている。ICカ
ードリーダライタは、このICカードに対してデータの
読み書きを行うものであって、ICカードとのデータの
送受信を行う通信手段を備えたものである。かかるIC
カードリーダライタに要求される機能の一つとして、種
々のタイプのICカードに対応できることが掲げられ
る。従来より使用されているICカードの端子等の位置
は規格により統一されているものの、通信方式は異なる
種類のものが使用されている。例えば、ICカードに用
いられている通信方式としては、調歩同期式およびクロ
ック同期式の2つの方式がある。したがって、少なくと
もこれらの通信方式に対応できることがICカードリー
ダライタに要求される。
2. Description of the Related Art In recent years, IC cards equipped with a memory and a microcomputer have begun to be used. The IC card reader / writer reads / writes data from / to this IC card, and includes a communication means for transmitting / receiving data to / from the IC card. Such IC
One of the functions required of the card reader / writer is that it can be applied to various types of IC cards. Although the positions of terminals and the like of IC cards that have been conventionally used are standardized, different types of communication systems are used. For example, there are two types of communication systems used for IC cards: an asynchronous system and a clock synchronous system. Therefore, the IC card reader / writer is required to be able to support at least these communication methods.

【0003】ここで、図10に、調歩同期式通信および
クロック同期式通信の概略を示す。同図の(A)に示す
調歩同期式通信はいわゆる非同期式通信方式とも呼ばれ
るものであって、同期用のクロックを用いることなくデ
ータの送受信を行う方式である。8ビットのデータの前
後にはスタートビットおよびストップビットが付加され
ており、受信側においてはスタートビットおよびストッ
プビットを基準としてデータの読み取りを行うものであ
る。同図の(B)に示すクロック同期式通信方式は、デ
ータとともに同期用のクロックを送受信するものであ
る。受信側においては、クロックの立ち上がり毎にデー
タを読み込むことにょり、データを正しく受信すること
が可能となる。
Here, FIG. 10 shows an outline of the asynchronous communication and the clock synchronous communication. The asynchronous communication shown in (A) of the figure is also called a so-called asynchronous communication system, and is a system for transmitting and receiving data without using a clock for synchronization. A start bit and a stop bit are added before and after the 8-bit data, and the receiving side reads the data with the start bit and the stop bit as a reference. The clock-synchronous communication system shown in (B) of the figure transmits and receives a synchronization clock together with data. On the receiving side, the data can be correctly received by reading the data at each rising edge of the clock.

【0004】また、クロック同期式の通信方式を用いた
ICカードであっても、さらにクロック周波数の異なる
ものがある。そこで、特開平2−5192号公報、特開
昭61−148588号公報に開示されたように、発振
周波数の異なるクロック発生回路を用いて各ICカード
毎に最適なクロックを生成していた。
Further, even IC cards using a clock-synchronous communication system may have different clock frequencies. Therefore, as disclosed in Japanese Patent Application Laid-Open No. 2-5192 and Japanese Patent Application Laid-Open No. 61-148588, an optimum clock is generated for each IC card using a clock generation circuit having different oscillation frequencies.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来の
ICカードリーダライタにあっては、ICカードの通信
方式およびクロック周波数に応じて複数のクロック発振
回路を用意する必要があった。このため、ICカードリ
ーダライタの構成が複雑となり、装置の大型化、高価格
化を招いていた。
However, in the conventional IC card reader / writer, it is necessary to prepare a plurality of clock oscillation circuits according to the communication system and clock frequency of the IC card. For this reason, the configuration of the IC card reader / writer becomes complicated, leading to an increase in size and cost of the device.

【0006】[0006]

【発明の目的】そこで、本発明は、装置の小型化、簡略
化を実現可能なICカードリーダライタを提供すること
を目的としている。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide an IC card reader / writer which can realize the miniaturization and simplification of the device.

【0007】[0007]

【課題を解決するための手段】請求項1記載の発明は、
ICカードに対してデータの送受信を行うICカードリ
ーダライタにおいて、所定の周波数の基準クロックを発
振させる発振手段と、基準クロックに基づき、周波数の
異なる複数のクロックを生成可能なクロック生成手段
と、複数の通信方式のうちのいずれかの通信方式を選択
し、この通信方式に対応するクロックを、クロック生成
手段により生成された複数のクロックのなかから選択す
る選択手段と、選択手段によりそれぞれ選択された通信
方式およびクロックに基づきICカードに対してデータ
の送受信を行う送受信手段とを備えたことを特徴とする
ICカードリーダライタである。
The invention according to claim 1 is
In an IC card reader / writer that transmits and receives data to and from an IC card, an oscillating unit that oscillates a reference clock having a predetermined frequency, a clock generating unit that can generate a plurality of clocks with different frequencies based on the reference clock, and a plurality of clock generating units. Selecting any one of the communication methods, and selecting the clock corresponding to this communication method from the plurality of clocks generated by the clock generating means, and the selecting means respectively. An IC card reader / writer comprising: a transmission / reception means for transmitting / receiving data to / from an IC card based on a communication system and a clock.

【0008】請求項2記載の発明は、上記選択手段は、
調歩同期式通信方式またはクロック同期式通信方式のい
ずれかを選択可能であることを特徴とする請求項1記載
のICカードリーダライタである。
According to a second aspect of the present invention, the selecting means comprises:
2. The IC card reader / writer according to claim 1, wherein either an asynchronous communication system or a clock synchronous communication system can be selected.

【0009】請求項3記載の発明は、請求項1記載のク
ロック生成手段は、基準クロックを分周することによ
り、周波数の異なる複数のクロックを生成することを特
徴としたICカードリーダライタである。
According to a third aspect of the present invention, there is provided an IC card reader / writer characterized in that the clock generating means according to the first aspect divides a reference clock to generate a plurality of clocks having different frequencies. .

【0010】請求項4記載の発明は、請求項1記載の選
択手段は、ICカードリーダライタに通信回線を介して
接続されたホスト端末からのコマンドに基づき、通信方
式を選択することを特徴とするICカードリーダライタ
である。
The invention according to claim 4 is characterized in that the selecting means according to claim 1 selects a communication system based on a command from a host terminal connected to the IC card reader / writer via a communication line. IC card reader / writer.

【0011】請求項5記載の発明は、請求項1記載の送
受信手段は、選択された通信方式に応じた初期通信をI
Cカードに対して行うことを特徴とするICカードリー
ダライタである。
According to a fifth aspect of the present invention, the transmitting and receiving means according to the first aspect performs the initial communication according to the selected communication method by the I communication.
The IC card reader / writer is characterized in that it is performed on a C card.

【0012】[0012]

【作用】請求項1記載の発明において、発振手段は、所
定の周波数の基準クロックを発振し、クロック生成手段
は基準クロックに基づき複数の異なる周波数のクロック
を生成する。例えば、CPUのシステムクロックを基準
クロックとして使用することができる。選択手段は、異
なる複数の通信方式のいずれかを選択するとともに、こ
の通信方式に対応するクロックを上記複数のクロックの
なかから選択する。送受信手段は、選択手段によりそれ
ぞれ選択された通信方式およびクロックに基づきICカ
ードに対してデータの送受信を行う。
According to the first aspect of the invention, the oscillating means oscillates a reference clock having a predetermined frequency, and the clock generating means generates a plurality of clocks having different frequencies based on the reference clock. For example, the system clock of the CPU can be used as the reference clock. The selecting means selects one of a plurality of different communication methods and selects a clock corresponding to the communication method from the plurality of clocks. The transmission / reception unit transmits / receives data to / from the IC card based on the communication method and the clock selected by the selection unit.

【0013】したがって、本発明によれば、単一の発振
手段のみによって、通信方式およびクロック周波数の異
なる複数のICカードに対応することが可能となる。こ
れにより、ICカードリーダライタの装置の簡略化およ
び小型化を図ることができる。
Therefore, according to the present invention, it becomes possible to deal with a plurality of IC cards having different communication systems and different clock frequencies by using only a single oscillator. As a result, the IC card reader / writer device can be simplified and downsized.

【0014】請求項2記載の発明において、選択手段
は、調歩同期式通信方式またはクロック同期式通信方式
のいずれかを選択可能である。したがって、本発明によ
れば、単一の発振手段によって、調歩同期式またはクロ
ック同期式のいずれの通信方式にも対応することが可能
である。
According to the second aspect of the invention, the selecting means can select either the asynchronous communication system or the clock synchronous communication system. Therefore, according to the present invention, it is possible to support either the start-stop synchronization type or the clock synchronization type communication system by a single oscillating means.

【0015】請求項3記載の発明において、請求項1記
載のクロック生成手段は、基準クロックを分周すること
により、複数の異なる周波数のクロックを生成する。こ
れにより、単一の発振手段によって、複数の異なる周波
数のクロックを生成することができ、ICカードリーダ
ライタの装置の小型化等を図ることが可能となる。
In the invention of claim 3, the clock generating means of claim 1 divides the reference clock to generate a plurality of clocks of different frequencies. As a result, it is possible to generate a plurality of clocks having different frequencies with a single oscillating means, and it is possible to reduce the size of the IC card reader / writer device.

【0016】請求項4記載の発明において、請求項1記
載の選択手段は、ICカードリーダライタに通信回線を
介して接続されたホスト端末からのコマンドに基づき、
通信方式を選択する。すなわち、本発明によれば、ホス
ト端末を用いて通信方式およびクロック周波数を自由に
選択することが可能となる。
In the invention according to claim 4, the selecting means according to claim 1 is based on a command from a host terminal connected to the IC card reader / writer through a communication line.
Select the communication method. That is, according to the present invention, it becomes possible to freely select the communication system and the clock frequency using the host terminal.

【0017】請求項5記載の発明において、請求項1記
載の送受信手段は、選択された通信方式に応じた初期通
信をICカードに対して行っている。例えば、通信方式
によってICカードの初期化情報の受信タイミングが異
なっていたとしても、送受信手段は初期化情報を正確に
受信することが可能となる。
In the invention described in claim 5, the transmitting and receiving means according to claim 1 performs initial communication with the IC card according to the selected communication method. For example, even if the reception timing of the initialization information of the IC card differs depending on the communication method, the transmitting / receiving means can correctly receive the initialization information.

【0018】[0018]

【実施例】以下に、本発明の一実施例に係るICカード
リーダライタを図面を参照しながら説明する。図1は、
本実施例に係るICカードリーダライタの概略回路図で
ある。このICカードリーダライタは、CPU100、
RAM150、RS−232C用のIC160等により
構成されている。CPU100に接続されたクリスタル
101は、クロック発振用のものであり、9.8304
MHzのクロック(基準クロック)を発振可能なもので
ある。このクロックはCPU100内部において分周さ
れ、ポートP57からは4.9152MHzのシステム
クロックφが、ポートP72からは50kHzの同期ク
ロックSCKがそれぞれ出力さる構成となっている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An IC card reader / writer according to an embodiment of the present invention will be described below with reference to the drawings. Figure 1
It is a schematic circuit diagram of an IC card reader / writer according to the present embodiment. This IC card reader / writer has a CPU 100,
It is composed of a RAM 150, an IC 160 for RS-232C, and the like. The crystal 101 connected to the CPU 100 is for clock oscillation and is 9.8304.
It can oscillate a MHz clock (reference clock). This clock is divided inside the CPU 100, and the system clock φ of 4.9152 MHz is output from the port P57 and the synchronous clock SCK of 50 kHz is output from the port P72.

【0019】システムクロックφおよび同期クロックS
CKはトライステートのバッファ102、103を介し
てゲート105に入力されている。また、バッファ10
2、103にはインバータ104が接続されており、バ
ッファ102、103のいずれかを選択的に活性化する
ことが可能である。例えば、ポートP10がハイレベル
である場合には、バッファ102が活性化し、ゲート1
05からシステムクロックφが出力される。また、ポー
トP10がロウレベルである場合には、バッファ103
が活性化し、ゲート105から同期クロックSCKが出
力される。
System clock φ and synchronous clock S
CK is input to the gate 105 via the tristate buffers 102 and 103. Also, the buffer 10
An inverter 104 is connected to 2 and 103, and either of the buffers 102 and 103 can be selectively activated. For example, when the port P10 is at the high level, the buffer 102 is activated and the gate 1
The system clock φ is output from 05. If the port P10 is at low level, the buffer 103
Are activated, and the synchronous clock SCK is output from the gate 105.

【0020】RS−232C用のIC160は、図示さ
れていないホスト端末とのデータ通信を行うためのもの
であって、CPU100によりその動作が制御される。
The RS-232C IC 160 is for performing data communication with a host terminal (not shown), and its operation is controlled by the CPU 100.

【0021】図2は、CPU100内部のシステムクロ
ックφおよび同期クロックSCKの発生回路をブロック
図で表したものである。クリスタル101および発振回
路110は、9.8304MHzのクロックを発振する
ためのものである。このマスタクロックは、分周回路1
11により4.9152MHzに分周され、システムク
ロックφが生成される。システムクロックφは、分周回
路112によりさらに分周され50kHzの同期クロッ
クSCKが生成される。システムクロックφおよび同期
クロックSCKは上述したように、バッファ102、1
03により選択的にICカードに出力される。
FIG. 2 is a block diagram showing a circuit for generating the system clock φ and the synchronous clock SCK inside the CPU 100. The crystal 101 and the oscillator circuit 110 are for oscillating a clock of 9.8304 MHz. This master clock is divided by frequency divider 1
The frequency is divided into 4.9152 MHz by 11, and the system clock φ is generated. The system clock φ is further divided by the dividing circuit 112 to generate a 50 kHz synchronous clock SCK. The system clock φ and the synchronous clock SCK are the buffers 102, 1 as described above.
It is selectively output to the IC card by 03.

【0022】図3に、ICカードリーダライタのコマン
ドの一例を表す。これらのコマンドは、ホスト端末から
ICカードリーダライタに送信されるものである。すな
わち、ホスト端末からICカードリーダライタにこれら
のコマンドを送信することにより、Cカードの動作を制
御することが可能となる。同図において、コマンド”C
0”および”C1”は、調歩同期式モード、クロック同
期式モードに対応したクロックを切り換えるためのもの
である。したがって、ホスト端末からICカードリーダ
ライタにコマンド”C0”を送信すると、ICカードリ
ーダライタは調歩同期式モードに遷移し、コマンド”C
1”を送信するとICカードリーダライタはクロック同
期式モードに遷移する。
FIG. 3 shows an example of commands of the IC card reader / writer. These commands are transmitted from the host terminal to the IC card reader / writer. That is, the operation of the C card can be controlled by transmitting these commands from the host terminal to the IC card reader / writer. In the figure, the command "C
0 "and" C1 "are for switching the clock corresponding to the asynchronous mode and the clock synchronous mode. Therefore, when the command" C0 "is transmitted from the host terminal to the IC card reader / writer, the IC card reader The writer transits to the asynchronous mode, and the command "C
When 1 "is transmitted, the IC card reader / writer transits to the clock synchronous mode.

【0023】続いて、以上のように構成されたICカー
ドリーダライタの動作を説明する。
Next, the operation of the IC card reader / writer configured as described above will be described.

【0024】図4は本実施例に係るICカードリーダラ
イタのメインフローチャートである。このフローチャー
トにおいて、先ずCPU100はポートの初期化を行う
(S101)。すなわち、CPU100は、ポートP1
0、P11、P12、P14、P15を出力ポートに設
定し、ポートP13、P16を入力ポートに設定する。
また、CPU100は、ポートP10、P11、P1
4、P15、P15に”0”(ロウレベル)を出力し、
ポートP12に”1”(ハイレベル)を出力する。
FIG. 4 is a main flowchart of the IC card reader / writer according to this embodiment. In this flowchart, the CPU 100 first initializes the port (S101). That is, the CPU 100 uses the port P1
0, P11, P12, P14, and P15 are set as output ports, and ports P13 and P16 are set as input ports.
In addition, the CPU 100 uses the ports P10, P11, P1.
"0" (low level) is output to 4, P15, P15,
"1" (high level) is output to the port P12.

【0025】次に、CPU100は、シリアルコミュニ
ケーションインタフェースSCI、SCI2の設定を行
う(S102)。SCI1はICカードとの通信方式を
設定するためのものであり、SCI2はRS−232C
用IC160に対する通信方式を設定するためのもので
ある。リセット処理の後、SCI1およびSCI2を調
歩同期式モードに設定し、通信速度を9600bpsと
する。また、キャラクタフォーマットは8ビットデー
タ、偶数パリティ、ストップビットは1とする。さら
に、CPU100はシステムクロックφ用のポートP5
7および同期クロック用のポートP72を出力用ポート
に設定する(S103、S104)。
Next, the CPU 100 sets the serial communication interfaces SCI and SCI2 (S102). SCI1 is for setting the communication method with the IC card, and SCI2 is RS-232C.
This is for setting the communication method for the IC 160 for use. After the reset process, SCI1 and SCI2 are set to the asynchronous mode and the communication speed is set to 9600 bps. The character format is 8-bit data, even parity, and stop bit is 1. Further, the CPU 100 uses the port P5 for the system clock φ.
7 and the synchronous clock port P72 are set as output ports (S103, S104).

【0026】CPU100がRS−232C用のIC1
60を介してホストコンピュータからコマンドを受信し
たとする(S105)。なお、データ通信はCRターミ
ネーションにより行われる。CPU100は、受信した
コマンドの処理を行い(S107)、レスポンスをホス
トコンピュータに送信する(S106)。かかる処理
(S105〜S107)を繰り返すことにより、ICカ
ードリーダライタはホストコンピュータの指示に従った
動作を行う。
CPU 100 is an IC1 for RS-232C
It is assumed that a command is received from the host computer via 60 (S105). The data communication is performed by CR termination. The CPU 100 processes the received command (S107) and sends a response to the host computer (S106). By repeating this processing (S105 to S107), the IC card reader / writer operates according to the instruction from the host computer.

【0027】図5は、クロック切り換え処理を表すフロ
ーチャートである。CPU100は、ホストコンピュー
タから送信されたコマンドのパラメータP1を識別す
る。パラメータP1が”0”であることは調歩同期式の
通信を行うことを示し、パラメータP1が”1”である
ことはクロック同期式通信を行うことを示している。し
たがって、パラメータP1がこれらのいずれにも該当し
ない場合(S201でNO)には、エラーレスポンスを
セットし(S209)、メインフローチャートに復帰す
る。
FIG. 5 is a flowchart showing the clock switching process. The CPU 100 identifies the parameter P1 of the command transmitted from the host computer. The parameter P1 being "0" indicates that the asynchronous communication is performed, and the parameter P1 being "1" indicates that the clock synchronous communication is performed. Therefore, when the parameter P1 does not correspond to any of these (NO in S201), an error response is set (S209) and the process returns to the main flowchart.

【0028】パラメータP1が”1”である場合(S2
02でYES)には、調歩同期式モードを表すモード0
を設定する(S203)。そして、CPU100は、ポ
ートP10に”1”を出力し、バッファ102を活性化
させる(S204)。これにより、ポートP57からシ
ステムクロックφが出力可能となる。また、CPU10
0はSCI2の初期化を行い(S205)、SCI2を
調歩同期式モードに設定する。
When the parameter P1 is "1" (S2
YES in 02) indicates the mode 0 indicating the start-stop synchronization mode.
Is set (S203). Then, the CPU 100 outputs "1" to the port P10 to activate the buffer 102 (S204). As a result, the system clock φ can be output from the port P57. Also, the CPU 10
0 initializes SCI2 (S205) and sets SCI2 to the asynchronous mode.

【0029】一方、パラメータP1が”0”である場合
(S202でNO)には、クロック同期式モードを表す
モード1を設定する(S206)。そして、CPU10
0は、ポートP10に”0”を出力し、バッファ103
を活性化させる(S207)。これにより、ポートP7
2から同期クロックSCKが出力可能となる。また、C
PU100はSCI2の初期化を行い(S208)、S
CI2をクロック同期式モードに設定する。以上の処理
の後、CPU100はメインフローチャートに復帰す
る。
On the other hand, when the parameter P1 is "0" (NO in S202), mode 1 representing the clock synchronous mode is set (S206). And the CPU 10
0 outputs “0” to the port P10, and the buffer 103
Is activated (S207). This allows port P7
The synchronous clock SCK can be output from 2. Also, C
The PU 100 initializes SCI2 (S208), and then S
Set CI2 to clock synchronous mode. After the above processing, the CPU 100 returns to the main flowchart.

【0030】図6は、ICカードのリセット処理を表す
フローチャートである。先ず、CPU100は、ICカ
ードがICカードリーダライタに挿入されたか否かを判
断する(S201)。ICカードが挿入されなかった場
合(S201でNO)には、エラーセットを行い(S3
09)、メインフローチャートに復帰する。ICカード
が挿入された場合(S301でYES)には、ポートP
12を”0”、ポートP11を”1”にした後(S30
2)、ポートP12に”1”を出力する(S303)。
これにより、ポートP12からリセット信号RSTが出
力され、ICカードのリセットが行われる。
FIG. 6 is a flowchart showing the IC card reset process. First, the CPU 100 determines whether an IC card has been inserted into the IC card reader / writer (S201). If the IC card is not inserted (NO in S201), error setting is performed (S3
09), and returns to the main flowchart. If an IC card is inserted (YES in S301), port P
After setting 12 to "0" and port P11 to "1" (S30
2), "1" is output to the port P12 (S303).
As a result, the reset signal RST is output from the port P12, and the IC card is reset.

【0031】次に、CPU100は、通信方式を表すモ
ードが”0”が否か、すなわち調歩同期式モードか否か
を判断する(S304)。調歩同期式モードに設定され
ている場合(S304でYES)には、調歩同期式通信
のタイミングでATR情報を受信する(S305)。一
方、調歩同期式モードに設定されていない場合、すなわ
ちクロック同期式モードに設定されている場合(S30
4でNO)には、クロック同期式通信のタイミングでA
TR情報を受信する(S306)。図8、図9に示すよ
うに、ICカードによってATR情報を受信するタイミ
ングが異なっている。図8において、I/O(IR)は
調歩同期式内部リセットカードの入出力データのタイミ
ングを表し、I/O(AR)は調歩同期式外部リセット
カードの入出力データのタイミングを表している。ま
た、I/O(SHR)はクロック同期式応答カードの入
出力データのタイミングを表している。図9は、クロッ
ク同期式のICカードのリセット時におけるタイミング
チャートである。
Next, the CPU 100 determines whether or not the mode indicating the communication system is "0", that is, whether or not it is the start-stop synchronization mode (S304). When the asynchronous mode is set (YES in S304), the ATR information is received at the timing of the asynchronous communication (S305). On the other hand, when the asynchronous mode is not set, that is, when the clock synchronous mode is set (S30
No in 4), A at the timing of clock synchronous communication
The TR information is received (S306). As shown in FIGS. 8 and 9, the timing of receiving the ATR information differs depending on the IC card. In FIG. 8, I / O (IR) represents the timing of input / output data of the start / stop synchronous reset card, and I / O (AR) represents the timing of input / output data of the start / stop external reset card. I / O (SHR) represents the timing of input / output data of the clock synchronous response card. FIG. 9 is a timing chart when the clock synchronous IC card is reset.

【0032】CPU100は、受信したATR情報が正
常か否かを判断し、ATR情報が正常でない場合(S3
07でNO)にはエラーセットを行い(S309)、A
TR情報が正常である場合(S307でYES)にはレ
スポンスセットを行う(S308)。以上の処理の後、
CPU100はメインフローチャートに復帰する。
The CPU 100 judges whether or not the received ATR information is normal, and when the ATR information is not normal (S3
The error is set to NO in 07) (S309), and A
If the TR information is normal (YES in S307), a response set is performed (S308). After the above processing,
The CPU 100 returns to the main flowchart.

【0033】図7は、ICカードリーダライタおよびI
Cカード間におけるコマンド処理を表すフローチャート
である。CPU100がICカードからのコマンドを受
信しない場合(S401でNO)には、R/Wコマンド
処理の後(S407)、ICカードに対するレスポンス
セットを行う(S408)。CPU100がICカード
からのコマンドを受信した場合(S401でYES)に
は、CPU100はS402以降の処理を実行する。
FIG. 7 shows an IC card reader / writer and I
It is a flow chart showing command processing between C cards. When the CPU 100 does not receive the command from the IC card (NO in S401), after the R / W command processing (S407), the response set for the IC card is performed (S408). When the CPU 100 receives the command from the IC card (YES in S401), the CPU 100 executes the processes of S402 and thereafter.

【0034】S402において、CPU100はモード
が”0”か否か、すなわち調歩同期式モードに設定され
ているか否かを判断する(S402)。調歩同期式モー
ドに設定されている場合(S402でYES)には、C
PU100は調歩同期式による送信および受信を行う
(S403、S404)。一方、クロック同期式モード
に設定されている場合(S402でNO)には、CPU
100はクロック同期式による送信および受信を行う
(S405、S406)。以上の処理が終了した後、C
PU100はメインフローチャートに復帰する。
In S402, the CPU 100 determines whether or not the mode is "0", that is, whether or not the start / stop synchronization mode is set (S402). When the start / stop synchronization mode is set (YES in S402), C
The PU 100 performs transmission / reception in an asynchronous method (S403, S404). On the other hand, when the clock synchronous mode is set (NO in S402), the CPU
100 performs transmission and reception by the clock synchronous method (S405, S406). After the above processing is completed, C
The PU 100 returns to the main flowchart.

【0035】なお、本発明は、上述した実施例に限定さ
れることなく、本発明の趣旨を逸脱しない範囲において
実施可能である。例えば、クロック同期式モードにおい
て、ICカードに応じてクロック周波数を切り換えても
よい。
The present invention is not limited to the above-mentioned embodiments and can be carried out within the scope of the present invention. For example, in the clock synchronous mode, the clock frequency may be switched according to the IC card.

【0036】[0036]

【発明の効果】以上説明してきたように、本発明によれ
ば、通信方式に応じた周波数のクロックを分周すること
により、通信方式およびクロック周波数が異なる種々の
ICカードに対してデータ通信を行っている。すなわ
ち、単一の発振回路によるクロックを分周し、周波数の
異なる複数のクロックを生成しているため、複数の発振
回路を用意する必要がなくなる。この結果ICカードリ
ーダライタの装置構成の簡略化および小型化を図ること
が可能となる。
As described above, according to the present invention, by dividing a clock having a frequency corresponding to a communication system, data communication can be performed with respect to various IC cards having different communication systems and clock frequencies. Is going. That is, since a clock generated by a single oscillator circuit is divided to generate a plurality of clocks having different frequencies, it is not necessary to prepare a plurality of oscillator circuits. As a result, the device configuration of the IC card reader / writer can be simplified and downsized.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例に係るICカードリーダライ
タの概略回路図である。
FIG. 1 is a schematic circuit diagram of an IC card reader / writer according to an embodiment of the present invention.

【図2】本発明の一実施例に係るICカードリーダライ
タのクロック生成回路のブロック図である。
FIG. 2 is a block diagram of a clock generation circuit of an IC card reader / writer according to an embodiment of the present invention.

【図3】本発明の一実施例に係るICカードリーダライ
タのコマンドの一例を示す図である。
FIG. 3 is a diagram showing an example of commands of an IC card reader / writer according to an embodiment of the present invention.

【図4】本発明の一実施例に係るICカードリーダライ
タのメインフローチャートである。
FIG. 4 is a main flowchart of an IC card reader / writer according to an embodiment of the present invention.

【図5】本発明の一実施例に係るICカードリーダライ
タのクロック切り換え処理を表すフローチャートであ
る。
FIG. 5 is a flowchart showing a clock switching process of the IC card reader / writer according to the embodiment of the present invention.

【図6】本発明の一実施例に係るICカードリーダライ
タのリセット処理を表すフローチャートである。
FIG. 6 is a flowchart showing a reset process of the IC card reader / writer according to the embodiment of the present invention.

【図7】本発明の一実施例に係るICカードリーダライ
タのコマンド処理を表すフローチャートである。
FIG. 7 is a flowchart showing command processing of the IC card reader / writer according to the embodiment of the present invention.

【図8】本発明の一実施例に係るICカードのタイミン
グチャートである。
FIG. 8 is a timing chart of an IC card according to an embodiment of the present invention.

【図9】本発明の一実施例に係るICカードのタイミン
グチャートである。
FIG. 9 is a timing chart of an IC card according to an embodiment of the present invention.

【図10】調歩同期式通信およびクロック同期式通信を
説明するための図である。
FIG. 10 is a diagram for explaining asynchronous communication and clock synchronous communication.

【符号の説明】[Explanation of symbols]

100 CPU(発振手段、クロック生成手段、送受信
手段) 101 クリスタル(発振手段) 102、103 バッファ(選択手段) 110 発振回路(発振手段) 111、112 分周回路(クロック生成手段)
100 CPU (oscillation means, clock generation means, transmission / reception means) 101 Crystal (oscillation means) 102, 103 Buffer (selection means) 110 Oscillation circuit (oscillation means) 111, 112 Dividing circuit (clock generation means)

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ICカードに対してデータの送受信を行
うICカードリーダライタにおいて、 所定の周波数の基準クロックを発振させる発振手段と、 基準クロックに基づき、周波数の異なる複数のクロック
を生成可能なクロック生成手段と、 複数の通信方式のうちのいずれかの通信方式を選択し、
この通信方式に対応するクロックを、クロック生成手段
により生成された複数のクロックのなかから選択する選
択手段と、 選択手段によりそれぞれ選択された通信方式およびクロ
ックに基づきICカードに対してデータの送受信を行う
送受信手段とを備えたことを特徴とするICカードリー
ダライタ。
1. An IC card reader / writer that transmits and receives data to and from an IC card, and oscillating means for oscillating a reference clock of a predetermined frequency; and a clock capable of generating a plurality of clocks of different frequencies based on the reference clock. Select a communication method from the generation means and a plurality of communication methods,
Selection means for selecting a clock corresponding to this communication method from a plurality of clocks generated by the clock generation means, and transmission / reception of data to / from the IC card based on the communication method and the clock respectively selected by the selection means. An IC card reader / writer, comprising: a transmission / reception means for performing.
【請求項2】 上記選択手段は、調歩同期式通信方式ま
たはクロック同期式通信方式のいずれかを選択可能であ
ることを特徴とする請求項1記載のICカードリーダラ
イタ。
2. The IC card reader / writer according to claim 1, wherein the selecting means is capable of selecting either an asynchronous communication system or a clock communication system.
【請求項3】 請求項1記載のクロック生成手段は、基
準クロックを分周することにより、周波数の異なる複数
のクロックを生成することを特徴としたICカードリー
ダライタ。
3. The IC card reader / writer according to claim 1, wherein the clock generating means generates a plurality of clocks having different frequencies by dividing the reference clock.
【請求項4】 請求項1記載の選択手段は、ICカード
リーダライタに通信回線を介して接続されたホスト端末
からのコマンドに基づき、通信方式を選択することを特
徴とするICカードリーダライタ。
4. The IC card reader / writer according to claim 1, wherein the selecting means selects a communication method based on a command from a host terminal connected to the IC card reader / writer via a communication line.
【請求項5】 請求項1記載の送受信手段は、選択され
た通信方式に応じた初期通信をICカードに対して行う
ことを特徴とするICカードリーダライタ。
5. The IC card reader / writer according to claim 1, wherein the transmitting / receiving means performs initial communication with the IC card according to the selected communication method.
JP6085640A 1994-03-31 1994-03-31 Ic card reader/writer Pending JPH07271926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6085640A JPH07271926A (en) 1994-03-31 1994-03-31 Ic card reader/writer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6085640A JPH07271926A (en) 1994-03-31 1994-03-31 Ic card reader/writer

Publications (1)

Publication Number Publication Date
JPH07271926A true JPH07271926A (en) 1995-10-20

Family

ID=13864432

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6085640A Pending JPH07271926A (en) 1994-03-31 1994-03-31 Ic card reader/writer

Country Status (1)

Country Link
JP (1) JPH07271926A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6553506B1 (en) 1998-03-31 2003-04-22 Seiko Epson Corporation Information processing device and electronic equipment
US6842395B2 (en) 2001-11-05 2005-01-11 Matsushira Electric Industrial Co., Ltd. Semiconductor memory card, method of controlling the same and interface apparatus for semiconductor memory card
JP2006060363A (en) * 2004-08-18 2006-03-02 Renesas Technology Corp Semiconductor integrated circuit and non-contact ic card

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6553506B1 (en) 1998-03-31 2003-04-22 Seiko Epson Corporation Information processing device and electronic equipment
WO2004102387A1 (en) * 1998-03-31 2004-11-25 Yoichi Hijikata Information processor and electronic device
US6842395B2 (en) 2001-11-05 2005-01-11 Matsushira Electric Industrial Co., Ltd. Semiconductor memory card, method of controlling the same and interface apparatus for semiconductor memory card
JP2006060363A (en) * 2004-08-18 2006-03-02 Renesas Technology Corp Semiconductor integrated circuit and non-contact ic card

Similar Documents

Publication Publication Date Title
JP2018520439A (en) Electronic unit and method carried out in the electronic unit
US5564061A (en) Reconfigurable architecture for multi-protocol data communications having selection means and a plurality of register sets
JP4113750B2 (en) PC card control device and computer system including this PC card control device
JPH10154021A (en) Clock switching device and clock switching method
JPH07271926A (en) Ic card reader/writer
US7003277B2 (en) Portable communication terminal, communication method of the portable communication terminal, program, and recording medium having the program recorded thereon
JP4289868B2 (en) Semiconductor memory card, control method therefor, and interface device for semiconductor memory card
JP3666237B2 (en) Information processing apparatus and electronic apparatus
JP2002183692A (en) Ic card and ic card system
JP2006304011A (en) Interface circuit
US20030101366A1 (en) Timer apparatus which can simulatenously control a plurality of timers
JPH08221174A (en) Key input processing circuit
KR100734521B1 (en) Intellectual Property Module for System on Chip
JP2002251367A (en) Card device
JP2002101076A (en) Serial communication system, serial communications equipment, serial communication method, and medium recorded with serial communication control program
JP4097377B2 (en) Microcomputer
JPH06111085A (en) Noncontact storage medium
CN118051450A (en) General input/output interface circuit, system on chip and electronic equipment
JPH0439791A (en) Ic card and ic card system
JPH06342418A (en) System and method for management of common terminal equipment by use of memory card
JPS58104551A (en) Data transmitter
JPS6292006A (en) Machine interface device
JPH0537588A (en) Communication equipment
JPH0887442A (en) Memory device and electronic equipment using the same
JPH04213182A (en) Ic card reader/writer