JPH02156390A - Portable electronic device - Google Patents
Portable electronic deviceInfo
- Publication number
- JPH02156390A JPH02156390A JP63310715A JP31071588A JPH02156390A JP H02156390 A JPH02156390 A JP H02156390A JP 63310715 A JP63310715 A JP 63310715A JP 31071588 A JP31071588 A JP 31071588A JP H02156390 A JPH02156390 A JP H02156390A
- Authority
- JP
- Japan
- Prior art keywords
- data
- stored
- state
- control element
- record
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000002159 abnormal effect Effects 0.000 claims description 14
- 230000014759 maintenance of location Effects 0.000 abstract 2
- 230000005856 abnormality Effects 0.000 abstract 1
- 238000013500 data storage Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 1
- 238000000034 method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Credit Cards Or The Like (AREA)
Abstract
Description
【発明の詳細な説明】
[発明の目的]
(産業上の利用分野)
本発明は、たとえば消去可能な不揮発性メモリおよび、
これらを制御するCPUなどの制御素子を有するIC(
集積回路)チップを内蔵した、いわゆるICカードと称
される携帯可能電子装置に係り、特にそのメモリからの
データ読出方法を改良した携帯可能電子装置に関する。Detailed Description of the Invention [Object of the Invention] (Industrial Application Field) The present invention provides an erasable non-volatile memory and a
An IC (
The present invention relates to a portable electronic device called an IC card that has a built-in integrated circuit chip, and particularly to a portable electronic device with an improved method of reading data from its memory.
(従来の技術)
最近、新たな携帯可能なデータ記憶媒体として、消去可
能な不揮発性メモリおよび、これらを制御するCPUな
どの制御素子を有するICチップを内蔵した、いわゆる
ICカードが開発されている。この種のICカードは、
内蔵する制御素子によって内蔵するメモリをアクセスし
、外部からの要求に応じて必要なデータの入出力を行な
うようになっている。(Prior Art) Recently, a so-called IC card has been developed as a new portable data storage medium, which has a built-in IC chip that has an erasable non-volatile memory and a control element such as a CPU that controls the memory. . This type of IC card is
The built-in control element accesses the built-in memory and inputs and outputs necessary data in response to external requests.
従来、・このようなICカードにおいては、メモリから
データを読出す際、そのデータの保存状態が異常であっ
た場合、データの保存状態が異常であるということを意
味するステータスを外部に出力するだけであった。この
ため、大切なデータが読出すことができないという欠点
があった。Conventionally, in such an IC card, when reading data from memory, if the data storage state is abnormal, a status indicating that the data storage state is abnormal is output to the outside. It was only. Therefore, there was a drawback that important data could not be read.
(発明が解決しようとする課8)
本発明は、上記したようにメモリ部からデー夕を読出す
際、そのデータの保存状態が異常であった場合、データ
を読出すことができないという問題点を解決すべくなさ
れもので、メモリ部からデータを読出す際、そのデータ
の保存状態が異常であっても、そのデータを読出すこと
ができる携帯可能電子装置を提供することを目的とする
。(Problem 8 to be solved by the invention) The present invention solves the problem that when reading data from the memory section as described above, if the data is stored in an abnormal state, the data cannot be read. An object of the present invention is to provide a portable electronic device that can read data from a memory section even if the data is stored in an abnormal state.
[発明の構成コ
(課題を解決するための手段)
本発明は、データを記憶するメモリ部と、このメモリ部
に対してデータの読出しおよび書込みを行なうための制
御部を有し、選択的に外部とのデータの人出力を行なう
携帯可能電子装置であって、前記メモリ部からデータを
読出す際、そのデータの保存状態が正常か異常かを判断
する判断手段と、この判断手段の判断結果を対応する読
出したデータとともに外部へ出力する手段とを具備して
いる。[Configuration of the Invention (Means for Solving the Problems) The present invention has a memory section for storing data, a control section for reading and writing data to this memory section, and selectively A portable electronic device for manually outputting data to and from an external device, comprising a determining means for determining whether the storage state of the data is normal or abnormal when reading data from the memory section, and a determination result of the determining means. and means for outputting the data to the outside together with the corresponding read data.
(作用)
メモリ部からデータを読出す際、そのデータの保存状態
が正常か異常かを判断し、この判断結果を対応する読出
したデータとともに外部へ出力することにより、データ
を読出す際にそのデータの保存状態が異常であっても、
保存状態が異常であることを意味するステータスととも
に、そのデータを一応読出すことができる。これにより
、どのようなデータが記憶してあったかを推察すること
ができ、特に大切なデータが記憶されている場ノ
合に顕著な効果を発揮する。(Function) When reading data from the memory section, it is determined whether the storage state of the data is normal or abnormal, and this judgment result is output to the outside together with the corresponding read data. Even if the data storage status is abnormal,
The data can be read along with the status indicating that the storage state is abnormal. This makes it possible to infer what kind of data has been stored, which is especially effective when important data is stored.
(実施例)
以下、本発明の一実施例について図面を参照して説明す
る。(Example) Hereinafter, an example of the present invention will be described with reference to the drawings.
第8図は本発明に係る携帯可能電子装置としてのICカ
ードの構成を概略的に示すもので、全体的な制御を司る
CPUなどの制御素子(制御部)11、データメモリ
(メモリ部)12、プログラムメモリ13、および図示
しない端末装置などと電気的に通信するためのコンタク
ト部14によって構成されており、これらのうち制御素
子11、データメモリー2、およびプログラムメモリ1
3は、1つのICチップ(あるいは複数のICチップ)
で構成されてICカード本体内に埋設されている。FIG. 8 schematically shows the configuration of an IC card as a portable electronic device according to the present invention, including a control element (control unit) 11 such as a CPU that controls the overall control, and a data memory.
(memory section) 12, a program memory 13, and a contact section 14 for electrically communicating with a terminal device (not shown), among which a control element 11, a data memory 2, and a program memory 1
3 is one IC chip (or multiple IC chips)
It is embedded within the IC card body.
データメモリ12は各種データの記憶に使用され、たと
えばEEPROMなどの消去可能な不揮発性メモリで構
成されている。プログラムメモリ13は、制御素子11
の制御プログラムなどを記憶するもので、たとえばマス
クROMで構成されている。The data memory 12 is used to store various data, and is composed of an erasable nonvolatile memory such as an EEPROM. The program memory 13 includes the control element 11
It stores control programs and the like, and is configured, for example, as a mask ROM.
データメモリ12は、たとえば第7図に示すように、エ
リア定義情報格納部15とデータ格納部16とに大きく
部分されている。データ格納部16は、各種データを記
憶する部分で、複数のデータエリアに分割されている。The data memory 12 is largely divided into an area definition information storage section 15 and a data storage section 16, as shown in FIG. 7, for example. The data storage section 16 is a section for storing various data, and is divided into a plurality of data areas.
エリア定義情報格納部15は、データ格納部16の各デ
ータエリアを定義するエリア定義情報などが記憶されて
いる。The area definition information storage section 15 stores area definition information and the like that define each data area of the data storage section 16.
1つのデータエリアを定義するエリア定義情報は、デー
タエリア固有の番号を定義するエリア番号、およびデー
タエリアの位置を定義する位置情報(たとえばデータエ
リアの先頭アドレス)などからなる。The area definition information that defines one data area includes an area number that defines a number unique to the data area, position information that defines the position of the data area (for example, the start address of the data area), and the like.
データ格納部16の各データエリアには、たとえば第5
図(a)に示すようなフォーマットを持つレコードが格
納されている。1つのレコードは、記憶データと、その
記憶データの排他的論理和(XOR)を計算したブロッ
ク・チエツク・キャラクタ(以下、BCCと略称する)
とで構成される。なお、第5図(b)はレコードの具体
例を示している。Each data area of the data storage unit 16 includes, for example, a fifth
Records having the format shown in Figure (a) are stored. One record consists of stored data and a block check character (hereinafter abbreviated as BCC) obtained by calculating the exclusive OR (XOR) of the stored data.
It consists of Note that FIG. 5(b) shows a specific example of a record.
第6図はあるデータエリアのレコード格納様子を示して
おり、各レコードはデータエリアの先頭から順次格納さ
れ、その格納部にrlJ r2J「3」・・・・・・
とレコード番号が付与されている。Fig. 6 shows how records are stored in a certain data area. Each record is stored sequentially from the beginning of the data area, and rlJ r2J "3"...
and a record number are assigned.
次に、このような構成において動作を説明する。Next, the operation in such a configuration will be explained.
まず、レコード書込動作について第3図に示すフローチ
ャトを参照して説明する。データメモリ12にレコード
を書込む際は、第4図に示すようなフォーマットを持つ
書込命令データを入力する。First, the record writing operation will be explained with reference to the flowchart shown in FIG. When writing a record to the data memory 12, write command data having a format as shown in FIG. 4 is input.
この書込命令データは、書込機能コード、データエリア
のエリア番号、レコード番号、および記憶データから構
成される装置
さて、書込命令データが入力されると(Sl)、制御素
子11は、その命令データ内のエリア番号に相当するエ
リア番号を持つデータエリアが存在するか否かをチエツ
クする(S2.S3)。このチエツクの結果、該当エリ
アが存在しない場合、制御素子11は、該当エリアなし
を意味するステータスを出力しくS4) 、命令データ
待機状態に戻る。上記チエツクの結果、該当エリアが存
在する場合、制御素子11は、書込命令データ内のレコ
ード番号に相当するレコード番号がデータエリア内に存
在するか否かをチエツクする(S5゜S6)。This write command data is composed of a write function code, an area number of the data area, a record number, and storage data.Now, when the write command data is input (Sl), the control element 11 It is checked whether a data area having an area number corresponding to the area number in the command data exists (S2, S3). As a result of this check, if the applicable area does not exist, the control element 11 outputs a status indicating that the applicable area does not exist (S4), and returns to the command data standby state. As a result of the above check, if the corresponding area exists, the control element 11 checks whether a record number corresponding to the record number in the write command data exists in the data area (S5 and S6).
このチエツクの結果、該当レコード番号が存在しない場
合、制御素子11は、該当レコード番号なしを意味する
ステータスを出力しくS7)、命令データ待機状態に戻
る。上記チエツクの結果、該当レコード番号が存在する
場合、制御素子11は、書込命令データ内の記憶データ
を書込む(S8)。そして、制御素子11は、記憶デー
タ全ての排他的論理和(X OR)を計算した値(B
CC)を記憶データの次に書込み(S9)、命令データ
待機状態に戻る。As a result of this check, if the corresponding record number does not exist, the control element 11 outputs a status indicating that the corresponding record number does not exist (S7), and returns to the command data standby state. As a result of the above check, if the corresponding record number exists, the control element 11 writes the storage data in the write command data (S8). Then, the control element 11 calculates a value (B
CC) is written next to the stored data (S9) and returns to the instruction data standby state.
次に、レコード読出動作について第1図に示すフローチ
ャートを参照して説明する。データメモリ12内のレコ
ードを読出す際は、第2図に示すようなフォーマットを
持つ読出命令データを入力する。この読出命令データは
、読出機能コード、データエリアのエリア番号、および
レコード番号から構成されている。Next, the record reading operation will be explained with reference to the flowchart shown in FIG. When reading a record in the data memory 12, read command data having a format as shown in FIG. 2 is input. This read command data is composed of a read function code, an area number of a data area, and a record number.
さて、読出命令データが入力されると
(S11)、制御素子11は、その命令データ内のエリ
ア番号に相当するエリア番号を持つデータエリアが存在
するか否かをチエツクする(S 12゜813)。この
チエツクの結果、該当エリアが存在しない場合、制御素
子11は、該当エリアなしを意味するステータスを出力
しく514)、命令データ待機状態に戻る。上記チエツ
クの結果、該当エリアが存在する場合、制御素子11は
、読出命令データ内のレコード番号に相当するレコード
番号を持つレコードが存在するか否かをチエツクする(
515.316)。Now, when read command data is input (S11), the control element 11 checks whether there is a data area with an area number corresponding to the area number in the command data (S12°813). . As a result of this check, if the applicable area does not exist, the control element 11 outputs a status indicating that the applicable area does not exist (514), and returns to the command data standby state. As a result of the above check, if the corresponding area exists, the control element 11 checks whether there is a record with a record number corresponding to the record number in the read command data (
515.316).
このチエツクの結果、該当レコードが存在しない場合、
制御素子11は、該当レコードなしを意味するステータ
スを出力しく517)、命令データ待機状態に戻る。上
記チエツクの結果、該当レコードが存、在する場合、制
御素子11は、該当レコードの記憶データ全てを読出す
(318)。そして、制御素子11は、読出した記憶デ
ータ全ての排他的論理和(XOR)を計算しくS 19
)、書込時に計算した値(該当レコード内のBCC)と
比較する(S20)。As a result of this check, if the corresponding record does not exist,
The control element 11 outputs a status indicating that there is no corresponding record (517), and returns to the instruction data standby state. As a result of the above check, if the corresponding record exists, the control element 11 reads out all stored data of the corresponding record (318). Then, the control element 11 calculates the exclusive OR (XOR) of all the read storage data.S19
) is compared with the value calculated at the time of writing (BCC in the corresponding record) (S20).
この比較の結果、両者が一致している場合(S21)、
レコード保存状態正常を意味するステータスとともに、
読出したデータを外部へ出力しく522) 命令デー
タ待機状態に戻る。As a result of this comparison, if the two match (S21),
Along with the status indicating that the record storage status is normal,
Output the read data to the outside (522) and return to the command data standby state.
上記比較の結果、両者が一致していない場合(S21)
、レコード保存状態異常を意味するステータスとともに
、読出したデータを外部へ出力しく523)、命令デー
タ待機状態に戻る。As a result of the above comparison, if the two do not match (S21)
, the read data is output to the outside along with the status indicating that the record storage state is abnormal (523), and the state returns to the command data standby state.
このように、データメモリからデータを読出す際、その
データの保存状態が正常か異常かをBCCによって判断
し、この判断結果を対応する読出したデータとともに外
部へ出力するものである。これにより、たとえば預金残
高や口座番号などの大切なデータが記憶されている場合
に、そのデータを読出す際、データの保存状態が異常で
あっても、保存状態が異常であることを意味するステー
タスとともに、そのデータを一応読出すことができる。In this way, when reading data from the data memory, it is determined by the BCC whether the storage state of the data is normal or abnormal, and the result of this determination is output to the outside together with the corresponding read data. As a result, when important data such as bank balances and account numbers are stored, even if the data is stored in an abnormal state, it means that the storage state is abnormal when reading that data. The data can be read along with the status.
したがって、どのようなデータが記憶してあったかを推
察することができ、特に大切なデータが記憶されている
場合に顕著な効果を発揮する。Therefore, it is possible to infer what kind of data has been stored, which is especially effective when important data is stored.
なお、前記実施例では、携帯可能電子装置としてICカ
ードを例示したが、本発明はカード状のものに限定され
るものでなく、たとえばブロック状あるいはペンシル状
のものでもよい。In the above embodiment, an IC card is used as an example of a portable electronic device, but the present invention is not limited to a card-shaped device, and may be a block-shaped or pencil-shaped device, for example.
[発明の効果コ
以上詳述したように本発明によれば、メモリ部からデー
タを読出す際、そのデータの保存状態が異常であっても
、そのデータを読出すことができる携帯可能電子装置を
提供できる。[Effects of the Invention] As detailed above, the present invention provides a portable electronic device that can read data from a memory unit even if the data is in an abnormal state. can be provided.
図は本発明の一実施例を説明するためのもので、第1図
はレコード読出動作を説明するフローチャート、第2図
は読出命令データのフォーマット例を示す図、第3図は
レコード書込動作を説明するフローチャート、第4図は
書込命令データのフォーマット例を示す図、第5図はレ
コード格納フォーマット例を示す図、第6図はデータエ
リアに対するレコード格納様子を示す図、第7図はデー
タメモリの構成図、第8図はICカードの構成を概略的
に示すブロック図である。
11・・・制御素子(制御部)、12・・・データメモ
リ (メモリ部) 13・・・プログラムメモリ、1
5・・・エリア定義情報格納部、16・・・データ格納
部。
出願人代理人 弁理士 鈴江武彦
第
図
第
図The figures are for explaining one embodiment of the present invention, and FIG. 1 is a flowchart explaining a record reading operation, FIG. 2 is a diagram showing an example of the format of read command data, and FIG. 3 is a record writing operation. FIG. 4 is a diagram showing an example of the format of write command data, FIG. 5 is a diagram showing an example of the record storage format, FIG. 6 is a diagram showing how records are stored in the data area, and FIG. 7 is a diagram showing an example of the record storage format. FIG. 8 is a block diagram schematically showing the structure of the IC card. 11... Control element (control section), 12... Data memory (memory section) 13... Program memory, 1
5... Area definition information storage section, 16... Data storage section. Applicant's Representative Patent Attorney Takehiko Suzue
Claims (1)
データの読出しおよび書込みを行なうための制御部を有
し、選択的に外部とのデータの入出力を行なう携帯可能
電子装置であって、 前記メモリ部からデータを読出す際、そのデータの保存
状態が正常か異常かを判断する判断手段と、 この判断手段の判断結果を対応する読出したデータとと
もに外部へ出力する手段と を具備したことを特徴とする携帯可能電子装置。[Claims] A portable electronic device having a memory section for storing data and a control section for reading and writing data to the memory section, and selectively inputting and outputting data to and from the outside. The device comprises a determining means for determining whether the data is stored in a normal or abnormal state when reading data from the memory section, and a means for outputting the determination result of the determining means to the outside together with the corresponding read data. A portable electronic device characterized by comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63310715A JPH02156390A (en) | 1988-12-08 | 1988-12-08 | Portable electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63310715A JPH02156390A (en) | 1988-12-08 | 1988-12-08 | Portable electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02156390A true JPH02156390A (en) | 1990-06-15 |
Family
ID=18008605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63310715A Pending JPH02156390A (en) | 1988-12-08 | 1988-12-08 | Portable electronic device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02156390A (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63168754A (en) * | 1987-01-07 | 1988-07-12 | Casio Comput Co Ltd | Memory error check system |
-
1988
- 1988-12-08 JP JP63310715A patent/JPH02156390A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63168754A (en) * | 1987-01-07 | 1988-07-12 | Casio Comput Co Ltd | Memory error check system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS6228297A (en) | Integrated circuit card having reading means of update information and hysteresis information | |
JPS63201748A (en) | Portable electronic equipment | |
JPS62190584A (en) | Portable electronic device | |
KR910009097B1 (en) | Ic card | |
JP3471842B2 (en) | Data management device, data storage device, and data management method | |
JP2651426B2 (en) | IC card | |
JPH02156390A (en) | Portable electronic device | |
JPH026115B2 (en) | ||
JP2598056B2 (en) | Portable electronic devices | |
JP2537200B2 (en) | Portable electronic devices | |
JP2609645B2 (en) | Portable electronic devices | |
JPH05100961A (en) | Data storage system | |
JP2798957B2 (en) | Portable electronic devices | |
JPH0693254B2 (en) | Portable electronic device | |
JP3209994B2 (en) | Portable electronic devices | |
JPH02226446A (en) | Portable electronic device | |
JP3015376B2 (en) | IC card | |
JP2538907B2 (en) | IC card | |
JP2538906B2 (en) | IC card | |
JP2537198B2 (en) | Portable electronic devices | |
JPH01119890A (en) | Portable electronic device | |
JPH01181182A (en) | Data storing system for portable electronic device | |
JPS60205689A (en) | Portable medium | |
JPS63229542A (en) | Electronic card | |
JPH02144644A (en) | Portable electronic device and method for checking its memory |