JPS62131354A - Method for controlling information write on ic card - Google Patents

Method for controlling information write on ic card

Info

Publication number
JPS62131354A
JPS62131354A JP60272756A JP27275685A JPS62131354A JP S62131354 A JPS62131354 A JP S62131354A JP 60272756 A JP60272756 A JP 60272756A JP 27275685 A JP27275685 A JP 27275685A JP S62131354 A JPS62131354 A JP S62131354A
Authority
JP
Japan
Prior art keywords
data
block
card
processing
written
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
Application number
JP60272756A
Other languages
Japanese (ja)
Other versions
JPH0435780B2 (en
Inventor
Sukeki Kajikawa
鍛治川 祐希
Shigeyoshi Nakano
中野 成能
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP60272756A priority Critical patent/JPS62131354A/en
Publication of JPS62131354A publication Critical patent/JPS62131354A/en
Publication of JPH0435780B2 publication Critical patent/JPH0435780B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the processing burden of an external device by dividing the storage area of a rewritable nonvolatile memory into plural blocks and controlling them. CONSTITUTION:An IC card 1 is provided with a microprocessor 11 for data processing and a ROM (EPROM) 12 for data storage which can be erased by ultraviolet rays. The storage area of the EPROM 12 for data storage is divided into plural blocks and is controlled. In the processing of write error, logical '0' is written in all bits of the block where this error occurs, and desired data is written in the following block. In case of the read processing, the microprocessor 11 in the IC card compares all byte data values in the block; and if any character of (00)16 is found, this data block is judged to be ineffective to read out the following block for the purpose of obtaining desired data.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 本発明は、情報処理を実行するマイクロプロセ・)1 ツサと、情報を格納する書き換え可能な不揮全黒メモリ
とを内蔵するICカードに於ける情報書き込み制御方法
に関するものである。
[Detailed Description of the Invention] <Industrial Application Field> The present invention is directed to an IC card having a built-in microprocessor (1) that executes information processing, and a rewritable non-volatile black memory that stores information. The present invention relates to an information writing control method.

〈従来の技術〉 従来、上記メモリへの情報書き込みに於いてエラーが発
生した場合は、ICカード内のマイクロプロセッサは、
エラー発生を外部装置(リーダー/ライター等)に知ら
せることにより、外部装置がその領域を避け、適当な代
用領域を定め、そこに所望の情報を書き込む処理を行っ
ていた。
<Prior art> Conventionally, when an error occurs when writing information to the memory, the microprocessor in the IC card
By notifying an external device (such as a reader/writer) of the occurrence of an error, the external device avoids that area, determines an appropriate substitute area, and writes desired information there.

〈発明が解決しようとする問題点〉 そのため、外部装置に対する処理負担が大きくなるとい
う欠点を持っていた。本発明は上記問題点を解決するこ
と全目的としているものである。
<Problems to be Solved by the Invention> As a result, this method has the drawback of increasing the processing load on the external device. The entire purpose of the present invention is to solve the above problems.

〈問題点を解決するための手段〉 メモリの記憶領域を複数のブロックに区分して管理し、
該メモリへの情報書き込み中にエラーが発生したときは
、当該エラー発生ブロックの全記憶領域に特定コードを
書き込んだ後、次のブロックに再度情報書き込みを実行
する。
<Means to solve the problem> Manage the memory storage area by dividing it into multiple blocks,
When an error occurs while writing information to the memory, a specific code is written to the entire storage area of the block where the error occurred, and then information writing is executed again to the next block.

〈実施例〉 以下、実施例に基づいて本発明の詳細な説明する。<Example> Hereinafter, the present invention will be described in detail based on Examples.

第3図はICカード1とリーダー/ライター2の結合時
の状態を示すプロ・ンクロである。ICカー 1−” 
1 (f’i、マイクロプロセッサ11とZ 外n 消
去可能なROM(EPROM )12と全内蔵する。
FIG. 3 is a professional computer diagram showing the state when the IC card 1 and the reader/writer 2 are combined. IC car 1-”
1 (f'i) has a microprocessor 11 and an erasable ROM (EPROM) 12.

また、13及び21は、それぞれ、ICカード1及びリ
ーダー/ライター2の端子部である。更に述べるならば
、CI(110)はデータを直列転送するための入出力
端子、C2(CLK)は動作グロックの入力端子、C3
(R5T)はリセット3号入力端子、C4(Vcc)は
電源入力端子、C3(GND)はグラウンド端子、C6
(Vpp)はEPROMへの書き込み電源入力端子であ
る。まり、DBIdテータ・パス、ABuアドレス・パ
ス、CBはコントロール・パスである。
Further, 13 and 21 are terminal portions of the IC card 1 and the reader/writer 2, respectively. To explain further, CI (110) is an input/output terminal for serially transferring data, C2 (CLK) is an input terminal of an operating clock, and C3 is an input terminal for serially transferring data.
(R5T) is reset No. 3 input terminal, C4 (Vcc) is power input terminal, C3 (GND) is ground terminal, C6
(Vpp) is a power input terminal for writing to the EPROM. In other words, the DBId data path, the ABu address path, and the CB are the control paths.

第4四は上記EPROM12の記憶領域構成図であり、
その記憶領域は、複数のブロック121゜122、・・
・、12に、及び12kに区分されている。各ブロック
のバイト数は同一である。
44th is a storage area configuration diagram of the EPROM 12,
The storage area consists of multiple blocks 121, 122,...
・, 12, and 12k. Each block has the same number of bytes.

@1図は、マイクロプロセッサ11中の制御ROM (
図示せず)内に格納されている書き込み処理プログラム
?示すフローチャートである。また、第2図は、同じく
マイクロ10セツザll中の制御ROM内に格納されて
いる読み出し処理プログラムを示すフローチャートであ
る。両図に於いて、Aはアドレス指定カウンタ、BはA
の指定するアドレスに書き込まれたデータ、B′はAの
指定するアドレスに書き込むべきデータ、Cはデータ・
バイト数カウンタ、C′は所望のデータ・バイト数、N
はブロック番号カウンタ、addrはブロックNの先頭
アドレスを、それぞれ示す。
Figure @1 shows the control ROM (
A writing processing program stored in (not shown)? FIG. Further, FIG. 2 is a flowchart showing a read processing program stored in the control ROM in the micro 10 setzall. In both figures, A is the addressing counter and B is the A
B' is the data written to the address specified by A, C is the data written to the address specified by A, and C is the data written to the address specified by A.
byte number counter, C' is the desired number of data bytes, N
indicates a block number counter, and addr indicates the start address of block N, respectively.

木実流側に於いては、書き込み処理及び読み出し処理と
もにグロック単位で行なわれる。
On the Kinomi style side, both write processing and read processing are performed in units of Glocks.

まず、書き込み処理について説明する。First, write processing will be explained.

情報書き込みが指示されると、ブロックNの先頭アドレ
ス、すなわち、次に情報を書き込むべきブロックの先頭
アドレスaddrがアドレス指定カウンタAに設定され
る。また、所望のデータ・バイト数C′ (1ブロツク
あたりのバイト数。各カードについて固有の値)がデー
タ・バイト数カウンタCに入力される。次いで、最初の
データの書き込みが実行される。引き続いて、令書き込
まれたデータの読み出しが実行され、B=B’か否か、
すなわち、データ書き込みが正しく行なわれたか否かが
チェックされる。正しく書き込みが行なわれていたので
あれば、すなわち、エラーが発生していなければ、アド
レス指定カウンタAのカウント・アップ及びデータ・バ
イト数カウンタCのカウント・ダウンが実行され、C〜
0であれば、次のデータの書き込みが行われ、以下、同
様の処理が実行される。そして、C=0が検出されれば
、書き込み処理を終了する。
When information writing is instructed, the start address of block N, that is, the start address addr of the block into which information is to be written next, is set in address designation counter A. Also, a desired number of data bytes C' (number of bytes per block, a unique value for each card) is input to a data byte number counter C. Next, the first data write is performed. Subsequently, reading of the written data is executed, and it is determined whether B=B' or not.
That is, it is checked whether data writing has been performed correctly. If writing was performed correctly, that is, if no error occurred, the addressing counter A counts up and the data byte number counter C counts down, and C~
If it is 0, the next data is written, and similar processing is performed thereafter. Then, if C=0 is detected, the write process ends.

この書き込み処理の途中で、エラーが発生すると、すな
わち、書き込まれたデータが木来書き込むべきデータと
異なっていることが検出されると、当該エラー発生ブロ
ンクの先頭アドレスaddrが再びアドレス指定カウン
タAに設定され、また、上記所望のデータ・バイト数C
′がデータ・バイト数カウンタCに再設定される。そし
て、以降の処理が実行されることによって、当該ブロッ
クの全領域にバイト・データ“(00)+s″が書き込
まれる。ICカードに於いて扱われるデータはアスキー
・データであり、バイト・データ値″(00)+6’は
データとして利用されることは無い。その後、次のブロ
ック(N+1 )に対して、前述したと同様の書き込み
処理が実行される。もし、ブロックN内に1バイトも″
(00)+a’を書き込めなかった場合は、そのカード
を無効とする処理を行なう。
During this write process, if an error occurs, that is, if it is detected that the written data is different from the data that should be written by Kiri, the first address addr of the bronc where the error occurred is set to the address designation counter A again. The desired number of data bytes C
' is reset in the data byte number counter C. Then, by executing the subsequent processing, byte data "(00)+s" is written in the entire area of the block. The data handled in the IC card is ASCII data, and the byte data value "(00)+6' is never used as data. After that, for the next block (N+1), the above-mentioned A similar write operation is performed. If there is also 1 byte in block N,
If (00)+a' cannot be written, processing is performed to invalidate the card.

次に、読み出し処理について説明する。Next, read processing will be explained.

読み出しの際は、読み出したバイト・データ全“(00
)+a”と比較し、一致した場合は、マイクロゾロセッ
サは、アドレス指定カウンタAに次のブロック(N+1
 )の先頭アドレス?設定し、所望のデータを読み出す
When reading, all read byte data “(00
)+a”, and if they match, the microprocessor stores the next block (N+1
) start address? Set and read the desired data.

以上のように、データ処理を行なうためのマイクロ10
セツサとデータを格納するための紫外線消去可能なRO
M(EPROM)とを内蔵したICカードに於いて、デ
ータ格納用E P ROMの記憶領域を複数のブロック
に分けて管理し、書き込みエラーに対する処理として、
当該エラーが発生したブロックに対して、すべてのビッ
トに論理“0“を書き込み、再度、次のブロックに所望
のデータを書き込む。ICカードに於いて扱われるデー
タはアスキー・データであり、バイト・データ値“(0
0)+6”はデータとして利用されることはない。読み
出し処理の際、ICカード内のマイクロプロセッサは、
ブロック内のデータをすべてバイト・データ値“(00
) +a”と比較し、1文字でも見つけ出した場合は無
効のデータ・ブロックと判断して、所望のデータを得る
ため次のブロックを読み出す。
As mentioned above, Micro 10 for data processing
UV erasable RO for storing data and data
In an IC card with a built-in M (EPROM), the storage area of the data storage EPROM is divided into multiple blocks and managed, and as a process for writing errors,
Logic "0" is written to all bits of the block in which the error occurred, and desired data is written again to the next block. The data handled in the IC card is ASCII data, and the byte data value "(0
0)+6" is never used as data. During the read process, the microprocessor in the IC card
All data in the block is converted to byte data value “(00
) +a'', and if even one character is found, it is determined that the data block is invalid, and the next block is read to obtain the desired data.

上記実施例に於いては、ICカード内のデータ格納用メ
モリとしてEPROMを用いているが、EPROMの代
わりにEEPROMを用いてもよい。E P ROMの
場合は、ビア1−の値“1″を“0゛°にすることはで
きるが、60″を“1”にすることはできない。これに
対して、EEPROMの場合は両方とも可能である。そ
のため、ブロックを無効と判断するためのバイト・デー
タは、EPROMの場合”(00)+s”に限定される
が、EEPROMの場合は、アスキー・データで使わな
いデータ値であね、ばイ町を用いても良い。
In the above embodiment, an EPROM is used as the data storage memory in the IC card, but an EEPROM may be used instead of the EPROM. In the case of an EP ROM, the value "1" of via 1- can be set to "0°", but the value "60" cannot be set to "1". On the other hand, in the case of EEPROM, both are possible. Therefore, the byte data used to judge a block as invalid is limited to "(00)+s" in the case of an EPROM, but in the case of an EEPROM, it is a data value that is not used in ASCII data. You may also use

〈発明の効果〉 以上詳細に説明したように、本発明によn、ば、外部装
置の処理負担を軽減することができ、またブロック単位
でのデータの信頼性を確保することができるものである
<Effects of the Invention> As explained in detail above, the present invention can reduce the processing load on external devices and ensure the reliability of data in block units. be.

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

第1図は本発明の一実施例に於ける書き込み処理プログ
ラムを示すフローチャート、第2図は同実施例に於ける
読み出し処理プログラムを示すフローチャート、第3図
は同実施例に於けるICカードとリーダー/ライターの
結合時の状態ヲ示すブロック図、第4図は同実施例に於
けるデータ格納用EPROMの記憶領域溝成因である。 符号の説明 1:ICカード、  2:リーダー/ライター、11:
マイクロプロセッサ、 12:EFROM。 13.21:端子部、 128.・・・、  12にニ
ブロック。
FIG. 1 is a flowchart showing a write processing program in one embodiment of the present invention, FIG. 2 is a flowchart showing a readout processing program in the same embodiment, and FIG. 3 is a flowchart showing a readout processing program in the same embodiment. FIG. 4, a block diagram showing the state when the reader/writer is combined, shows the formation of storage area grooves in the data storage EPROM in the same embodiment. Code explanation 1: IC card, 2: Reader/Writer, 11:
Microprocessor, 12: EFROM. 13.21: Terminal part, 128. ..., Ni block on 12th.

Claims (1)

【特許請求の範囲】 1、情報処理を実行するマイクロプロセッサと、情報を
格納する書き換え可能な不揮発性メモリとを内蔵するI
Cカードに於いて、 上記メモリの記憶領域を複数のブロックに区分して管理
し、該メモリへの情報書き込み中にエラーが発生したと
きは、当該エラー発生ブロックの全記憶領域に特定コー
ドを書き込んだ後、次のブロックに再度情報書き込みを
実行することを特徴とする、ICカードに於ける情報書
き込み制御方法。
[Claims] 1. An I/O device that includes a microprocessor that executes information processing and a rewritable nonvolatile memory that stores information.
In the C card, the storage area of the memory mentioned above is managed by dividing it into multiple blocks, and when an error occurs while writing information to the memory, a specific code is written to the entire storage area of the block where the error occurred. 1. A method for controlling information writing in an IC card, which comprises writing information to the next block again.
JP60272756A 1985-12-03 1985-12-03 Method for controlling information write on ic card Granted JPS62131354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60272756A JPS62131354A (en) 1985-12-03 1985-12-03 Method for controlling information write on ic card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60272756A JPS62131354A (en) 1985-12-03 1985-12-03 Method for controlling information write on ic card

Publications (2)

Publication Number Publication Date
JPS62131354A true JPS62131354A (en) 1987-06-13
JPH0435780B2 JPH0435780B2 (en) 1992-06-12

Family

ID=17518312

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60272756A Granted JPS62131354A (en) 1985-12-03 1985-12-03 Method for controlling information write on ic card

Country Status (1)

Country Link
JP (1) JPS62131354A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0254118A (en) * 1988-08-18 1990-02-23 Hioki Ee Corp Memory control method
JPH0283644A (en) * 1988-09-21 1990-03-23 Anritsu Corp Electronic equipment using nonvolatile memory
JPH03221972A (en) * 1990-01-29 1991-09-30 Tokyo Electric Co Ltd Electrophotographic device
JPH04297939A (en) * 1991-03-27 1992-10-21 Sanyo Electric Co Ltd Data write/read system for ic memory
JPH05217394A (en) * 1992-01-31 1993-08-27 Sanyo Electric Co Ltd Solid sound recording and reproducing device
JP2006209808A (en) * 1992-01-29 2006-08-10 Microsoft Corp Method and system for managing file system by using flash-erasable programmable read-only memory

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0254118A (en) * 1988-08-18 1990-02-23 Hioki Ee Corp Memory control method
JPH0283644A (en) * 1988-09-21 1990-03-23 Anritsu Corp Electronic equipment using nonvolatile memory
JPH03221972A (en) * 1990-01-29 1991-09-30 Tokyo Electric Co Ltd Electrophotographic device
JPH04297939A (en) * 1991-03-27 1992-10-21 Sanyo Electric Co Ltd Data write/read system for ic memory
JP2008282429A (en) * 1992-01-29 2008-11-20 Microsoft Corp Method and system for file system management using flash-erasable, programmable, read-only memory
JP2006209808A (en) * 1992-01-29 2006-08-10 Microsoft Corp Method and system for managing file system by using flash-erasable programmable read-only memory
JP2009146458A (en) * 1992-01-29 2009-07-02 Microsoft Corp Method and system for file system management using flash-erasable, programmable, read-only memory
JP2010049714A (en) * 1992-01-29 2010-03-04 Microsoft Corp Method and system for file system management using flash-erasable, programmable, read-only memory
JP2010049713A (en) * 1992-01-29 2010-03-04 Microsoft Corp Method and system for file system management using flash-erasable, programmable, read-only memory
JP2010049712A (en) * 1992-01-29 2010-03-04 Microsoft Corp Method and system for file system management using flash-erasable, programmable, read-only memory
JP2011103137A (en) * 1992-01-29 2011-05-26 Microsoft Corp Method and system for file system management using flash-erasable, programmable, read-only memory
JP2011222051A (en) * 1992-01-29 2011-11-04 Microsoft Corp Method and system for managing file system by using flash erasable program read-on memory
JPH05217394A (en) * 1992-01-31 1993-08-27 Sanyo Electric Co Ltd Solid sound recording and reproducing device

Also Published As

Publication number Publication date
JPH0435780B2 (en) 1992-06-12

Similar Documents

Publication Publication Date Title
KR100375217B1 (en) Microcontroller incorporating an electrically rewritable non-volatile memory
WO2002075745A1 (en) Storage device, storage device controlling method, and program
US5991194A (en) Method and apparatus for providing accessible device information in digital memory devices
JPS6325893A (en) Programming of data on electrically programmable rom
JPS62190584A (en) Portable electronic device
EP3057100B1 (en) Memory device and operating method of same
JPS62131354A (en) Method for controlling information write on ic card
JPH03252993A (en) Information writing device for e2prom
JP3512252B2 (en) Information recording medium with built-in CPU
JP3471842B2 (en) Data management device, data storage device, and data management method
KR19980087183A (en) Microcomputer
JP3168572B2 (en) IC card with CPU runaway detection function
JP2004348342A (en) Ic card and method for processing ic card
CN107402887B (en) Counter in flash memory
JP2808358B2 (en) IC card
JP2864288B2 (en) Error checking method for IC card
JPS62289999A (en) Data writing method
JP3120804B2 (en) IC card and IC card system
JP3040135B2 (en) IC card
JP3840510B2 (en) Micro computer
JPS5987568A (en) Ic card
JPH052536A (en) Ic card
JP3789994B2 (en) IC card
JP2538906B2 (en) IC card
JP2537198B2 (en) Portable electronic devices

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term