JP2004326685A - IC card connection device - Google Patents
IC card connection device Download PDFInfo
- Publication number
- JP2004326685A JP2004326685A JP2003124052A JP2003124052A JP2004326685A JP 2004326685 A JP2004326685 A JP 2004326685A JP 2003124052 A JP2003124052 A JP 2003124052A JP 2003124052 A JP2003124052 A JP 2003124052A JP 2004326685 A JP2004326685 A JP 2004326685A
- Authority
- JP
- Japan
- Prior art keywords
- data
- card
- parity
- reception
- error
- 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.)
- Granted
Links
Images
Abstract
【課題】ノイズ等の外乱要因に対して、ICカードから送られる信号を正確に受信するとともに、受信バッファのオーバーフローを防止し、CPUが受信データを読み出す時間的制約を大幅に緩和する。
【解決手段】パリティ検査やフレーム検査の結果を受信データと一対にして受信バッファに格納するとともに、パリティ検査やフレーム検査の結果にもとづいて受信バッファの書き込み制御を行うことによって、正確にデータを受信することができるICカード接続装置を提供する。
【選択図】 図1The present invention accurately receives a signal transmitted from an IC card in response to a disturbance factor such as noise, prevents overflow of a reception buffer, and greatly eases a time constraint for a CPU to read received data.
SOLUTION: The data of a parity check or a frame check is paired with received data and stored in a receive buffer, and the write control of the receive buffer is performed based on the result of the parity check or the frame check, thereby accurately receiving data. An IC card connection device is provided.
[Selection diagram] Fig. 1
Description
【0001】
【発明の属する技術分野】
ICカードから送られてくるデータを受信するICカード接続装置に関する。
【0002】
【従来の技術】
ICカード接続装置(リーダ・ライタ)の従来の一般的な構成を図13に示す。ICカードに関する規格には、IEC/ISO7816がある。図13において、100はCPUである。201は送信バッファであり、CPUから送られてくる送信データを一時的に格納する。202はパリティ生成部であり、送信データのパリティを算出し付加する。203はパラレル/シリアル変換部であり、スタートビット、送信データおよびパリティビットをシリアル送出する。204は再送信要求信号生成部であり、受信データにパリティエラーがある場合に再送信要求信号を生成し、ICカードに送出する。211は送受信切替部であり、ICカードとの通信において送信と受信を切り替える。212はシリアル/パラレル変換部であり、ICカードからシリアルに送られてくるスタートビット、データ、パリティビットを受信する。213はパリティ検査部であり、受信したデータのパリティを検査し、パリティエラーがある場合には再送信要求信号生成部204に通知する。401は受信バッファであり、受信したデータがCPUに読み込まれるまで一時的に格納する。このように構成された従来のICカード接続装置のデータ受信について説明する。
【0003】
ICカードから送られてくるデータのフォーマットを図14に示す。ICカードのデータ端子は未通信時ハイインピーダンス状態を保持し、プルアップ抵抗により信号レベルHighに固定されている。ICカードのデータ伝送は信号レベルLowのスタートビットから始まり、続いてデータ8ビット(Da、Db、Dc、Dd、De、Df、Dg、Dh)、パリティビットから構成される。パリティビットは、データ8ビットの信号レベルHighの個数を数え、その個数が偶数ならば信号レベルLowを、奇数ならば信号レベルHighとなるように設定されている。尚、このように付与されるパリティを偶パリティと呼ぶ。ICカードはパリティビット送出後、データ端子をハイインピーダンス状態に戻す。データ端子はプルアップ抵抗によって信号レベルHighに固定される。これに対して受信側のICカード接続装置は、受信したデータ8ビットから算出されるパリティビットの値と受信したパリティビットの値を比較する。パリティビットが正しい場合、受信側は次のデータの受信に備える。パリティビットが正しくない場合、パリティエラーが発生したと判断し、スタートビットの先端から(10.5±0.2)etuから最小1etu、最大2etuの間、誤り信号としてデータ端子を信号レベルLowにする。送信側はスタートビットから(11±0.2)etu後にデータ端子を検査し、次の動作を行う。
【0004】
・データ端子が信号レベルHighの場合、正常に受信されたと判断する
・データ端子が信号レベルLowの場合、つまり誤り信号を受信した場合、伝送が正しく行われなかったと判断し、データの再送を行う。
【0005】
ICカードはユーザが携帯して使用することが考えられるが、端子が露出しているため摩耗や腐食などによって端子が劣化しやすく、汚れ、水、静電気などの影響を受けやすい。したがって、ICカード接続装置にはこのような外乱要因に対してICカードとのデータの送受信を正しく確実に行うことが求められている。また、広くICカードが普及するためには、上記の機能を安価に実現するとともに、ICカード接続装置の制御を行うCPUの処理負荷を軽減する必要がある。
【0006】
従来のICカード接続装置では、受信バッファにデータを格納した後、次のデータの受信を完了するまでに受信バッファのデータをCPUが読み出さなければ、受信バッファのデータが次のデータで上書きされて正しく読み出すことができない。このように、一定の時間内にCPUが受信データの読み出しを行うことを保証する必要がある。なお、この場合にCPUが受信データを読み出す必要がある時間間隔は、受信データのボーレートに依存する。
【0007】
また、図16は、送信側の伝送レートに対して受信タイミングがずれた場合に正しくデータを受信できない例を示している。送信側はスタートビットSの「0」の後、ビット列「00001010」およびパリティビットPの「1」を送信している。これに対して、受信側は図示したサンプリングタイミングでビット列「00000101」を受信する。この図の場合、パリティビットが一致するため、パリティエラーは発生しない。従来はこのような伝送誤りを検出する機能はなく、間違ったデータを受信していた。このような伝送誤りは、キャラクタ保護期間の信号レベルを検査することによって、検出できる場合が多く、キャラクタ保護期間に信号レベルLowが検出されることをここではフレームエラーと呼ぶ。
【0008】
これに対して、例えば特許文献1におけるICカード接続装置のように、CPUによる受信データの読み出しが、次のデータの受信完了に間に合わない場合の対策が提案されてきた。これに対しては、受信データをCPUが読み取るまで一時的に蓄えておく受信バッファの容量を大きくすれば、CPUの時間応答性の制約を小さくすることができる。
【0009】
【特許文献1】
特開平9−179948号公報
【0010】
【発明が解決しようとする課題】
しかしながら上記従来の構成では、複数の受信データにパリティエラーやフレームエラーがある場合に、それをCPUに対してどのように通知するかという問題点を有していた。
【0011】
また、受信エラーによって再送信要求を繰り返す状況においては、不正な受信データが連続して受信バッファに格納され、バッファがオーバーフローする恐れがあるという問題点を有していた。
【0012】
【課題を解決するための手段】
この目的を達成するために、本発明のICカード接続装置は、複数バイト分の受信データ、および各受信データに対応したパリティ検査結果やフレーム検査結果を対にして格納する受信バッファを備え、CPUが受信バッファから一対の受信データ、パリティ検査結果、フレーム検査結果を容易に読み出すことを可能とし、受信データが正しく受信されたものかを容易に判断することができる。このように本発明のICカード接続装置はパリティエラーやフレームエラーが発生しても、確実に正しいデータを受信できることを特徴としたものである。
【0013】
本発明によれば、CPUが受信データを読み出す時間的制約を大きく緩和するとともに、ICカードとの間の確実なデータ伝送を実現することができる。
【0014】
【発明の実施の形態】
本発明の請求項1に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果を一対にして格納する受信バッファを備えることを特徴とするものであり、ICカードから送られてくるデータを確実に受信するという作用を有する。
【0015】
本発明の請求項2に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果を一対にして格納する受信バッファを複数備えることを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0016】
本発明の請求項3に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果を一対にして格納する受信バッファを備え、その受信バッファがFIFOメモリで構成されることを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0017】
本発明の請求項4に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果を一対にして格納する受信バッファと、パリティ検査の結果を参照してその受信バッファに対する書き込みを制御する書き込み制御部とを備え、受信エラーによって再送信要求を繰り返す状況において不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0018】
本発明の請求項5に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果を一対にして格納する受信バッファと、同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタと、同一データの受信におけるパリティエラーを検出した回数をカウントするエラー検出カウンタと、前記リトライ回数上限と前記パリティエラーを検出した回数を比較する比較部と、前記比較結果にもとづいてライトポインタを制御する書き込み制御部とを備え、受信エラーによる再送信要求を一定回数以上繰り返さないとともに、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0019】
本発明の請求項6に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびフレーム検査の結果を一対にして格納する受信バッファを備えることを特徴とするものであり、ICカードから送られてくるデータを確実に受信するという作用を有する。
【0020】
本発明の請求項7に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびフレーム検査の結果を一対にして格納する受信バッファを複数備えることを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0021】
本発明の請求項8に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびフレーム検査の結果を一対にして格納する受信バッファを備え、その受信バッファがFIFOメモリで構成されることを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0022】
本発明の請求項9に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびフレーム検査の結果を一対にして格納する受信バッファと、フレーム検査の結果を参照してその受信バッファに対する書き込みを制御する書き込み制御部とを備え、受信エラーによって再送信要求を繰り返す状況において不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0023】
本発明の請求項10に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびフレーム検査の結果を一対にして格納する受信バッファと、同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタと、同一データの受信におけるフレームエラーを検出した回数をカウントするエラー検出カウンタと、前記リトライ回数上限と前記フレームエラーを検出した回数を比較する比較部と、前記比較結果にもとづいてライトポインタを制御する書き込み制御部とを備え、受信エラーによる再送信要求を一定回数以上繰り返さないとともに、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0024】
本発明の請求項11に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果およびフレーム検査の結果を一対にして格納する受信バッファを備えることを特徴とするものであり、ICカードから送られてくるデータを確実に受信するという作用を有する。
【0025】
本発明の請求項12に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果およびフレーム検査の結果を一対にして格納する受信バッファを複数備えることを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0026】
本発明の請求項13に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果およびフレーム検査の結果を一対にして格納する受信バッファを備え、その受信バッファがFIFOメモリで構成されることを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0027】
本発明の請求項14に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果およびフレーム検査の結果を一対にして格納する受信バッファと、パリティ検査の結果およびフレーム検査の結果を参照してその受信バッファに対する書き込みを制御する書き込み制御部とを備え、受信エラーによって再送信要求を繰り返す状況において不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0028】
本発明の請求項15に記載の発明は、ICカードとの間でデータの送受信を行うICカード接続装置であって、ICカードから送られてくるデータおよびパリティ検査の結果およびフレーム検査の結果を一対にして格納する受信バッファと、同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタと、同一データの受信における受信エラーを検出した回数をカウントするエラー検出カウンタと、前記リトライ回数上限と前記受信エラーを検出した回数を比較する比較部と、前記比較結果にもとづいてライトポインタを制御する書き込み制御部を備え、受信エラーによる再送信要求を一定回数以上繰り返さないとともに、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするものであり、CPUが受信データを読み出す時間的制約を緩和するとともにICカードから送られてくるデータを確実に受信するという作用を有する。
【0029】
以下、本発明の実施の形態について、図1から図16を用いて説明する。
【0030】
(実施の形態1)
図1は、ICカードから送られてくるデータをパリティ検査の結果と一対にして受信バッファに格納するICカード接続装置を示す。図1において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に格納する送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。213は受信したパリティビットと受信データから算出されるパリティとを比較するパリティ検査部である。214は受信データとパリティ検査の結果を一対にして一時的に蓄えておく受信バッファである。500はICカードである。
【0031】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。ICカードからシリアルに送られてくるデータは、図14のようにスタートビットで始まり、データ8ビット、パリティビットで構成され、送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、パリティ検査部213において、受信データ8ビットから算出されるパリティと受信したパリティが一致するかを検査する。その後、受信データおよびパリティ検査の結果は受信バッファ214に格納される。パリティが一致しない場合は、再送信要求部204に通知され、再送信要求部204はICカード500に対して再送信要求信号を送出する。
【0032】
次に、受信バッファ214の構成について、図2を用いて説明する。図2は受信データ8ビットとパリティ検査の結果1ビットを一対とした合計9ビットを1ワードとするFIFO(First In First Out)メモリで構成され、ライトポインタWPが示すアドレスに受信データおよびパリティ検査の結果が書き込まれ、リードポインタRPが示すアドレスからCPU100がデータRDを読み出す。CPU100は、読み出したデータRDのパリティ検査結果のビットによって、受信データが正しいか否かを判断することができる。
【0033】
(実施の形態2)
図3は、ICカードから送られてくるデータおよびパリティ検査の結果を一対にして格納する受信バッファと、パリティ検査の結果を参照してその受信バッファに対する書き込みを制御する書き込み制御部とを備え、受信エラーによって再送信要求を繰り返す状況において不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするICカード接続装置を示す。図3において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に蓄える送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。213は受信したパリティビットと受信データから算出されるパリティとを比較するパリティ検査部である。214は受信データとパリティ検査の結果を一対にして一時的に蓄えておく受信バッファである。215はパリティ検査の結果を参照して、受信バッファに対する書き込みを制御する書き込み制御部である。500はICカードである。
【0034】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。ICカードからシリアルに送られてくるデータは、送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、パリティ検査部213において、受信データ8ビットから算出されるパリティと受信したパリティが一致するかを検査する。その後、受信データおよびパリティ検査の結果は受信バッファ214に格納される。パリティが一致しない場合、再送信要求部204に通知され、再送信要求部204はICカード500に対して再送信要求信号を送出し、書き込み制御部215はライトポインタWPをインクリメントしない。パリティが一致する場合、書き込み制御部215はライトポインタWPをインクリメントし、次の受信データの書き込みに備える。
【0035】
(実施の形態3)
図4は、ICカードから送られてくるデータおよびパリティ検査の結果を一対にして格納する受信バッファと、同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタと、同一データの受信におけるパリティエラーを検出した回数をカウントするエラー検出カウンタと、前記リトライ回数上限と前記パリティエラーを検出した回数を比較する比較部と、前記比較結果にもとづいてライトポインタを制御する書き込み制御部とを備え、受信エラーによる再送信要求を一定回数以上繰り返さないとともに、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするICカード接続装置を示す。図4において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に蓄える送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。213は受信したパリティビットと受信データから算出されるパリティとを比較するパリティ検査部である。301は同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタである。303は同一データの受信におけるパリティエラーを検出した回数をカウントするエラー検出カウンタである。302は前記リトライ回数上限と前記パリティエラーを検出した回数を比較する比較部である。215は前記比較結果にもとづいてライトポインタを制御する書き込み制御部である。500はICカードである。
【0036】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。CPU100は、ICカード接続装置200がデータ受信を開始する前に、同一データに対する再送信要求を行う回数の上限値をリトライ回数上限レジスタ301に設定する。エラー検出カウンタ303はカウンタ値を0にクリアされる。
【0037】
データ受信開始後、ICカードからシリアルに送られてくるデータは、送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、パリティ検査部213において、受信データ8ビットから算出されるパリティと受信したパリティが一致するかを検査する。その後、受信データおよびパリティ検査の結果は受信バッファ214に格納される。パリティが一致しない場合、エラー検出カウンタ303に通知され、エラー検出カウンタ303はカウンタ値をインクリメントする。比較部302において、エラー検出カウンタの値とリトライ回数上限レジスタの値が比較され、(エラー検出カウンタの値<リトライ回数上限レジスタの値)が成り立つ場合は、再送信要求部204にパリティエラーが通知され、再送信要求部204はICカード500に対して再送信要求信号を送出する。また、書き込み制御部215はライトポインタWPをインクリメントしない。これによって、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防止する。(エラー検出カウンタの値=リトライ回数上限レジスタの値)が成り立つ場合は、再送信要求部204にパリティエラーを通知せず、再送信要求部204はICカード500に対して再送信要求信号を送出しない。これによって、再送信要求を無限に繰り返すことを防止する。
【0038】
また、書き込み制御部215はライトポインタWPをインクリメントし、次の受信データの書き込みに備える。
【0039】
(実施の形態4)
図5は、ICカードから送られてくるデータをフレーム検査の結果と一対にして受信バッファに格納するICカード接続装置を示す。図5において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に格納する送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。216はキャラクタ保護期間におけるデータラインの信号レベルを検査するフレーム検査部である。217は受信データとフレーム検査の結果を一対にして一時的に蓄えておく受信バッファである。500はICカードである。
【0040】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。ICカードからシリアルに送られてくるデータは送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、フレーム検査部216において、キャラクタ保護期間におけるデータラインの信号レベルを検査する。その後、受信データおよびフレーム検査の結果は受信バッファ217に格納される。フレームエラーの場合は、再送信要求部204に通知され、再送信要求部204はICカード500に対して再送信要求信号を送出する。
【0041】
次に、受信バッファ217の構成について、図6を用いて説明する。図6は受信データ8ビットとフレーム検査の結果1ビットを一対とした合計9ビットを1ワードとするFIFOメモリで構成され、ライトポインタWPが示すアドレスに受信データおよびフレーム検査の結果が書き込まれ、リードポインタRPが示すアドレスからCPU100がデータRDを読み出す。CPU100は、読み出したデータRDのフレーム検査結果のビットによって、受信データが正しいか否かを判断することができる。
【0042】
(実施の形態5)
図7は、ICカードから送られてくるデータおよびフレーム検査の結果を一対にして格納する受信バッファと、フレーム検査の結果を参照してその受信バッファに対する書き込みを制御する書き込み制御部とを備え、受信エラーによって再送信要求を繰り返す状況において不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするICカード接続装置を示す。図7において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に蓄える送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。216はキャラクタ保護期間におけるデータラインの信号レベルを検査するフレーム検査部である。217は受信データとフレーム検査の結果を一対にして一時的に蓄えておく受信バッファである。215はフレーム検査の結果を参照して、受信バッファに対する書き込みを制御する書き込み制御部である。500はICカードである。
【0043】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。ICカードからシリアルに送られてくるデータは、送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、フレーム検査部216において、キャラクタ保護期間におけるデータラインの信号レベルを検査する。その後、受信データおよびフレーム検査の結果は受信バッファ217に格納される。フレームエラーの場合、再送信要求部204に通知され、再送信要求部204はICカード500に対して再送信要求信号を送出し、書き込み制御部215はライトポインタWPをインクリメントしない。フレームエラーでない場合、書き込み制御部215はライトポインタWPをインクリメントし、次の受信データの書き込みに備える。
【0044】
(実施の形態6)
図8は、ICカードから送られてくるデータおよびフレーム検査の結果を一対にして格納する受信バッファと、同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタと、同一データの受信におけるフレームエラーを検出した回数をカウントするエラー検出カウンタと、前記リトライ回数上限と前記フレームエラーを検出した回数を比較する比較部と、前記比較結果にもとづいてライトポインタを制御する書き込み制御部とを備え、受信エラーによる再送信要求を一定回数以上繰り返さないとともに、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするICカード接続装置を示す。図8において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に蓄える送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。216はキャラクタ保護期間におけるデータラインの信号レベルを検査するフレーム検査部である。217は受信データとフレーム検査の結果を一対にして一時的に蓄えておく受信バッファである。301は同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタである。303は同一データの受信におけるフレームエラーを検出した回数をカウントするエラー検出カウンタである。302は前記リトライ回数上限と前記フレームエラーを検出した回数を比較する比較部である。215は前記比較結果にもとづいてライトポインタを制御する書き込み制御部である。500はICカードである。
【0045】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。CPU100は、ICカード接続装置200がデータ受信を開始する前に、同一データに対する再送信要求を行う回数の上限値をリトライ回数上限レジスタ301に設定する。エラー検出カウンタ303はカウンタ値を0にクリアされる。
【0046】
データ受信開始後、ICカードからシリアルに送られてくるデータは、送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、フレーム検査部216において、キャラクタ保護期間におけるデータラインの信号レベルを検査する。その後、受信データおよびフレーム検査の結果は受信バッファ217に格納される。フレームエラーの場合、エラー検出カウンタ303に通知され、エラー検出カウンタ303はカウンタ値をインクリメントする。比較部302において、エラー検出カウンタの値とリトライ回数上限レジスタの値が比較され、(エラー検出カウンタの値<リトライ回数上限レジスタの値)が成り立つ場合は、再送信要求部204にフレームエラーが通知され、再送信要求部204はICカード500に対して再送信要求信号を送出する。また、書き込み制御部215はライトポインタWPをインクリメントしない。これによって、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防止する。(エラー検出カウンタの値=リトライ回数上限レジスタの値)が成り立つ場合は、再送信要求部204にフレームエラーを通知せず、再送信要求部204はICカード500に対して再送信要求信号を送出しない。これによって、再送信要求を無限に繰り返すことを防止する。
【0047】
また、書き込み制御部215はライトポインタWPをインクリメントし、次の受信データの書き込みに備える。
【0048】
(実施の形態7)
図9は、ICカードから送られてくるデータをパリティ検査の結果およびフレーム検査の結果と一対にして受信バッファに格納するICカード接続装置を示す。図9において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に格納する送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。218は受信したパリティビットと受信データから算出されるパリティとを比較するとともに、キャラクタ保護期間におけるデータラインの信号レベルを検査するフレーム/パリティ検査部である。219は受信データとパリティ検査の結果とフレーム検査の結果を一対にして一時的に蓄えておく受信バッファである。500はICカードである。
【0049】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。ICカードからシリアルに送られてくるデータは送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、フレーム/パリティ検査部218において、受信データ8ビットから算出されるパリティと受信したパリティが一致するかを検査するとともに、キャラクタ保護期間におけるデータラインの信号レベルを検査する。その後、受信データおよびフレーム検査の結果は受信バッファ219に格納される。パリティエラーまたはフレームエラーの場合は、再送信要求部204に通知され、再送信要求部204はICカード500に対して再送信要求信号を送出する。
【0050】
次に、受信バッファ219の構成について、図10を用いて説明する。図6は受信データ8ビットとパリティ検査の結果1ビットとフレーム検査の結果1ビットを一対とした合計10ビットを1ワードとするFIFOメモリで構成され、ライトポインタWPが示すアドレスに受信データおよびパリティ検査の結果およびフレーム検査の結果が書き込まれ、リードポインタRPが示すアドレスからCPU100がデータRDを読み出す。CPU100は、読み出したデータRDのパリティ検査結果のビットおよびフレーム検査結果のビットによって、受信データが正しいか否かを判断することができる。
【0051】
(実施の形態8)
図11は、ICカードから送られてくるデータおよびパリティ検査の結果およびフレーム検査の結果を一対にして格納する受信バッファと、パリティ検査およびフレーム検査の結果を参照してその受信バッファに対する書き込みを制御する書き込み制御部とを備え、受信エラーによって再送信要求を繰り返す状況において不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするICカード接続装置を示す。図11において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に蓄える送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。218は受信したパリティビットと受信データから算出されるパリティとを比較するとともに、キャラクタ保護期間におけるデータラインの信号レベルを検査するフレーム/パリティ検査部である。219は受信データとパリティ検査の結果とフレーム検査の結果を一対にして一時的に蓄えておく受信バッファである。215はフレーム/パリティ検査の結果を参照して、受信バッファに対する書き込みを制御する書き込み制御部である。500はICカードである。
【0052】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。ICカードからシリアルに送られてくるデータは、送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、フレーム/パリティ検査部218において、受信データ8ビットから算出されるパリティと受信したパリティが一致するかを検査するとともに、キャラクタ保護期間におけるデータラインの信号レベルを検査する。その後、受信データおよびパリティ検査の結果およびフレーム検査の結果は受信バッファ219に格納される。パリティエラーまたはフレームエラーの場合は、再送信要求部204に通知され、再送信要求部204はICカード500に対して再送信要求信号を送出し、書き込み制御部215はライトポインタWPをインクリメントしない。パリティエラーまたはフレームエラーでない場合、書き込み制御部215はライトポインタWPをインクリメントし、次の受信データの書き込みに備える。
【0053】
(実施の形態9)
図12は、ICカードから送られてくるデータおよびパリティ検査の結果およびフレーム検査の結果を一対にして格納する受信バッファと、同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタと、同一データの受信におけるパリティエラーまたはフレームエラーを検出した回数をカウントするエラー検出カウンタと、前記リトライ回数上限と前記受信エラーを検出した回数を比較する比較部と、前記比較結果にもとづいてライトポインタを制御する書き込み制御部とを備え、受信エラーによる再送信要求を一定回数以上繰り返さないとともに、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防ぐことを特徴とするICカード接続装置を示す。図12において、100はCPUである。200はICカード接続装置である。201は送信データを一時的に蓄える送信バッファである。202は送信データからパリティビットを生成するパリティ生成部である。203はスタートビット、送信データ8ビット、パリティビットをシリアルに送信するパラレル/シリアル変換部である。204はICカードに対して再送信要求信号を発行する再送信要求部である。211は、ICカードへのデータ送信とICカードからのデータ受信とを切り替える送受信切替部である。212はICカードからシリアルに送られてくるデータを受信するシリアル/パラレル変換部である。218は受信したパリティビットと受信データから算出されるパリティとを比較するとともに、キャラクタ保護期間におけるデータラインの信号レベルを検査するフレーム/パリティ検査部である。219は受信データとパリティ検査の結果とフレーム検査の結果を一対にして一時的に蓄えておく受信バッファである。301は同一データの受信における再送信要求回数の上限を規定するリトライ回数上限レジスタである。303は同一データの受信におけるパリティエラーまはたフレームエラーを検出した回数をカウントするエラー検出カウンタである。302は前記リトライ回数上限と前記受信エラーを検出した回数を比較する比較部である。215は前記比較結果にもとづいてライトポインタを制御する書き込み制御部である。500はICカードである。
【0054】
以上のように構成されたICカード接続装置について、以下にその動作を述べる。CPU100は、ICカード接続装置200がデータ受信を開始する前に、同一データに対する再送信要求を行う回数の上限値をリトライ回数上限レジスタ301に設定する。エラー検出カウンタ303はカウンタ値を0にクリアされる。
【0055】
データ受信開始後、ICカードからシリアルに送られてくるデータは、送受信切替部211を経て、シリアル/パラレル変換部212において受信される。続いて、フレーム/パリティ検査部218において、受信データ8ビットから算出されるパリティと受信したパリティが一致するかを検査するとともに、キャラクタ保護期間におけるデータラインの信号レベルを検査する。その後、受信データおよびパリティ検査の結果およびフレーム検査の結果は受信バッファ219に格納される。パリティエラーまたはフレームエラーの場合、エラー検出カウンタ303に通知され、エラー検出カウンタ303はカウンタ値をインクリメントする。比較部302において、エラー検出カウンタの値とリトライ回数上限レジスタの値が比較され、(エラー検出カウンタの値<リトライ回数上限レジスタの値)が成り立つ場合は、再送信要求部204に受信エラーが通知され、再送信要求部204はICカード500に対して再送信要求信号を送出する。また、書き込み制御部215はライトポインタWPをインクリメントしない。これによって、不正な受信データが連続して受信バッファに格納されることによるバッファのオーバーフローを防止する。(エラー検出カウンタの値=リトライ回数上限レジスタの値)が成り立つ場合は、再送信要求部204に受信エラーを通知せず、再送信要求部204はICカード500に対して再送信要求信号を送出しない。これによって、再送信要求を無限に繰り返すことを防止する。
【0056】
また、書き込み制御部215はライトポインタWPをインクリメントし、次の受信データの書き込みに備える。
【0057】
【発明の効果】
上記のように本発明によれば、従来のICカード接続装置では検出できなかったフレームエラーや受信オーバーランを検出し、パリティエラー検出時の再送信要求を行う機能を利用して再送信を要求し、同一データを再度受信することによって、ICカードから送られてくるデータを確実に受信することができる。
【図面の簡単な説明】
【図1】本発明の実施の形態1におけるICカード接続装置のシステム図
【図2】本発明の実施の形態1における受信バッファの構成図
【図3】本発明の実施の形態2におけるICカード接続装置のシステム図
【図4】本発明の実施の形態3におけるICカード接続装置のシステム図
【図5】本発明の実施の形態4におけるICカード接続装置のシステム図
【図6】本発明の実施の形態4における受信バッファの構成図
【図7】本発明の実施の形態5におけるICカード接続装置のシステム図
【図8】本発明の実施の形態6におけるICカード接続装置のシステム図
【図9】本発明の実施の形態7におけるICカード接続装置のシステム図
【図10】本発明の実施の形態7における受信バッファの構成図
【図11】本発明の実施の形態8におけるICカード接続装置のシステム図
【図12】本発明の実施の形態9におけるICカード接続装置のシステム図
【図13】従来のICカード接続装置のシステム図
【図14】従来の通常のICカードの伝送データフォーマット図
【図15】従来の受信エラー時の再送信要求信号を含むICカードの伝送データフォーマット図
【図16】従来のICカードとICカード接続装置間のデータ伝送におけるタイミング図
【符号の説明】
100 CPU
200 ICカード接続装置
201 送信バッファ
202 パリティ生成部
203 パラレル/シリアル変換部
204 再送信要求信号生成部
211 送受信切替部
212 シリアル/パラレル変換部
213 パリティ検査部
214 受信バッファ
215 書き込み制御部
216 フレーム検査部
217 受信バッファ
218 フレーム/パリティ検査部
219 受信バッファ
301 リトライ回数上限レジスタ
302 比較部
303 エラー検出カウンタ
401 受信バッファ
500 ICカード
RD1 CPU100が受信バッファ214から読み出したデータ
RD2 CPU100が受信バッファ217から読み出したデータ
RD3 CPU100が受信バッファ219から読み出したデータ
RP CPU100が受信バッファからデータを読み出すアドレス
WP 受信バッファにデータを書き込むアドレス
TD CPU100が送信バッファ201に書き込む送信データ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an IC card connection device that receives data sent from an IC card.
[0002]
[Prior art]
FIG. 13 shows a conventional general configuration of an IC card connection device (reader / writer). IEC / ISO7816 is a standard for IC cards. In FIG. 13,
[0003]
FIG. 14 shows the format of the data sent from the IC card. The data terminal of the IC card maintains a high impedance state when no communication is performed, and is fixed at a signal level High by a pull-up resistor. The data transmission of the IC card starts with a start bit at the signal level Low, and subsequently consists of 8 data bits (Da, Db, Dc, Dd, De, Df, Dg, Dh) and parity bits. The parity bit is set so that the number of signal levels High of 8 bits of data is counted. If the number is even, the signal level is Low, and if the number is odd, the signal level is High. Note that the parity provided in this manner is called even parity. After transmitting the parity bit, the IC card returns the data terminal to the high impedance state. The data terminal is fixed at the signal level High by a pull-up resistor. In contrast, the receiving-side IC card connection device compares the value of the parity bit calculated from the received 8 bits of data with the value of the received parity bit. If the parity bit is correct, the receiver prepares to receive the next data. If the parity bit is not correct, it is determined that a parity error has occurred, and the data terminal is set to the signal level Low as an error signal from (10.5 ± 0.2) etu to the minimum 1 etu and the maximum 2 etu from the start of the start bit. I do. The transmitting side checks the data terminal after (11 ± 0.2) etu from the start bit, and performs the following operation.
[0004]
If the data terminal is at the signal level High, it is determined that the data has been received normally
When the data terminal is at the signal level Low, that is, when an error signal is received, it is determined that the transmission has not been correctly performed, and the data is retransmitted.
[0005]
It is conceivable that the user carries the IC card with the user, but since the terminal is exposed, the terminal is liable to be deteriorated due to abrasion or corrosion, and is easily affected by dirt, water, static electricity and the like. Therefore, the IC card connection device is required to correctly and reliably transmit and receive data to and from the IC card in response to such disturbance factors. In order for IC cards to be widely used, it is necessary to realize the above functions at low cost and to reduce the processing load on the CPU that controls the IC card connection device.
[0006]
In the conventional IC card connection device, after the data is stored in the reception buffer, if the data in the reception buffer is not read by the CPU until the reception of the next data is completed, the data in the reception buffer is overwritten with the next data. Cannot read correctly. Thus, it is necessary to guarantee that the CPU reads the received data within a certain time. In this case, the time interval at which the CPU needs to read the received data depends on the baud rate of the received data.
[0007]
FIG. 16 shows an example in which data cannot be correctly received when the reception timing is shifted from the transmission rate on the transmission side. After transmitting the start bit S “0”, the transmitting side transmits the bit string “00001010” and the parity bit P “1”. On the other hand, the receiving side receives the bit string “00000101” at the illustrated sampling timing. In this case, since the parity bits match, no parity error occurs. Conventionally, there has been no function of detecting such a transmission error, and incorrect data has been received. Such a transmission error can often be detected by checking the signal level during the character protection period, and the detection of the signal level Low during the character protection period is referred to as a frame error.
[0008]
On the other hand, a countermeasure has been proposed in a case where the reading of received data by the CPU is not in time for the completion of reception of the next data, such as an IC card connection device in
[0009]
[Patent Document 1]
JP-A-9-179948
[0010]
[Problems to be solved by the invention]
However, the above-described conventional configuration has a problem that, when there is a parity error or a frame error in a plurality of received data, how to notify the CPU of the parity error or the frame error.
[0011]
Further, in a situation where a retransmission request is repeated due to a reception error, there is a problem that incorrect reception data is continuously stored in the reception buffer, and the buffer may overflow.
[0012]
[Means for Solving the Problems]
In order to achieve this object, an IC card connection device according to the present invention includes a reception buffer for storing a plurality of bytes of received data, and a parity check result and a frame check result corresponding to each received data in a pair. Makes it possible to easily read out a pair of received data, a parity check result, and a frame check result from a reception buffer, and easily determine whether or not the received data is correctly received. As described above, the IC card connection device of the present invention is characterized in that correct data can be reliably received even if a parity error or a frame error occurs.
[0013]
ADVANTAGE OF THE INVENTION According to this invention, while the time restriction | limiting which a CPU reads received data can be eased greatly, reliable data transmission with an IC card can be implement | achieved.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
An invention according to
[0015]
The invention according to
[0016]
According to a third aspect of the present invention, there is provided an IC card connection apparatus for transmitting / receiving data to / from an IC card, and stores a pair of data sent from the IC card and a result of the parity check. A reception buffer is provided, and the reception buffer is constituted by a FIFO memory. The time buffer for reading the reception data by the CPU is relaxed and the data sent from the IC card is reliably received. It has the action of:
[0017]
According to a fourth aspect of the present invention, there is provided an IC card connection device for transmitting / receiving data to / from an IC card, wherein the data sent from the IC card and the result of the parity check are stored as a pair. A reception buffer, and a write control unit that controls writing to the reception buffer with reference to a result of the parity check, and in a situation where a retransmission request is repeated due to a reception error, incorrect reception data is continuously stored in the reception buffer. The feature of the present invention is to prevent the buffer from overflowing due to the above operation, and to reduce the time constraint for the CPU to read the received data and to reliably receive the data sent from the IC card.
[0018]
The invention according to claim 5 of the present invention is an IC card connection device for transmitting and receiving data to and from an IC card, and stores a pair of data sent from the IC card and a result of the parity check. A reception buffer, a retry count upper limit register that specifies an upper limit of the number of retransmission requests in receiving the same data, an error detection counter that counts the number of times a parity error is detected in receiving the same data, the retry count upper limit and the parity A comparison unit that compares the number of times an error has been detected, and a write control unit that controls a write pointer based on the comparison result. To prevent buffer overflow caused by being stored in the receive buffer. And it is intended to have an effect of reliably receiving data sent from the IC card as well as relax the time constraints CPU reads the received data.
[0019]
The invention according to claim 6 of the present invention is an IC card connection device for transmitting and receiving data to and from an IC card, and stores data sent from the IC card and a result of frame inspection as a pair. It is characterized by including a reception buffer, and has an operation of reliably receiving data sent from an IC card.
[0020]
An invention according to claim 7 of the present invention is an IC card connection device for transmitting and receiving data to and from an IC card, and stores data sent from the IC card and a result of frame inspection as a pair. It is characterized by having a plurality of reception buffers, and has the effect of relaxing the time restriction for the CPU to read the received data and reliably receiving the data sent from the IC card.
[0021]
The invention according to claim 8 of the present invention is an IC card connection device for transmitting / receiving data to / from an IC card, and stores data sent from the IC card and a result of frame inspection as a pair. A reception buffer is provided, and the reception buffer is constituted by a FIFO memory. The time buffer for reading the reception data by the CPU is relaxed and the data sent from the IC card is reliably received. It has the action of:
[0022]
According to a ninth aspect of the present invention, there is provided an IC card connection device for transmitting / receiving data to / from an IC card, and stores a pair of data sent from the IC card and a result of frame inspection. A reception buffer, and a write control unit that controls writing to the reception buffer by referring to a result of the frame inspection, and in a situation where a retransmission request is repeated due to a reception error, incorrect reception data is continuously stored in the reception buffer. The feature of the present invention is to prevent the buffer from overflowing due to the above operation, and to reduce the time constraint for the CPU to read the received data and to reliably receive the data sent from the IC card.
[0023]
According to a tenth aspect of the present invention, there is provided an IC card connection apparatus for transmitting / receiving data to / from an IC card, and stores a pair of data sent from the IC card and a result of frame inspection. A receiving buffer, a retry count upper limit register that defines an upper limit of the number of retransmission requests in receiving the same data, an error detection counter that counts the number of times a frame error is detected in receiving the same data, the upper limit of the retry count, and the frame A comparison unit that compares the number of times an error has been detected, and a write control unit that controls a write pointer based on the comparison result. To prevent buffer overflow caused by being stored in the receive buffer. Is intended to symptoms, an effect that reliably receive the data sent from the IC card as well as relax the time constraints CPU reads the received data.
[0024]
According to an eleventh aspect of the present invention, there is provided an IC card connection device for transmitting / receiving data to / from an IC card. It is characterized by including a reception buffer for storing a pair of data, and has an operation of reliably receiving data sent from an IC card.
[0025]
According to a twelfth aspect of the present invention, there is provided an IC card connection device for transmitting / receiving data to / from an IC card. It is characterized by having a plurality of reception buffers for storing a pair of data, and has the effect of relaxing the time constraint for the CPU to read the received data and reliably receiving the data sent from the IC card.
[0026]
According to a thirteenth aspect of the present invention, there is provided an IC card connection device for transmitting / receiving data to / from an IC card, wherein the data and parity check result and the frame check result sent from the IC card are transmitted. A reception buffer for storing a pair of data is provided, and the reception buffer is constituted by a FIFO memory. The time buffer for reading the received data by the CPU is relaxed, and the data transmitted from the IC card is reduced. Is reliably received.
[0027]
An invention according to claim 14 of the present invention is an IC card connection device for transmitting / receiving data to / from an IC card, wherein the data and parity check result and frame check result sent from the IC card are transmitted. A reception buffer that stores the data in a pair, and a write control unit that controls the writing to the reception buffer by referring to the result of the parity check and the result of the frame check, and performs illegal reception in a situation where a retransmission request is repeated due to a reception error. The feature is to prevent buffer overflow due to data being continuously stored in the reception buffer, to reduce the time constraint for the CPU to read the received data and to ensure that the data sent from the IC card is Has the effect of receiving the message.
[0028]
According to a fifteenth aspect of the present invention, there is provided an IC card connection device for transmitting / receiving data to / from an IC card, wherein the data and parity check result and the frame check result sent from the IC card are transmitted. A reception buffer for storing a pair, a retry count upper limit register for specifying an upper limit of the number of retransmission requests in receiving the same data, an error detection counter for counting the number of times a reception error is detected in receiving the same data, A comparison unit that compares the upper limit of the number of times and the number of times the reception error is detected, and a write control unit that controls a write pointer based on the comparison result. Buffer overflow due to successive reception data being stored in the reception buffer And characterized in that to prevent, it has an effect of reliably receiving data sent from the IC card as well as relax the time constraints CPU reads the received data.
[0029]
Hereinafter, embodiments of the present invention will be described with reference to FIGS. 1 to 16.
[0030]
(Embodiment 1)
FIG. 1 shows an IC card connection device that stores data sent from an IC card in a reception buffer in a pair with a result of a parity check. In FIG. 1,
[0031]
The operation of the IC card connection device configured as described above will be described below. The data serially transmitted from the IC card starts with a start bit as shown in FIG. 14, is composed of 8 bits of data, and a parity bit, and is received by the serial /
[0032]
Next, the configuration of the
[0033]
(Embodiment 2)
FIG. 3 includes a reception buffer that stores data sent from the IC card and the result of the parity check in a pair, and a write control unit that controls writing to the reception buffer with reference to the result of the parity check; An IC card connection device that prevents a buffer overflow caused by successively storing incorrect reception data in a reception buffer in a situation where a retransmission request is repeated due to a reception error is shown. In FIG. 3,
[0034]
The operation of the IC card connection device configured as described above will be described below. Data serially transmitted from the IC card is received by the serial /
[0035]
(Embodiment 3)
FIG. 4 shows a reception buffer for storing the data sent from the IC card and the result of the parity check as a pair, a retry count upper limit register for specifying the upper limit of the number of retransmission requests in receiving the same data, An error detection counter that counts the number of times a parity error is detected in reception, a comparison unit that compares the upper limit of the number of retries and the number of times that the parity error is detected, and a write control unit that controls a write pointer based on the comparison result. And an IC card connection device that does not repeat a retransmission request due to a reception error for a certain number of times or more and prevents a buffer overflow caused by successively storing incorrect reception data in a reception buffer. In FIG. 4,
[0036]
The operation of the IC card connection device configured as described above will be described below. Before the IC
[0037]
After the data reception is started, the data serially transmitted from the IC card is received by the serial /
[0038]
Further, the
[0039]
(Embodiment 4)
FIG. 5 shows an IC card connection device that stores data sent from the IC card in a reception buffer in a pair with the result of the frame inspection. In FIG. 5,
[0040]
The operation of the IC card connection device configured as described above will be described below. Data serially transmitted from the IC card is received by the serial /
[0041]
Next, the configuration of the
[0042]
(Embodiment 5)
FIG. 7 includes a reception buffer that stores the data sent from the IC card and the result of the frame inspection as a pair, and a writing control unit that controls writing to the reception buffer with reference to the result of the frame inspection. An IC card connection device that prevents a buffer overflow caused by successively storing incorrect reception data in a reception buffer in a situation where a retransmission request is repeated due to a reception error is shown. 7,
[0043]
The operation of the IC card connection device configured as described above will be described below. Data serially transmitted from the IC card is received by the serial /
[0044]
(Embodiment 6)
FIG. 8 shows a reception buffer for storing the data sent from the IC card and the result of the frame inspection as a pair, a retry count upper limit register for specifying the upper limit of the number of retransmission requests in receiving the same data, An error detection counter that counts the number of times a frame error is detected in reception, a comparison unit that compares the upper limit of the number of retries and the number of times that the frame error is detected, and a write control unit that controls a write pointer based on the comparison result. And an IC card connection device that does not repeat a retransmission request due to a reception error for a certain number of times or more and prevents a buffer overflow caused by successively storing incorrect reception data in a reception buffer. In FIG. 8,
[0045]
The operation of the IC card connection device configured as described above will be described below. Before the IC
[0046]
After the data reception is started, the data serially transmitted from the IC card is received by the serial /
[0047]
Further, the
[0048]
(Embodiment 7)
FIG. 9 shows an IC card connection device that stores data sent from an IC card in a reception buffer in a pair with a result of a parity check and a result of a frame check. In FIG. 9,
[0049]
The operation of the IC card connection device configured as described above will be described below. Data serially transmitted from the IC card is received by the serial /
[0050]
Next, the configuration of the
[0051]
(Embodiment 8)
FIG. 11 shows a reception buffer for storing the data sent from the IC card and the result of the parity check and the result of the frame check as a pair, and controlling the writing to the receive buffer with reference to the results of the parity check and the frame check. And a write control unit for preventing a buffer overflow caused by successively storing incorrect reception data in a reception buffer in a situation where a retransmission request is repeated due to a reception error. . In FIG. 11,
[0052]
The operation of the IC card connection device configured as described above will be described below. Data serially transmitted from the IC card is received by the serial /
[0053]
(Embodiment 9)
FIG. 12 shows a reception buffer for storing the data sent from the IC card, the result of the parity check, and the result of the frame check in a pair, and a retry count upper limit register for specifying the upper limit of the number of retransmission requests in receiving the same data. An error detection counter that counts the number of times a parity error or a frame error is detected in receiving the same data, a comparison unit that compares the upper limit of the number of retries and the number of times that the reception error is detected, and writes based on the comparison result. A write control unit for controlling a pointer, wherein a retransmission request due to a reception error is not repeated more than a certain number of times, and a buffer overflow caused by incorrect reception data being continuously stored in the reception buffer is prevented. 1 shows an IC card connection device. In FIG. 12,
[0054]
The operation of the IC card connection device configured as described above will be described below. Before the IC
[0055]
After the data reception is started, the data serially transmitted from the IC card is received by the serial /
[0056]
Further, the
[0057]
【The invention's effect】
As described above, according to the present invention, a frame error or a reception overrun that cannot be detected by a conventional IC card connection device is detected, and retransmission is requested by using a function of requesting retransmission when a parity error is detected. Then, by receiving the same data again, the data sent from the IC card can be reliably received.
[Brief description of the drawings]
FIG. 1 is a system diagram of an IC card connection device according to a first embodiment of the present invention.
FIG. 2 is a configuration diagram of a reception buffer according to the first embodiment of the present invention.
FIG. 3 is a system diagram of an IC card connection device according to a second embodiment of the present invention.
FIG. 4 is a system diagram of an IC card connection device according to a third embodiment of the present invention.
FIG. 5 is a system diagram of an IC card connection device according to a fourth embodiment of the present invention.
FIG. 6 is a configuration diagram of a reception buffer according to a fourth embodiment of the present invention.
FIG. 7 is a system diagram of an IC card connection device according to a fifth embodiment of the present invention.
FIG. 8 is a system diagram of an IC card connection device according to a sixth embodiment of the present invention.
FIG. 9 is a system diagram of an IC card connection device according to a seventh embodiment of the present invention.
FIG. 10 is a configuration diagram of a reception buffer according to a seventh embodiment of the present invention.
FIG. 11 is a system diagram of an IC card connection device according to an eighth embodiment of the present invention.
FIG. 12 is a system diagram of an IC card connection device according to a ninth embodiment of the present invention.
FIG. 13 is a system diagram of a conventional IC card connection device.
FIG. 14 is a transmission data format diagram of a conventional ordinary IC card.
FIG. 15 is a conventional transmission data format of an IC card including a retransmission request signal when a reception error occurs.
FIG. 16 is a timing chart of data transmission between a conventional IC card and an IC card connection device.
[Explanation of symbols]
100 CPU
200 IC card connection device
201 Transmission buffer
202 Parity generator
203 parallel / serial converter
204 retransmission request signal generation unit
211 Transmission / reception switching unit
212 serial / parallel converter
213 Parity checker
214 receive buffer
215 Write control unit
216 Frame inspection unit
217 Receive buffer
218 frame / parity checker
219 Receive buffer
301 Retry count upper limit register
302 Comparison section
303 Error detection counter
401 Receive buffer
500 IC card
RD1 Data read from the
RD2 Data read from the
RD3 Data read from the
Address at which
Address to write data to WP receive buffer
Transmission data written to the
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003124052A JP4449332B2 (en) | 2003-04-28 | 2003-04-28 | IC card connection device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003124052A JP4449332B2 (en) | 2003-04-28 | 2003-04-28 | IC card connection device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2004326685A true JP2004326685A (en) | 2004-11-18 |
| JP4449332B2 JP4449332B2 (en) | 2010-04-14 |
Family
ID=33501758
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003124052A Expired - Fee Related JP4449332B2 (en) | 2003-04-28 | 2003-04-28 | IC card connection device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4449332B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010183088A (en) * | 2005-03-28 | 2010-08-19 | Semiconductor Energy Lab Co Ltd | Semiconductor device |
-
2003
- 2003-04-28 JP JP2003124052A patent/JP4449332B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2010183088A (en) * | 2005-03-28 | 2010-08-19 | Semiconductor Energy Lab Co Ltd | Semiconductor device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP4449332B2 (en) | 2010-04-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12026038B2 (en) | Memory controller with error detection and retry modes of operation | |
| USRE44487E1 (en) | Command packet packing to mitigate CRC overhead | |
| US4710871A (en) | Data transmitting and receiving apparatus | |
| US7831888B2 (en) | Unidirectional error code transfer method for a bidirectional data link | |
| US9459960B2 (en) | Controller device for use with electrically erasable programmable memory chip with error detection and retry modes of operation | |
| US7701846B2 (en) | Bad data packet capture device | |
| JP3522597B2 (en) | IC card connection device | |
| JP2004326685A (en) | IC card connection device | |
| JP4455393B2 (en) | Programmable logic controller | |
| EP1086533A1 (en) | Method and apparatus for burst error correction | |
| CN113726755A (en) | Processing method of SLIP protocol data | |
| KR19990034372A (en) | Error detection device at the time of data transmission | |
| JPS5920130B2 (en) | Excess data transfer restriction method | |
| KR19980075967A (en) | Data transmission device | |
| JPH06175947A (en) | Data processor equipped with dma function | |
| JPS63136851A (en) | Data communication equipment | |
| CN101123484A (en) | Data transmission method and system | |
| JPH0255979B2 (en) | ||
| KR970055624A (en) | Frame error correction device and method | |
| KR20000026698A (en) | Data resending system for exchange system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060418 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20060512 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090515 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090519 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090713 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090804 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090929 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20091119 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100105 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100118 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130205 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140205 Year of fee payment: 4 |
|
| LAPS | Cancellation because of no payment of annual fees |