JPH0760454B2 - Portable electronic device - Google Patents
Portable electronic deviceInfo
- Publication number
- JPH0760454B2 JPH0760454B2 JP61208253A JP20825386A JPH0760454B2 JP H0760454 B2 JPH0760454 B2 JP H0760454B2 JP 61208253 A JP61208253 A JP 61208253A JP 20825386 A JP20825386 A JP 20825386A JP H0760454 B2 JPH0760454 B2 JP H0760454B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- write command
- writing
- control element
- remaining amount
- 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.)
- Expired - Lifetime
Links
Landscapes
- Credit Cards Or The Like (AREA)
Description
【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、たとえば不揮発性のデータメモリおよびCPU
(セントラル・プロセッシング・ユニット)などの制御
素子を有するIC(集積回路)チップを内蔵した、いわゆ
るICカードと称される携帯可能電子装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a nonvolatile data memory and a CPU, for example.
The present invention relates to a portable electronic device called an IC card, which has an IC (integrated circuit) chip having a control element such as a (central processing unit).
(従来の技術) 最近、新たな携帯可能なデータ記憶媒体として、不揮発
性のデータメモリおよびCPUなどの制御素子を有するIC
チップを内蔵したICカードが譜及し始めている。このIC
カードは、内部の制御素子もしくは外部装置により内蔵
するデータメモリに記憶されるデータの管理を行なうよ
うになっている。(Prior Art) Recently, as a new portable data storage medium, an IC having a nonvolatile data memory and a control element such as a CPU
IC cards with built-in chips are beginning to spread. This IC
The card manages data stored in a data memory incorporated by an internal control element or an external device.
この種のICカードへのアクセス方式として、データメモ
リを複数のエリアに分割し、そのエリアを対象とした任
意アクセスがあげられる。この場合、ICカード内には対
象エリアの先頭アドレスとエリアを構成するバイト数な
どの特定情報があらかじめ登録されており、入力した命
令データ中に対象エリア情報を付加することにより、IC
カードは対象とするエリアの特定情報を探し、物理的な
アクセス情報に変換して処理を行なう。As an access method to this kind of IC card, the data memory is divided into a plurality of areas, and an arbitrary access targeting the areas can be mentioned. In this case, the start address of the target area and specific information such as the number of bytes that make up the area are registered in advance in the IC card, and by adding the target area information to the input command data, the IC
The card searches for specific information in the target area, converts it into physical access information, and performs processing.
ところで通常、ICカードは、入力されたデータ例を制御
素子内のRAM(ランダム・アクセス・メモリ)上のバッ
ファ領域に一時的に保持しておき、処理を行なう。ただ
し、このRAMの容量からバッファ領域が限定されてしま
い、このバッファ領域の最大値が一度に伝送されるデー
タ長の最大値となる。したがって、たとえばデータ書込
みの際には前記データ長以外のデータ列しか書込めな
い。By the way, normally, the IC card temporarily holds an input data example in a buffer area on a RAM (random access memory) in the control element and performs processing. However, the buffer area is limited due to the capacity of this RAM, and the maximum value of this buffer area becomes the maximum value of the data length transmitted at one time. Therefore, for example, when writing data, only a data string other than the above data length can be written.
(発明が解決しようとする問題点) 上記したように、一度の伝送によるデータ長が決まって
おり、書込み時の記憶データ列のデータ長の最大値が決
定されてしまっていた。(Problems to be Solved by the Invention) As described above, the data length of one transmission is fixed, and the maximum value of the data length of the stored data string at the time of writing has been fixed.
そこで、本発明は以上の欠点を除去するもので、記憶デ
ータ長および読出データ長が伝送データ長に依存せず、
よって冗長度の高いデータアクセスが可能となる携帯可
能電子装置を提供することを目的とする。Therefore, the present invention eliminates the above drawbacks, and the stored data length and the read data length do not depend on the transmission data length.
Therefore, it is an object of the present invention to provide a portable electronic device which enables highly redundant data access.
[発明の構成] (問題点を解決するための手段) 本発明の携帯可能電子装置は、書込み命令コード、デー
タ長、データからなる書込み命令およびこの書込み命令
に続いて継続書込み命令モード、データからなる継続書
込み命令を外部装置から受信するためのコンタクト部
と、このコンタクト部を介して受信したデータを記憶す
るメモリと、このメモリにデータの書込みを行うための
制御部とからなるものにおいて、上記コンタクト部を介
して受信した書込み命令内のデータ長と受信済みの書込
み命令あるいは継続書込み命令のデータの長さとから未
受信のデータ残量を算出する算出手段、上記コンタクト
部を介して受信した書込み命令あるいは継続書込み命令
のデータを上記メモリに書込む書込み手段、この書込み
手段により上記受信済みのデータの書込みが終了した時
点で、上記算出手段により算出された未受信のデータ残
量の有無を判定する判定手段、この判定手段により未受
信のデータ残量が無いと判定された場合、書込み終了を
示す第1の応答データを上記外部装置へ出力する第1の
出力手段、および上記判定手段により未受信のデータ残
量が有ると判定された場合、継続書込み命令が受信可能
であることを示す第2の応答データを上記外部装置へ出
力する第2の出力手段から構成され、上記第2の出力手
段による第2の応答データの出力を行った後、未受信の
データ残量が無くなるまで、上記継続書込み命令の受信
に基づいて、上記書込み手段によるデータの書込み、上
記算出手段によるデータ残量の算出、上記判定手段によ
る未受信のデータ残量の有無の判定、および上記第2の
出力手段による第2の応答データの上記外部装置への出
力を繰り返し行うものである。[Configuration of Invention] (Means for Solving Problems) A portable electronic device according to the present invention includes a write command consisting of a write command code, a data length, and a write command, and a continuous write command mode followed by the write command. A contact section for receiving a continuous write command from an external device, a memory for storing data received via the contact section, and a control section for writing data to the memory, Calculating means for calculating the unreceived data remaining amount from the data length in the write command received via the contact part and the data length of the received write command or continuous write command, the write received via the contact part Writing means for writing the data of the instruction or the continuous writing instruction to the memory, and the writing means has received the data. When the writing of the data is finished, the judging means for judging the presence or absence of the unreceived data remaining amount calculated by the calculating means, and when the judging means judges that there is no unreceived data remaining amount, the writing is finished. Indicates that the continuous write command is receivable when the first output means for outputting the first response data indicating to the external device and the determination means determine that there is an unreceived data remaining amount. The second response data is output to the external device by the second output means, and after the second response data is output by the second output means, there is no unreceived data remaining, Writing of data by the writing means, calculation of the remaining amount of data by the calculating means, determination of the presence or absence of an unreceived remaining amount of data by the determining means based on receipt of the continuous write command, and The second response means repeatedly outputs the second response data to the external device.
(作用) この発明は、書込み命令コード、データ長、データから
なる書込み命令およびこの書込み命令に続いて継続書込
み命令コード、データからなる継続書込み命令を外部装
置から受信するためのコンタクト部と、このコンタクト
部を介して受信したデータを記憶するメモリと、このメ
モリにデータの書込みを行うための制御部とからなるも
のにおいて、上記コンタクト部を介して受信した書込み
命令内のデータ長と受信済みの書込み命令あるいは継続
書込み命令のデータの長さとから未受信のデータ残量を
算出手段で算出し、上記コンタクト部を介して受信した
書込み命令あるいは継続書込み命令のデータを書込み手
段で上記メモリに書込み、この書込み手段により上記受
信済みのデータの書込みが終了した時点で、上記算出手
段により算出された未受信のデータ残量の有無を判定手
段で判定し、この判定手段により未受信のデータ残量が
無いと判定された場合、書込み終了を示す第1の応答デ
ータを上記外部装置へ出力し、上記判定手段により未受
信のデータ残量が有ると判定された場合、継続書込み命
令が受信可能であることを示す第2の応答データを上記
外部装置へ出力し、上記第2の応答データの出力を行っ
た後、未受信のデータ残量が無くなるまで、上記継続書
込み命令の受信に基づいて、上記書込み手段によるデー
タの書込み、上記算出手段によるデータ残量の算出、上
記判定手段による未受信のデータ残量の有無の判定、お
よび上記第2の応答データの上記外部装置への出力を繰
り返し行うようにしたものである。(Operation) The present invention provides a write command code, a data length, a write command consisting of data, and a contact portion for receiving a continuous write command code consisting of this write command and a continuous write command consisting of data from an external device, and a contact part. In a memory which stores data received via the contact section and a control section for writing data to this memory, the data length in the write command received via the contact section and the received data From the length of the data of the write command or the continuous write command, calculate the remaining amount of unreceived data by the calculating means, and write the data of the write command or the continuous write command received via the contact section to the memory by the writing means. When the writing means completes writing the received data, the calculating means Whether or not there is a calculated remaining amount of unreceived data is judged by the judging means, and when it is judged by this judging means that there is no remaining unreceived data, the first response data indicating the end of writing is sent to the external device. If it is output and the determination means determines that there is an unreceived data remaining amount, the second response data indicating that the continuous write command can be received is output to the external device, and the second response is output. After the data is output, the writing means writes the data, the calculating means calculates the remaining amount of data, and the determining means operates until the remaining unreceived data is exhausted. It is configured to repeatedly determine whether there is an unreceived remaining data amount and output the second response data to the external device.
(実施例) 以下、本発明の一実施例について図面を参照して説明す
る。(Example) Hereinafter, one example of the present invention will be described with reference to the drawings.
第18図は本発明に係る携帯可能電子装置としてのICカー
ドが適用される、たとえばホームバンキングシステムあ
るいはショッピングシステムなどの端末装置として用い
られるカード取扱装置の構成例を示すものである。すな
わち、この装置は、ICカード1をカードリーダ・ライタ
2を介してCPUなどからなる制御部3と接続可能にする
とともに、制御部3にキーボード4、CRTディスプレイ
装置5、プリンタ6およびフロッピィディスク装置7を
接続して構成される。FIG. 18 shows a configuration example of a card handling device to which the IC card as the portable electronic device according to the present invention is applied, which is used as a terminal device such as a home banking system or a shopping system. That is, this device enables the IC card 1 to be connected to a control unit 3 including a CPU via a card reader / writer 2, and the control unit 3 includes a keyboard 4, a CRT display device 5, a printer 6, and a floppy disk device. 7 are connected.
ICカード1は、ユーザが保持し、たとえば商品購入など
の際にユーザのみが知得している暗証番号の参照や必要
データの蓄積などを行なうもので、第17図にその機能ブ
ロックを示すように、リード・ライト部11、暗証設定・
暗証照合部12、および暗号化・複号化部13などの基本機
能を実行する部分と、これらの基本機能を管理するスー
パバイザ14とで構成されている。リード・ライト部11
は、カードリーダ・ライタ2との間でデータを読出し、
書込み、あるいは消去を行なう機能である。暗証設定・
暗証照合部12は、ユーザが設定した暗証番号の記憶およ
び読出禁止処理を行なうとともに、暗証番号の設定後に
その暗証番号の照合を行ない、以後の処理の許可を与え
る機能である。暗号化・複号化部13は、たとえば通信回
線を介して制御部3から他の端末装置へデータを送信す
る場合の通信データの漏洩、偽造を防止するための暗号
化や暗号化されたデータの複号化を行なうものであり、
たとえばDES(Data Encryption Standard)など、充
分な暗号強度を有する暗号化アルゴリズムにしたがって
データ処理を行なう機能である。スーパバイザ14は、カ
ードリーダ・ライタ2から入力された機能コードもしく
はデータの付加された機能コードを解読し、前記基本機
能のうち必要な機能を選択して実行させる機能である。The IC card 1 is held by the user and refers to a personal identification number known only to the user, for example, when the user purchases a product, and stores necessary data. As shown in FIG. 17, its functional block is shown. In addition, read / write section 11, password setting
The password collation unit 12 and the encryption / decryption unit 13 perform basic functions, and the supervisor 14 manages these basic functions. Read / write part 11
Reads data from / to the card reader / writer 2,
It is a function of writing or erasing. PIN code setting
The personal identification collation unit 12 has a function of performing storage and reading prohibition processing of the personal identification number set by the user, performing collation of the personal identification number after setting the personal identification number, and permitting subsequent processing. The encryption / decryption unit 13 is, for example, encrypted or encrypted data for preventing leakage or forgery of communication data when the data is transmitted from the control unit 3 to another terminal device via a communication line. To decrypt
For example, it is a function of performing data processing according to an encryption algorithm having sufficient encryption strength such as DES (Data Encryption Standard). The supervisor 14 is a function that decodes the function code or the function code added with data input from the card reader / writer 2, and selects and executes a necessary function from the basic functions.
これらの諸機能を発揮させるために、ICカード1は例え
ば第16図に示すように、制御部としての制御素子(たと
えばCPU)15、データメモリ部としての記憶内容が消去
可能な不揮発性のデータメモリ16、プログラムメモリ1
7、およびカードリーダ・ライタ2との電気的接触を得
るためのコンタクト部18によって構成されており、これ
らのうち破線内の部分(制御素子15、データメモリ16、
プログラムメモリ17)は1つのICチップで構成されてい
る。プログラムメモリ17はたとえばマスクROMで構成さ
れており、前記各基本機能を実現するサブルーチンを備
えた制御素子15の制御プログラムが格納されている。デ
ータメモリ16は各種データの記憶に使用され、たとえば
EEPROMで構成されている。In order to exert these various functions, the IC card 1 has, for example, as shown in FIG. 16, a control element (for example, CPU) 15 as a control unit, and nonvolatile data in which the stored contents as a data memory unit can be erased. Memory 16, program memory 1
7 and a contact portion 18 for obtaining electrical contact with the card reader / writer 2, of which the portion within the broken line (control element 15, data memory 16,
The program memory 17) is composed of one IC chip. The program memory 17 is composed of, for example, a mask ROM, and stores a control program for the control element 15 having a subroutine for realizing each of the basic functions described above. The data memory 16 is used for storing various data, for example,
It is composed of EEPROM.
データメモリ16は、たとえば第13図に示すように複数の
エリアに分割されていて、これら各エリアはそれぞれ単
一または複数のブロックに分割されており、このブロッ
クはある定められたバイト数で構成され、そのブロック
を単位として処理するようになっている。また、1つの
ブロックは、性質情報(1バイト)と記憶データとから
構成されている。図示するように分割された各エリアに
はそれぞれエリア番号[00〜FF]が与えられている。こ
のうち、エリア[00]には、第14図に示すように、エリ
ア[01〜FF]のそれぞれのブロック内の記憶データのバ
イト数、エリアの先頭アドレスおよびエリアの最終アド
レスがエリア番号と対応して記憶されている。たとえば
エリア[01]の先頭アドレスはaaa番地、最終アドレス
はbbb番地で、また1ブロック当り6バイトで構成さ
れ、記憶データバイト数は1ブロック当り5バイトであ
るといったように対応している。そして、各エリアの先
頭には、エリアにデータを書込んだ際、書込まれた最終
ブロックの最終バイトのアドレス(以下ポインタ情報と
する)を記憶する領域がある。ここで、図中の斜線部分
は各ブロックに対する性質情報が記憶される箇所であ
る。性質情報は、対応する記憶データが有効か否かを示
す識別子と、一連の記憶データ列が複数ブロックに渡る
場合、最終データが記憶されているブロックか否かを示
す識別子が含まれている。第15図に性質情報のフォーマ
ット例を示す。図示するように、第6ビット目はブロッ
ク内の記憶データが有効か否かの識別子で、このビット
が“1"ならば無効であることを示し、“0"であれば有効
であることを示す。第7ビット目は一連データの最終バ
イトが含まれるブロックか否かを示す識別子で、このビ
ットが“1"ならば最終バイトが含まれていないブロック
であることを示し、“0"であれば含まれているブロック
であることを示す。なお、第0ないし第5ビット目はダ
ミービットである。The data memory 16 is divided into a plurality of areas, for example, as shown in FIG. 13, and each of these areas is divided into a single block or a plurality of blocks, and each block is composed of a predetermined number of bytes. The block is processed as a unit. Further, one block is composed of property information (1 byte) and storage data. Area numbers [00 to FF] are given to the respective divided areas as shown in the figure. Of these, in area [00], as shown in FIG. 14, the number of bytes of stored data in each block of area [01 to FF], the area start address and the area end address correspond to the area number. And remembered. For example, the start address of area [01] is aaa address, the final address is bbb address, and each block is composed of 6 bytes, and the number of stored data bytes is 5 bytes per block. Then, at the beginning of each area, there is an area for storing the address of the last byte of the last block written (hereinafter referred to as pointer information) when data is written in the area. Here, the shaded area in the figure is the location where the property information for each block is stored. The property information includes an identifier indicating whether or not the corresponding storage data is valid, and an identifier indicating whether or not the final data is stored when a series of storage data strings spans a plurality of blocks. Figure 15 shows an example of the format of property information. As shown in the figure, the 6th bit is an identifier indicating whether or not the storage data in the block is valid. If this bit is "1", it indicates that it is invalid, and if it is "0", it indicates that it is valid. Show. The 7th bit is an identifier indicating whether or not the last byte of the series of data is included. If this bit is "1", it indicates that the block does not include the last byte, and if it is "0". Indicates that the block is included. The 0th to 5th bits are dummy bits.
次に、このような構成においてデータメモリ16に対する
データ書込動作を第1図に示すフローチャートを参照し
て説明する。データメモリ16にデータを書込む際には第
2図に示すようなフォーマットを持つ書込み命令データ
を入力する。この書込み命令データは、書込み機能コー
ド、エリア番号および記憶データから構成されている。
記憶データは、記憶すべきデータ列とそのデータ列を構
成するバイト数情報(以下データ列バイト数情報とい
う)とからなっている。定常状態では、カードリーダ・
ライタ2からの命令データ待ち状態となっており、この
ときカードリーダ・ライタ2から命令データが入力され
ると、制御素子15はまず命令データに含まれる機能コー
ドが書込用のものか否かを確認する。書込用のものであ
れば、制御素子15は命令データに付加されているエリア
番号をデータメモリ16のエリア[00]から探し出す。見
つからなければ、制御素子15は該当エリア無しを意味す
る応答データを出力し、命令データ待ち状態に戻る。見
つかれば、制御素子15はそれに対応した処理単位データ
を参照する。さて、この記憶データをエリアに書込む際
には、制御素子15はまずエリアの先頭にあるポインタ情
報を参照し、書始めるアドレスを確認する。次に、制御
素子15は命令データ中のデータ列バイト数情報により、
入力した記憶データが全てエリアに書込めるか否かの判
定を行なう。この判定の結果、書込めないと判定する
と、制御素子15はバイト数情報エラーを意味する応答デ
ータを出力し、命令データ待ち状態に戻る。上記判定の
結果、書込めると判定すると、制御素子15はデータ列バ
イト数情報と今回命令データ中に含まれているデータ列
を構成するバイト数のチェックを行なう。このチェック
の結果、前者の値か後者の値よりも小なる場合、制御素
子15はバイト数情報エラーを意味する応答データを出力
し、命令データ待ち状態に戻る。それ以外の場合には前
者の値まら後者の値を引き、その結果を残量値として保
持しておく。Next, the data writing operation to the data memory 16 in such a configuration will be described with reference to the flowchart shown in FIG. When writing data in the data memory 16, write command data having a format as shown in FIG. 2 is input. This write command data is composed of a write function code, an area number and stored data.
The stored data is composed of a data string to be stored and byte number information (hereinafter referred to as data string byte number information) forming the data string. In the steady state, the card reader
When the command data is input from the card reader / writer 2 at this time, the control element 15 first determines whether the function code included in the command data is for writing. To confirm. If it is for writing, the control element 15 searches the area [00] of the data memory 16 for the area number added to the instruction data. If not found, the control element 15 outputs the response data indicating that there is no corresponding area, and returns to the command data waiting state. If found, the control element 15 refers to the corresponding processing unit data. When writing this stored data in the area, the control element 15 first refers to the pointer information at the beginning of the area and confirms the address to start writing. Next, the control element 15 uses the data string byte number information in the instruction data to
It is determined whether or not all the input storage data can be written in the area. If the result of this determination is that writing is not possible, the control element 15 outputs response data that means a byte number information error, and returns to the instruction data wait state. When it is determined that the data can be written as a result of the above determination, the control element 15 checks the data string byte number information and the number of bytes forming the data string included in the current instruction data. As a result of this check, if the former value or the latter value is smaller than the latter value, the control element 15 outputs response data indicating a byte number information error and returns to the instruction data waiting state. In other cases, the latter value is subtracted from the former value, and the result is held as the remaining amount value.
次に、制御素子15はデータ列バイト数情報を構成してい
るビット列の最上位ビットを“1"にすることにより、記
憶データを一時無効状態にする。次に、制御素子15はこ
の記憶データを処理単位データ数ごとに分割し、この分
割したデータのそれぞれに性質情報を付加して記憶す
る。このとき、先に保持された残量値が「0」であれば
入力データを全て記憶し、さらに記憶されたデータ列バ
イト数情報を構成しているビット列の最上位ビットを
“0"にすることにより、記憶データを有効状態にし、記
憶データ例中の最終バイトが含まれているブロックの最
終アドレスをポインタ情報として記憶する。そして制御
素子15は書込み終了を意味する応答データを出力し、命
令データ待ち状態に戻る。一方、残量値が「0」以外で
あれば、制御素子15は最終分割データのみ記憶せずに内
蔵するRAM(ランダム・アクセス・メモリ)に保持し、
かつ内蔵する書込み継続受付けフラグをセットし、次の
未書込みブロックの先頭アドレスを記憶開始アドレスと
して上記RAMに保持し、同時に書込み継続受付けを意味
する応答データを出力し、命令データ待ち状態に戻る。Next, the control element 15 temporarily sets the stored data to the invalid state by setting the most significant bit of the bit string forming the data string byte number information to "1". Next, the control element 15 divides the stored data into the number of processing unit data, and stores property information added to each of the divided data. At this time, if the remaining amount value previously held is “0”, all the input data is stored, and the most significant bit of the bit string forming the stored data string byte number information is set to “0”. As a result, the stored data is made valid, and the final address of the block including the final byte in the stored data example is stored as pointer information. Then, the control element 15 outputs response data indicating the end of writing and returns to the instruction data waiting state. On the other hand, if the remaining amount value is other than “0”, the control element 15 does not store only the final divided data but holds it in the built-in RAM (random access memory),
Moreover, the built-in write continuation acceptance flag is set, the start address of the next unwritten block is held in the RAM as the storage start address, and at the same time, the response data meaning the write continuation acceptance is output, and the state returns to the instruction data wait state.
次に、継続書込動作について第3図に示すフローチャー
トを参照して説明する。継続書込みを行なう際には第4
図に示すようなフォーマットを持つ継続書込み命令デー
タを入力する。この継続書込み命令データは、継続書込
み機能コードと記憶データとから構成されている。継続
書込み命令データが入力されると、制御素子15はまず先
の書込み継続受付けフラグを参照し、そのフラグがセッ
トされているか否かを確認する。その結果、書込み継続
受付けフラグがセットされていなければ、制御素子15は
シーケンスエラーを意味する応答データ出力し、命令デ
ータ待ち状態に戻る。書込み継続受付けフラグがセット
されていれば、制御素子15は入力した記憶データを構成
するバイト数と先の残量値をチェックする。このチェッ
クの結果、前者の値が後者の値よりも大なる場合、制御
素子15はバイト数情報エラーを意味する応答データを出
力し、命令データ待ち状態に戻る。それ以外の場合には
後者の値から前者の値を引き、その結果を新たな残量値
として保持しておく。Next, the continuous write operation will be described with reference to the flowchart shown in FIG. 4th when performing continuous writing
The continuous write command data having the format shown in the figure is input. The continuous write command data is composed of a continuous write function code and stored data. When the continuous write command data is input, the control element 15 first refers to the previous write continuous acceptance flag and confirms whether or not the flag is set. As a result, if the write continuation acceptance flag is not set, the control element 15 outputs response data indicating a sequence error and returns to the instruction data waiting state. If the write continuation acceptance flag is set, the control element 15 checks the number of bytes forming the input storage data and the previous remaining amount value. As a result of this check, if the former value is larger than the latter value, the control element 15 outputs response data indicating a byte number information error, and returns to the instruction data waiting state. In other cases, the former value is subtracted from the latter value, and the result is held as a new remaining amount value.
次に、制御素子15は入力した記憶データの前に先にRAM
に保持しておいた前回最終分割データを付加して新たな
記憶データを生成し、これを処理単位データ数ごとに分
割し、この分割したデータのそれぞれに性質情報を付加
する。そして、先にRAMに保持した記憶開始アドレスを
もとにデータを記憶する。このとき、先に保持した新規
の残量値が「0」であれば、記憶データの全てを記憶
し、さらに先に記憶されたデータ列バイト数情報の最上
位ビットを“0"にし、記憶データ列中の最終バイトが含
まれているブロックの最終アドレスをポインタ情報とし
て記憶する。そして、制御素子15は書込み継続受付けフ
ラグをリセットし、書込み終了を意味する応答データを
出力し、命令データ待ち状態に戻る。一方、残量値が
「0」以外であれば、制御素子15は最終分割データのみ
記憶せずに内蔵するRAMに保持し、かつ書込み継続受付
けフラグをセットし、次の未書込みブロックの先頭アド
レスを記憶開始アドレスとして上記RAMに保持し、同時
に書込み継続受付けを意味する応答データを出力し、命
令データ待ち状態に戻る。Next, the control element 15 has the RAM stored before the stored data input.
The last divided data stored in the previous time is added to generate new storage data, which is divided by the number of processing unit data, and the property information is added to each of the divided data. Then, the data is stored based on the storage start address previously held in the RAM. At this time, if the newly retained remaining amount value is “0”, all the stored data is stored, and the most significant bit of the data string byte number information stored earlier is set to “0” and stored. The final address of the block containing the final byte in the data string is stored as pointer information. Then, the control element 15 resets the write continuation acceptance flag, outputs response data indicating the end of writing, and returns to the instruction data waiting state. On the other hand, if the remaining amount value is other than "0", the control element 15 does not store only the final divided data but holds it in the built-in RAM, sets the write continuation acceptance flag, and sets the start address of the next unwritten block. Is stored in the RAM as a storage start address, at the same time response data indicating continuous write acceptance is output, and the state returns to the instruction data wait state.
このようにして、1回の伝送では書込みきれないデータ
列を記憶する。ただし、ブロックごとに記憶した際、付
加する性質情報のうち第7ビット目を“0"にする。ま
た、特に残量値が「0」となった場合の最終分割データ
が記憶されるブロックには第7ビット目および第6ビッ
トを共に“0"にする。In this way, a data string that cannot be written in one transmission is stored. However, when stored for each block, the seventh bit of the property information to be added is set to "0". In addition, the 7th bit and the 6th bit are both set to "0" in the block in which the final divided data is stored when the remaining amount value is "0".
すなわち、たとえば第5図(a)に示すような命令デー
タが入力されたとする。これは書込み命令データであ
り、対象とするエリアは[02]であると認識する。エリ
ア[02]の処理単位バイト数は4バイトである。まず、
入力した命令データ中のバイト数情報を抽出し、同時に
エリア[02]の先頭に位置するポインタ情報を参照し、
記憶データが全て記憶できることを確認後、バイト数情
報の最上位ビットを“1"にする(第5図b)。次に、記
憶データのバイト数とバイト数情報の値から残量値をセ
ットする(第5図c)。この場合、バイト数情報が「1
1」で、今回の記憶データのバイト数が「5」であるの
で残量値は「6」となる。次に、記憶データを処理単位
バイト数で分割し(第5図d)、第5図(e)に示すよ
うにエリア[02]に記憶する。ただし、残量値は「0」
以外なので最終分割データは記憶しない。そして、次に
書込むべきアドレスを保持し、書込み継続受付けフラグ
をセットする。That is, for example, it is assumed that command data as shown in FIG. 5 (a) is input. This is write command data, and the target area is recognized as [02]. The number of processing unit bytes in area [02] is 4 bytes. First,
Information on the number of bytes in the input instruction data is extracted, and at the same time, the pointer information located at the beginning of area [02] is referenced,
After confirming that all the stored data can be stored, the most significant bit of the byte number information is set to "1" (Fig. 5b). Next, the remaining amount value is set from the byte number of the stored data and the value of the byte number information (FIG. 5c). In this case, the byte count information is "1.
At 1 ”, since the number of bytes of the stored data this time is“ 5 ”, the remaining amount value is“ 6 ”. Next, the stored data is divided by the number of processing unit bytes (FIG. 5d) and stored in area [02] as shown in FIG. 5 (e). However, the remaining amount is "0"
Other than that, the final divided data is not stored. Then, the address to be written next is held and the write continuation acceptance flag is set.
この状態で、第5図(f)に示すような継続書込み命令
データが入力されたとすると、この命令データ中の記憶
データ数をチェックし、よければ先の残量値と今回の記
憶データのバイト数により新たな残量値をセットする
(第5図g)。この場合、先の残量値は「6」で、今回
の記憶データのバイト数が「6」であるので新たな残量
値は「0」となる。次に、先に保持しておいた前回最終
分割データと今回入力した記憶データとを合わせ(第5
図h)、記憶データを処理単位バイト数で分割し(第5
図i)、先の書込むべきアドレスにより記憶してゆく
(第5図j)。このとき、残量値は「0」になっている
ので、バイト数情報の最上位ビットを“0"にし、かつ最
終アドレスをポインタ情報として記憶する。If continuous write command data as shown in FIG. 5 (f) is input in this state, the number of stored data in this command data is checked, and if it is good, the remaining amount value and the byte of the current stored data are checked. A new remaining amount value is set by the number (Fig. 5g). In this case, since the previous remaining amount value is "6" and the number of bytes of the stored data this time is "6", the new remaining amount value becomes "0". Next, the previously stored last divided data and the stored data input this time are combined (the fifth
(Fig. H), the stored data is divided by the processing unit number of bytes (5th
Figure i), the data is stored according to the previous address to be written (Figure 5j). At this time, since the remaining amount value is "0", the most significant bit of the byte number information is set to "0" and the final address is stored as pointer information.
次に、データメモリ16に対するデータ読出動作を第6図
に示すフローチャートを参照して説明する。データメモ
リ16に記憶したデータを読出す際には第7図に示すよう
なフォーマットを持つ読出し命令データを入力する。こ
の読出し命令データは、読出し機能コードおよびエリア
番号から構成されている。定常状態では、カードリーダ
・ライタ2からの命令データ待ち状態となっており、こ
のときカードリーダ・ライタ2から命令データが入力さ
れると、制御素子15はまず命令データに含まれる機能コ
ードが読出用のものか否かを確認する。読出用のもので
あれば、制御素子15は命令データに付加されているエリ
ア番号をデータメモリ16のエリア[00]から探し出す。
見つからなければ、制御素子15は該当エリア無しを意味
する応答データを出力し、命令データ待ち状態に戻る。
見つかれば、制御素子15はそれに対応した処理単位デー
タを参照し、同時にエリアの先頭アドレスおよび最終ア
ドレスを内蔵するRAMに記憶しておく。さて、このエリ
ア内のデータを読出す際には、制御素子15はまずエリア
の先頭に位置するポインタ情報を参照する。その結果、
このポインタ情報の全ビットが“1"であれば、制御素子
15はこのエリアには何も記憶されていないと認識し、未
書込みエリアを意味する応答データを出力し、命令デー
タ待ち状態に戻る。一方、ポインタ情報の全ビットが
“1"でなければ、制御素子15はこのポインタ情報をもと
にエリア内の最新データの先頭ブロックを認識する。こ
の先頭ブロックにはバイト数情報が記憶されているの
で、制御素子15はこのバイト数情報を抽出してその値を
チェックし、データ列がエリアに存在できる値か否かを
調べる。その結果、存在できない不当な値だと判定する
と、制御素子15はバイト数情報エラーを意味する応答デ
ータを出力し、命令データ待ち状態に戻る。存在できる
ような正当な値だと判定すると、制御素子15は上記抽出
したバイト数情報を内蔵するカウンタの初期値としてセ
ットする。このとき、上記バイト数情報の最上位ビット
が“1"になっている場合、制御素子15はこれに続くデー
タ列は無効データであると認識し、内蔵する無効データ
有りフラグをセットする。次に、制御素子15はバイト数
情報の後に続くデータ列を1バイトずつ読出し、内蔵す
るRAMに記憶してゆく。この際、1バイト読出すごとに
上記カウンタを1つ減算する。ただし、性質情報を読出
す際にはカウンタは不変で、RAMにも記憶しない。Next, the data read operation for the data memory 16 will be described with reference to the flowchart shown in FIG. When reading the data stored in the data memory 16, the read command data having the format shown in FIG. 7 is input. This read command data is composed of a read function code and an area number. In the steady state, the card reader / writer 2 is waiting for command data. When command data is input from the card reader / writer 2 at this time, the control element 15 first reads the function code included in the command data. Check whether it is for use. If it is for reading, the control element 15 searches the area [00] of the data memory 16 for the area number added to the instruction data.
If not found, the control element 15 outputs the response data indicating that there is no corresponding area, and returns to the command data waiting state.
If found, the control element 15 refers to the processing unit data corresponding thereto, and at the same time stores the start address and the end address of the area in the built-in RAM. When reading the data in this area, the control element 15 first refers to the pointer information located at the beginning of the area. as a result,
If all the bits of this pointer information are "1", the control element
15 recognizes that nothing is stored in this area, outputs response data indicating an unwritten area, and returns to the instruction data waiting state. On the other hand, if all the bits of the pointer information are not "1", the control element 15 recognizes the head block of the latest data in the area based on this pointer information. Since byte number information is stored in this head block, the control element 15 extracts this byte number information and checks its value to see whether or not the data string can exist in the area. As a result, when the control element 15 determines that the value cannot be present and is an illegal value, the control element 15 outputs response data indicating a byte number information error, and returns to the instruction data waiting state. When the control element 15 determines that the value is valid so that it can exist, the control element 15 sets the extracted byte number information as an initial value of a built-in counter. At this time, if the most significant bit of the byte number information is "1", the control element 15 recognizes that the data string following this is invalid data, and sets a built-in invalid data present flag. Next, the control element 15 reads the data string following the byte number information byte by byte and stores it in the built-in RAM. At this time, the counter is decremented by 1 each time 1 byte is read. However, the counter does not change when reading the property information and is not stored in RAM.
このようにして、記憶データをカウンタが「0」になる
まで順次RAM内に記憶する。しかし、RAMの容量が限られ
ているため、カウンタが「0」になる前にRAM内に記憶
したデータ数がこの容量となった場合、制御素子15はこ
のカウンタ値と今回読出しデータの最終アドレスを保持
しておき、同時に内蔵する読出し継続受付けフラグをセ
ットする。そして、制御素子15は読出し継続受付けを意
味する応答データにRAM内のデータ列を付加して出力
し、命令データ待ち状態に戻る。一方、カウンタ値が
「0」であれば、制御素子15は無効データ有りフラグが
セットされているか否かをチェックし、セットされてい
なければ読出し終了を意味する応答データにRAM内のデ
ータ列を付加して出力し、命令データ待ち状態に戻る。
無効データ有りフラグがセットされていれば、制御素子
15は無効データを意味する応答データにRAM内のデータ
列を付加して出力し、命令データ待ち状態に戻る。In this way, the stored data is sequentially stored in the RAM until the counter reaches "0". However, since the capacity of the RAM is limited, if the number of data stored in the RAM before the counter reaches “0” becomes this capacity, the control element 15 determines the counter value and the final address of the currently read data. Is held, and at the same time, the built-in read continuation acceptance flag is set. Then, the control element 15 adds the data string in the RAM to the response data indicating the continuous read acceptance and outputs the response data, and returns to the instruction data waiting state. On the other hand, if the counter value is “0”, the control element 15 checks whether or not the invalid data present flag is set, and if it is not set, the data string in the RAM is added to the response data indicating the end of reading. Append and output, then return to instruction data wait state.
If the invalid data flag is set, the control element
Reference numeral 15 adds the data string in RAM to the response data that means invalid data, outputs the response data, and returns to the instruction data wait state.
次に、継続読出動作について第8図に示すフローチャー
トを参照して説明する。継続読出しを行なう際には第9
図に示すようなフォーマットを持つ継続読出し命令デー
タを入力する。この継続読出し命令データは、継続読出
し機能コードおよびエリア番号から構成されている。継
続読出し命令データが入力されると、制御素子15はまず
先の読出し継続受付けフラグを参照し、そのフラグがセ
ットされているか否かを確認する。その結果、読出し継
続受付けフラグがセットされていなければ、制御素子15
はシーケンスエラーを意味する応答データを出力し、命
令データ待ち状態に戻る。読出し継続受付けフラグがセ
ットされていれば、制御素子15は先に保持しておいたア
ドレスとカウンタ値から同様にカウンタを1つ減算しな
がらデータを読出し、RAMに記憶する。ただし、性質情
報を読出す際にはカウンタは不変で、RAMにも記憶しな
い。そして、カウンタが「0」となった場合、制御素子
15は読出し継続受付けフラグをリセットし、無効データ
有りフラグがセットされているか否かをチェックし、セ
ットされていなければ読出し終了を意味する応答データ
にRAM内のデータ列を付加して出力し、命令データ待ち
状態に戻る。無効データ有りフラグがセットされていれ
ば、制御素子15は無効データを意味する応答データにRA
M内のデータ列を付加して出力し、命令データ待ち状態
に戻る。一方、カウンタが「0」となる前にRAMの容量
が満たされた場合、制御素子15はこのカウンタ値と今回
読出しデータの最終アドレスを保持しておき、同時に読
出し継続受付けフラグをセットする。そして、制御素子
15は読出し継続受付けを意味する応答データにRAM内の
データ列を付加して出力し、命令データ待ち状態に戻
る。Next, the continuous read operation will be described with reference to the flowchart shown in FIG. When performing continuous reading,
The continuous read command data having the format shown in the figure is input. This continuous read command data is composed of a continuous read function code and an area number. When the continuous read command data is input, the control element 15 first refers to the previous read continuous acceptance flag and confirms whether or not the flag is set. As a result, if the read continuation acceptance flag is not set, the control element 15
Outputs response data indicating a sequence error and returns to the instruction data wait state. When the read continuation acceptance flag is set, the control element 15 similarly reads out the data while subtracting one from the previously held address and the counter value, and stores the data in the RAM. However, the counter does not change when reading the property information and is not stored in RAM. When the counter becomes “0”, the control element
Reference numeral 15 resets the read continuation acceptance flag, checks whether the invalid data present flag is set, and if it is not set, adds the data string in RAM to the response data indicating the end of reading and outputs it. Return to the instruction data wait state. If the invalid data present flag is set, the control element 15 sets RA to the response data indicating invalid data.
The data string in M is added and output, and the operation returns to the instruction data wait state. On the other hand, when the capacity of the RAM is satisfied before the counter reaches "0", the control element 15 holds this counter value and the final address of the present read data, and sets the read continuation acceptance flag at the same time. And the control element
Reference numeral 15 adds the data string in RAM to the response data that means continuous read acceptance, outputs the response data, and returns to the instruction data wait state.
すなわち、たとえば第5図(j)のような状態のエリア
(エリア「02」)を対象に、第10図(a)に示すような
読出し命令データにより読出しを行なうものとする。た
だし、RAMの容量は例えば8バイトであるとする。この
場合、この命令データ読出されるデータ列は第10図
(b)のようなデータ列であり、かつバイト数情報は11
バイトを示している。したがって、読出したデータ列を
RAMに記憶した状態においてカウンタは「5」である。
カウンタの値は「0」以外なので、読出し継続受付けを
意味する応答データとして、このデータ列を付加して出
力する(第10図c)。次に、第10図(d)に示すような
継続読出し命令データが入力されると、RAM内には第10
図(e)に示すようなデータ列が記憶される。このと
き、カウンタは「0」になっているので、読出し終了を
意味する応答データにこのデータ列を付加して出力する
(第10図f)。That is, for example, the area (area "02") in the state as shown in FIG. 5 (j) is read by the read command data as shown in FIG. 10 (a). However, it is assumed that the RAM has a capacity of 8 bytes, for example. In this case, the data string read out from this command data is a data string as shown in FIG. 10 (b), and the byte number information is 11
Indicates a byte. Therefore, the read data string
The counter is "5" when it is stored in the RAM.
Since the value of the counter is other than "0", this data string is added and output as response data that means continuous read acceptance (Fig. 10c). Next, when the continuous read command data as shown in FIG.
A data string as shown in FIG. 7E is stored. At this time, since the counter is "0", this data string is added to the response data indicating the end of reading and output (FIG. 10f).
次に、データメモリ16に対するデータ消去動作を第11図
に示すフローチャートを参照して説明する。データメモ
リ16に記憶したデータを消去する際には第12図に示すよ
うなフォーマットを持つ消去命令データを入力する。こ
の消去命令データは、消去機能コードおよびエリア番号
から構成されている。定常状態では、カードリーダ・ラ
イタ2からの命令データ待ち状態となっており、このと
きカードリーダ・ライタ2から命令データが入力される
と、制御素子15はまず命令データに含まれる機能コード
が消去用のものか否かを確認する。消去用のものであれ
ば、制御素子15は命令データに付加されているエリア番
号をデータメモリ16のエリア[00]から探し出す。見つ
からなければ、制御素子15は該当エリア無しを意味する
応答データを出力し、命令データ待ち状態に戻る。見つ
かれば、制御素子15はエリアの先頭アドレスを参照し、
このエリアのポインタ情報を確認する。その結果、この
ポインタ情報の全ビットが“1"であれば、制御素子15は
このエリアには何も記憶されていないと認識し、未書込
みエリアを意味する応答データを出力し、命令データ待
ち状態に戻る。一方、ポインタ情報の全ビットが“1"で
なければ、制御素子15はこのポインタ情報の全ビットを
“1"にし、消去終了を意味する応答データを出力し、命
令データ待ち状態に戻る。Next, the data erasing operation for the data memory 16 will be described with reference to the flowchart shown in FIG. When erasing the data stored in the data memory 16, erasing command data having a format as shown in FIG. 12 is input. This erase command data is composed of an erase function code and an area number. In the steady state, the card reader / writer 2 is waiting for command data. When command data is input from the card reader / writer 2 at this time, the control element 15 first erases the function code included in the command data. Check whether it is for use. If it is for erasing, the control element 15 searches the area [00] of the data memory 16 for the area number added to the instruction data. If not found, the control element 15 outputs the response data indicating that there is no corresponding area, and returns to the command data waiting state. If found, the control element 15 refers to the start address of the area,
Check the pointer information in this area. As a result, if all the bits of this pointer information are "1", the control element 15 recognizes that nothing is stored in this area, outputs response data meaning an unwritten area, and waits for command data. Return to the state. On the other hand, if all the bits of the pointer information are not "1", the control element 15 sets all the bits of the pointer information to "1", outputs the response data indicating the end of erasing, and returns to the instruction data waiting state.
以上説明したICカードは、書込あるいは読出し処理を行
なうための命令データ(書込み命令データ、読出し命令
データ)により、この処理が完結するか否かの判定を行
ない、完結しない場合には次の処理続行用の命令データ
(継続書込み命令データ、継続読出し命令データ)を受
付ける状態となり、それを外部に知らせる。また、この
とき処理続行用の命令データを受付けると前の処理の続
きを行ない、これも完結するのか判定し、完結しない場
合には再び処理続行用の命令データ受付け状態となる。
また、上記判定で完結したと判定した際には処理続行用
の命令データ受付け不可の状態になり、それを外部に知
らせる。これにより、データの書込時または読出時な
ど、データを複数に分割して伝送することができるた
め、記憶データ長および読出データ長が伝送データに依
存しない。したがって、冗長度の高いデータアクセスが
可能となる。The IC card described above determines whether or not this process is completed based on the command data (write command data, read command data) for performing the write or read process, and if it is not completed, the next process is performed. The command data for continuation (continuous write command data, continuous read command data) is ready to be received, and it is notified to the outside. Further, at this time, if the instruction data for processing continuation is accepted, the previous processing is continued, and it is judged whether this is also completed. If not completed, the instruction data acceptance status for processing continuation is again established.
Further, when it is determined that the processing is completed in the above determination, it becomes a state in which the instruction data for processing continuation cannot be accepted, and this is notified to the outside. As a result, the data can be divided into a plurality of pieces for transmission when writing or reading the data, so that the storage data length and the read data length do not depend on the transmission data. Therefore, it is possible to access data with high redundancy.
なお、前記実施例では、制御素子、データメモリおよび
プログラムメモリが1つのICチップで構成されている場
合について説明したが、必ずしも1つのICチップで構成
されている必要はなく、別々のICチップで構成されてい
てもよい。In addition, in the above-described embodiment, the case where the control element, the data memory, and the program memory are configured by one IC chip has been described, but it is not necessarily configured by one IC chip, and separate IC chips are used. It may be configured.
また、前記実施例では、携帯可能電子装置としてICカー
ドを例示したが、本発明はカード状のものに限定される
ものでなく、たとえばブロック状あるいはペンシル状の
ものでもよい。また、携帯可能電子装置のハード構成も
その要旨を逸脱しない範囲で種々変形可能である。Further, in the above-mentioned embodiment, the IC card is illustrated as the portable electronic device, but the present invention is not limited to the card-shaped one, and may be a block-shaped or pencil-shaped one, for example. Further, the hardware configuration of the portable electronic device can be variously modified without departing from the spirit of the invention.
[発明の効果] 以上詳述したように本発明によれば、記憶データ長およ
び読出データ長が伝送データ長に依存せず、よって冗長
度の高いデータアクセスが可能となる携帯可能電子装置
を提供できる。As described above in detail, according to the present invention, the stored data length and the read data length do not depend on the transmission data length, thus providing a portable electronic device that enables highly redundant data access. it can.
図は本発明の一実施例を説明するためのもので、第1図
はデータ書込動作を説明するフローチャート、第2図は
書込み命令データのフォーマットを示す図、第3図は継
続書込動作を説明するフローチャート、第4図は継続書
込み命令データのフォーマットを示す図、第5図はデー
タ書込動作の具体例を説明する図、第6図はデータ読出
動作を説明するフローチャート、第7図は読出し命令デ
ータのフォーマットを示す図、第8図は継続読出動作を
説明するフローチャート、第9図は継続読出し命令デー
タのフオーマットを示す図、第10図はデータ読出動作の
具体例を説明する図、第11図はデータ消去動作を説明す
るフローチャート、第12図は消去命令データのフォーマ
ットを示す図、第13図および第14図はデータメモリの構
成を示す図、第15図は性質情報のフォーマットを示す
図、第16図はICカードに内蔵するICチップの構成を示す
ブロック図、第17図はICカードの機能ブロックを示す
図、第18図はカード取扱装置の構成を示すブロック図で
ある。 1……ICカード(携帯可能電子装置)、2……カードリ
ーダ・ライタ、15……制御素子(制御部)、16……デー
タメモリ(データメモリ部)、17……プログラムメモ
リ、18……コンタクト部。FIG. 1 is for explaining one embodiment of the present invention. FIG. 1 is a flow chart for explaining a data write operation, FIG. 2 is a view showing a format of write command data, and FIG. 3 is a continuous write operation. 4 is a diagram showing a format of continuous write command data, FIG. 5 is a diagram explaining a concrete example of a data write operation, FIG. 6 is a flow chart explaining a data read operation, and FIG. Is a diagram showing the format of read command data, FIG. 8 is a flowchart for explaining the continuous read operation, FIG. 9 is a diagram showing the format of the continuous read command data, and FIG. 10 is a diagram for explaining a specific example of the data read operation. , FIG. 11 is a flowchart for explaining the data erasing operation, FIG. 12 is a diagram showing the format of erase command data, FIGS. 13 and 14 are diagrams showing the structure of the data memory, and FIG. FIG. 16 shows a format of quality information, FIG. 16 is a block diagram showing a configuration of an IC chip incorporated in an IC card, FIG. 17 is a diagram showing functional blocks of an IC card, and FIG. 18 is a configuration of a card handling device. It is a block diagram. 1 ... IC card (portable electronic device), 2 ... card reader / writer, 15 ... control element (control section), 16 ... data memory (data memory section), 17 ... program memory, 18 ... Contact part.
Claims (1)
なる書込み命令およびこの書込み命令に続いて継続書込
み命令コード、データからなる継続書込み命令を外部装
置から受信するためのコンタクト部と、このコンタクト
部を介して受信したデータを記憶するメモリと、このメ
モリにデータの書込みを行うための制御部とからなる携
帯可能電子装置において、 上記コンタクト部を介して受信した書込み命令内のデー
タ長と受信済みの書込み命令あるいは継続書込み命令の
データの長さとから未受信のデータ残量を算出する算出
手段と、 上記コンタクト部を介して受信した書込み命令あるいは
継続書込み命令のデータを上記メモリに書込む書込み手
段と、 この書込み手段により上記受信済みのデータの書込みが
終了した時点で、上記算出手段により算出された未受信
のデータ残量の有無を判定する判定手段と、 この判定手段により未受信のデータ残量が無いと判定さ
れた場合、書込み終了を示す第1の応答データを上記外
部装置へ出力する第1の出力手段と、 上記判定手段により未受信のデータ残量が有ると判定さ
れた場合、継続書込み命令が受信可能であることを示す
第2の応答データを上記外部装置へ出力する第2の出力
手段とを具備し、 上記第2の出力手段による第2の応答データの出力を行
った後、未受信のデータ残量が無くなるまで、上記継続
書込み命令の受信に基づいて、上記書込み手段によるデ
ータの書込み、上記算出手段によるデータ残量の算出、
上記判定手段による未受信のデータ残量の有無の判定、
および上記第2の出力手段による第2の応答データの上
記外部装置への出力を繰り返し行うことを特徴とする携
帯可能電子装置。1. A contact part for receiving a write command code, a data length, a write command consisting of data, and a continuous write command consisting of a continuous write command code and data subsequent to this write command, and a contact part. In a portable electronic device comprising a memory for storing data received via the memory and a control unit for writing the data in the memory, the data length in the write command received via the contact unit and the reception completion Calculating means for calculating the remaining amount of unreceived data from the length of data of the write command or continuous write command, and write means for writing the data of the write command or continuous write command received through the contact portion in the memory. And when the writing of the already received data is completed by this writing means, Determining means for determining the presence or absence of the unreceived data remaining amount calculated by the above, and when the determining means determines that there is no unreceived data remaining amount, the first response data indicating the end of writing is sent to the external device. And a second response data indicating that the continuous write command can be received when the determination unit determines that there is an unreceived remaining data amount to the external device. And a second output means for outputting the second response data by the second output means, and based on the reception of the continuous write command until the unreceived data remaining amount is exhausted, Writing of data by the writing means, calculation of the remaining amount of data by the calculating means,
Judgment of the remaining amount of unreceived data by the judgment means,
And a portable electronic device characterized in that the second response data is repeatedly output to the external device by the second output means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61208253A JPH0760454B2 (en) | 1986-09-04 | 1986-09-04 | Portable electronic device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61208253A JPH0760454B2 (en) | 1986-09-04 | 1986-09-04 | Portable electronic device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6364185A JPS6364185A (en) | 1988-03-22 |
| JPH0760454B2 true JPH0760454B2 (en) | 1995-06-28 |
Family
ID=16553185
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61208253A Expired - Lifetime JPH0760454B2 (en) | 1986-09-04 | 1986-09-04 | Portable electronic device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0760454B2 (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5365629A (en) * | 1976-11-24 | 1978-06-12 | Sanyo Electric Co Ltd | Memory system |
-
1986
- 1986-09-04 JP JP61208253A patent/JPH0760454B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6364185A (en) | 1988-03-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2537199B2 (en) | IC card | |
| JP3015377B2 (en) | IC card | |
| US5093785A (en) | Portable electronic device with memory having data pointers and circuitry for determining whether a next unwritten memory location exist | |
| US4839792A (en) | Portable electronic apparatus with a device for determining data validity | |
| JPH05250523A (en) | Processing system | |
| JP2557838B2 (en) | IC card | |
| JPH01217689A (en) | Portable electronic equipment | |
| JP2537200B2 (en) | Portable electronic devices | |
| JPH0760454B2 (en) | Portable electronic device | |
| JP2537198B2 (en) | Portable electronic devices | |
| JPH0746376B2 (en) | IC card | |
| JPS63787A (en) | Portable electronic equipment | |
| JPS63785A (en) | Portable electronic equipment | |
| JPS63184853A (en) | Portable electronic apparatus | |
| JPH05100961A (en) | Data storage system | |
| JP2675563B2 (en) | Portable electronic devices | |
| JPS62197848A (en) | Portable electronic equipment system | |
| JPS62196784A (en) | Portable electronic device | |
| JP2598056B2 (en) | Portable electronic devices | |
| JPS62130484A (en) | Portable electronic device | |
| JPH01147686A (en) | Portable electronic device | |
| JPS63211046A (en) | Portable electronic equipment | |
| KR900006941B1 (en) | Portable electronics | |
| JPS6383894A (en) | Portable electronic device | |
| JPH03224083A (en) | Portable electronic device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| EXPY | Cancellation because of completion of term |