KR100273614B1 - Ic card - Google Patents

Ic card Download PDF

Info

Publication number
KR100273614B1
KR100273614B1 KR1019980007230A KR19980007230A KR100273614B1 KR 100273614 B1 KR100273614 B1 KR 100273614B1 KR 1019980007230 A KR1019980007230 A KR 1019980007230A KR 19980007230 A KR19980007230 A KR 19980007230A KR 100273614 B1 KR100273614 B1 KR 100273614B1
Authority
KR
South Korea
Prior art keywords
data
page
read
write
area
Prior art date
Application number
KR1019980007230A
Other languages
Korean (ko)
Other versions
KR19990013323A (en
Inventor
슈조 후지오카
Original Assignee
에노모토 다츠야
미쓰비시 덴키 시스템 엘에스아이 디자인 가부시키가이샤
다니구찌 이찌로오, 기타오카 다카시
미쓰비시덴키 가부시키가이샤
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 에노모토 다츠야, 미쓰비시 덴키 시스템 엘에스아이 디자인 가부시키가이샤, 다니구찌 이찌로오, 기타오카 다카시, 미쓰비시덴키 가부시키가이샤 filed Critical 에노모토 다츠야
Publication of KR19990013323A publication Critical patent/KR19990013323A/en
Application granted granted Critical
Publication of KR100273614B1 publication Critical patent/KR100273614B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Credit Cards Or The Like (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

본 발명은 IC 카드에 있어서 고속으로 액세스할 수 있는 링 버퍼를 실현하는 것에 관한 것이다.The present invention relates to realizing a ring buffer that can be accessed at high speed in an IC card.

본 발명에서는, 하기의 컬럼 판독 커맨드를 준비한다. 판독 기입기(reader-writer)로부터 컬럼 판독 커맨드가 발행되면, 커맨드에 의해 지정되는 판독 대상 버퍼 영역의 선두 페이지를 IC 카드내의 PA 레지스터에 설정한다. 다음에, PA 레지스터가 나타내는 페이지의 소정의 위치의, 예컨대 1바이트째의 데이터를 IC 카드내의 메모리(EEPROM)로부터 판독하기 위한 어드레스를 생성하고, 그것을 이용하여 데이터를 판독한다. PA 레지스터의 값을 증분하면서 이러한 판독 동작을 반복하여, 상기 버퍼 영역의 최후의 페이지까지 판독하면, 판독한 모든 데이터를 판독 기입기에 대하여 송신한다. 판독 기입기는, 이 컬럼 판독 커맨드에 의해 링 버퍼의 모든 페이지의 상태 정보를 한 번에 판독하여 최신 기입 페이지를 검출하고, 그것에 근거하여 링 버퍼에 대한 판독/기입을 한다.In the present invention, the following column read command is prepared. When a column read command is issued from a reader-writer, the first page of the read destination buffer area designated by the command is set in the PA register in the IC card. Next, an address for reading, for example, the first byte of data at a predetermined position of the page indicated by the PA register from the memory (EEPROM) in the IC card is generated, and the data is read using the same. This read operation is repeated while incrementing the value of the PA register, and reading up to the last page of the buffer area transmits all read data to the read write unit. The read write unit reads the status information of all pages of the ring buffer at once by this column read command to detect the latest write page, and reads / writes the ring buffer based on the read write unit.

Description

아이씨 카드IC card

본 발명은, 데이터 판독/기입 장치의 사이에서 데이터를 수수하는 IC 카드에 관한 것이다.The present invention relates to an IC card for receiving data between data read / write devices.

IC 카드는 데이터 판독/기입 장치의 사이에서 데이터 수수를 행하는 것으로서, 예컨대 각종 거래에 사용할 수 있다. 이 때, 거래 등의 이력 정보를 IC 카드에 기억시키는 경우가 많다. 이러한 이력 정보를 IC 카드에 기억시켜 가는 과정에서, 이력 정보를 저장하는 영역으로서 IC 카드의 메모리내에 준비된 기억 영역이 가득차게 되면, 그 기억 영역내에서 가장 오래된 데이터를 소거하고, 그 소거한 영역에 최신의 데이터를 기입하게 된다. 따라서, IC 카드에 거래 등의 이력 정보를 기억시키는 경우에는, IC 카드에서 링 버퍼를 실현할 필요가 있다.The IC card carries data between the data read / write devices, and can be used, for example, for various transactions. At this time, history information such as transactions is often stored in the IC card. In the process of storing such history information in the IC card, if the storage area prepared in the memory of the IC card becomes full as the area for storing the history information, the oldest data in the memory area is erased and the erased area is deleted. The latest data will be written. Therefore, when the IC card stores historical information such as a transaction, it is necessary to realize a ring buffer in the IC card.

IC 카드에서는, 데이터를 기억하기 위한 메모리로서, 통상적으로, EEPROM(Electrically Erasable Programmable Read Only Memory)(전기적 소거 기입 가능형 ROM)이 사용되고 있다. EEPROM은, 기입에 시간을 요하며, 페이지라고 하는 소정의 사이즈(예컨대 16바이트)를 단위로 하여 기입이 행해지는 경우가 많다. 한편, IC 카드의 응용면에서 본 데이터의 단위는 파일이라고 하며, 통상적으로, 화일의 사이즈는 페이지의 사이즈와 같게 되도록 설정되는 경우가 많다. 이러한 IC 카드에 있어서 링 버퍼를 실현하여 거래의 이력 정보를 기억시키는 경우, 도 15의 (a)에 도시한 바와 같이, IC 카드의 메모리에 링 버퍼 영역으로서 마련된 복수의 페이지로 이루어지는 소정 영역에 대하여, 최초의 페이지 1부터 순서대로, 이력 정보 1, 이력 정보 2, …, 이력 정보 n과 같이 기입이 행해져 간다. 그리고, 최후의 페이지 n까지 기입이 행해진 후에 또 기입 요구가 발생하면, 가장 오래된 이력 정보 1이 기입되어 있는 최초의 페이지 1에 최신의 이력 정보 n+1이 오버라이트 된다(도 15의 (b), (c) 참조).In the IC card, an EEPROM (Electrically Erasable Programmable Read Only Memory) (electrically erasable writable ROM) is usually used as a memory for storing data. EEPROM requires time to write, and writing is often performed in units of a predetermined size (for example, 16 bytes) called a page. On the other hand, the unit of data viewed from the application side of the IC card is called a file, and in general, the file size is often set to be the same as the page size. When such a IC card realizes a ring buffer to store transaction history information, as shown in Fig. 15A, a predetermined area composed of a plurality of pages provided as a ring buffer area in the memory of the IC card is provided. , In order from the first page 1, history information 1, history information 2,... The writing is performed like the history information n. If a write request occurs after writing to the last page n again, the latest history information n + 1 is overwritten on the first page 1 on which the oldest history information 1 is written (Fig. 15 (b)). , (c)).

링 버퍼의 실현에 있어서는, 통상적으로, 링 버퍼에서 판독해야 할 위치를 가리키는 판독 포인터와, 기입해야 할 위치를 가리키는 기입 포인터가 마련되는데, IC 카드에 있어서 거래 등의 이력 정보를 기억시키는 경우, 판독 포인터는 가장 최근에 기입된 페이지를 가리키게 되어 있다. 따라서, 기입 포인터는 항상 판독 포인터의 다음 페이지를 가리키도록 되어 있다. 그 결과, 링 버퍼에 대한 판독 및 기입 중 어느 것에 있어서도, 실질적으로는, 가장 최근에 이력 정보를 기입한 페이지(최신 기입 페이지)를 가리키는 포인터(이하「최신 기입 포인터」라고 함)만 획득할 수 있으면 된다.In the realization of the ring buffer, a reading pointer indicating a position to be read from the ring buffer and a writing pointer indicating a position to be written are usually provided. When the IC card stores historical information such as a transaction, reading is performed. The pointer is supposed to point to the most recently written page. Thus, the write pointer is always intended to point to the next page of the read pointer. As a result, in either of reading and writing to the ring buffer, substantially only a pointer (hereinafter referred to as "latest writing pointer") pointing to the page on which the most recent history information is written (latest writing page) can be obtained. All you need is

상기한 바와 같이, 소정의 영역을 링 버퍼로서 사용하는 메모리를 내장한 IC 카드에 대하여 데이터 판독/기입 장치(이하「판독 기입기」라고 함)가 이력 정보를 판독 또는 기입할 때는, IC 카드에 전원 공급이 시작된 후에 링 버퍼에서의 최신 기입 포인터 값을 얻을 필요가 있다. 이에 대하여, 링 버퍼가 실현된 종래의 IC 카드에서는, 링 버퍼를 구성하는 각 페이지의 내용을 조사하여 최신 기입 페이지를 찾든지(이하, 이 방법을 채용한 IC 카드를 「종래예 1」이라고 함), 또는, 최신 기입 포인터를 저장하는 영역을 IC 카드의 메모리(EEPROM 등의 비휘발성 메모리)안에 별도로 마련하고 있었다(이하, 이 방법을 채용한 IC 카드를 「종래예 2」라고 함). 또, IC 카드에는 CPU(Central Processing Unit)(중앙 처리 장치) 등을 내장하여 정보 처리 기능을 갖는 것과 판독/기입 기능만을 갖는 것이 있으며, 정보 처리 기능을 갖는 IC 카드의 경우는 외부의 판독 기입기로부터 이력 정보를 판독 또는 기입할 때에 IC 카드 내부에서 링 버퍼를 구성하는 각 페이지의 내용을 조사하여 최신 기입 페이지를 찾든지, 또는, 최신 기입 포인터의 저장용 영역(이하「포인터 영역」이라고 함)에 저장되어 있는 값을 판독함으로써, 최신 기입 포인터 값을 얻고 있었다. 한편, 판독/기입 기능만을 갖는 IC 카드의 경우는, 외부의 판독 기입기가 IC 카드로부터 링 버퍼 영역의 데이터를 판독하여 최신 기입 페이지를 찾기 시작함으로써, 또는 IC 카드에 있어서의 포인터 영역에서 최신 기입 포인터를 판독함으로써, 최신 기입 포인터 값을 얻고 있었다.As described above, when the data read / write device (hereinafter referred to as "reader") reads or writes history information to an IC card having a memory that uses a predetermined area as a ring buffer, it writes to the IC card. After powering up, we need to get the latest write pointer value in the ring buffer. On the other hand, in the conventional IC card in which the ring buffer is realized, the contents of each page constituting the ring buffer are searched to find the latest written page (hereinafter, the IC card employing this method is referred to as "prior example 1"). Alternatively, an area for storing the latest write pointer was separately provided in a memory (nonvolatile memory such as EEPROM) of the IC card (hereinafter, an IC card employing this method is referred to as "conventional example 2"). Some IC cards have a CPU (Central Processing Unit) or the like and have an information processing function and only a read / write function. An IC card having an information processing function has an external read / write device. When reading or writing the history information from the IC card, the contents of each page constituting the ring buffer are searched inside the IC card to find the latest write page, or a storage area for the latest write pointer (hereinafter referred to as a "pointer area"). The latest write pointer value was obtained by reading the value stored in. On the other hand, in the case of an IC card having only a read / write function, an external read / write device reads the data in the ring buffer area from the IC card to start searching for the latest write page, or the latest write pointer in the pointer area of the IC card. By reading, the latest write pointer value was obtained.

종래의 IC 카드는 데이터를 페이지 단위(예컨대 횡 1열 16바이트)로만 판독 또는 기입하는 것이 불가능하게 되어 있어, 최신 기입 포인터를 위한 영역을 메모리내에 마련하지 않은 경우에는, 최신 기입 페이지를 찾아 내기 위해서, 링 버퍼에 할당한 기억 영역의 데이터를 페이지 단위로 모두 판독하지 않으면 안되었다. 그 결과, 링 버퍼로의 액세스에 많은 시간을 요하고 있었다.In conventional IC cards, data cannot be read or written only in units of pages (e.g., 16 columns in a row). When the area for the latest write pointer is not provided in the memory, in order to find the latest write page. In addition, all data in the storage area allocated to the ring buffer must be read in units of pages. As a result, access to the ring buffer was very time consuming.

한편, 포인터 영역을 메모리내에 마련하는 경우에는, 이력 정보를 기입할 때마다, 최신 기입 포인터의 갱신을 위해 포인터 영역에 대하여 기입을 행하지 않으면 안되고, 이 포인터 영역은 비휘발성 메모리(통상, EEPROM)내에 마련되기 때문에, 그 기입에는 시간을 요한다. 그 결과, 이력 정보의 기입 처리에 장시간을 요하고 있었다. 또한, EEPROM 등에 포인터 영역을 마련한 경우는, 포인터 영역의 리 라이트의 회수가 많아지는 것으로 의한 EEPROM의 열화도 문제로 된다.On the other hand, in the case where the pointer area is provided in the memory, each time the history information is written, the pointer area must be written to update the latest write pointer, and this pointer area is stored in the nonvolatile memory (usually EEPROM). Since it is prepared, the writing takes time. As a result, it took a long time to write history information. In addition, when the pointer area is provided in the EEPROM or the like, the deterioration of the EEPROM due to the increased number of rewrites of the pointer area also becomes a problem.

그래서 본 발명의 목적은, 포인터 영역을 비휘발성 메모리내에 마련하지 않고서도, 고속으로 액세스할 수 있는 링 버퍼를 실현한 IC 카드를 제공하는 것이다.It is therefore an object of the present invention to provide an IC card which realizes a ring buffer which can be accessed at high speed without providing a pointer area in a nonvolatile memory.

도 1은 본 발명의 실시예 1의 IC 카드의 개략적인 구성을 도시하는 블럭도,1 is a block diagram showing a schematic configuration of an IC card of Embodiment 1 of the present invention;

도 2는 링 버퍼로서 사용하는 버퍼 영역의 구성을 도시하는 도면,2 is a diagram showing a configuration of a buffer area used as a ring buffer;

도 3은 상기한 실시예 1에 있어서의 전체 동작을 나타내는 플로우차트,3 is a flowchart showing the overall operation in the first embodiment described above;

도 4는 상기한 실시예 1에 있어서의 컬럼 판독 커맨드의 실행을 나타내는 플로우차트,4 is a flowchart showing execution of a column read command in the first embodiment described above;

도 5는 상기한 실시예 1에서의 기입 커맨드의 실행을 나타내는 플로우차트,5 is a flowchart showing execution of a write command in the first embodiment described above;

도 6은 상기한 실시예 1에서의 판독 커맨드의 실행을 나타내는 플로우챠트,6 is a flowchart showing execution of a read command in the first embodiment described above;

도 7은 본 발명의 실시예 2에 있어서의 버퍼 영역의 구성을 도시하는 도면,7 is a diagram showing the configuration of a buffer area in a second embodiment of the present invention;

도 8은 상기한 실시예 2에 있어서의 판독 포인터 Rptr 및 기입 포인터 Wptr의 설정을 나타내는 플로우차트,8 is a flowchart showing the setting of the read pointer Rptr and the write pointer Wptr in the second embodiment;

도 9는 본 발명의 실시예 3에 있어서의 버퍼 영역의 구성을 도시하는 도면,9 is a diagram showing the configuration of a buffer area in a third embodiment of the present invention;

도 10은 본 발명의 실시예 4에 있어서의 상태 영역의 구성을 도시하는 도면,10 is a diagram showing the configuration of a state area in a fourth embodiment of the present invention;

도 11은 상기한 실시예 3에 있어서의 판독 포인터 Rptr 및 기입 포인터 Wptr의 설정을 나타내는 플로우차트,11 is a flowchart showing settings of the read pointer Rptr and the write pointer Wptr in the above-described third embodiment;

도 12는 상기한 실시예 4에 있어서의 판독 포인터 Rptr 및 기입 포인터 Wptr의 설정의 주요부를 나타내는 플로우차트,Fig. 12 is a flowchart showing the main part of the setting of the read pointer Rptr and the write pointer Wptr in the fourth embodiment;

도 13은 상기한 실시예 4에 있어서의 기입 커맨드의 실행을 나타내는 플로우차트,13 is a flowchart showing execution of a write command in the fourth embodiment;

도 14는 상기한 실시예 4에 있어서의 판독 커맨드의 실행을 나타내는 플로우차트,14 is a flowchart showing execution of a read command in the fourth embodiment;

도 15는 IC 카드에 있어서의 링 버퍼의 실현을 설명하기 위한 도면.Fig. 15 is a view for explaining the realization of the ring buffer in the IC card.

도면의 주요 부분에 대한 부호의 설명Explanation of symbols for the main parts of the drawings

100 : IC 카드 200 : 판독 기입기100: IC card 200: reader

10 : 안테나 12: 변복조 회로10: antenna 12: modulation and demodulation circuit

14 : 입출력 회로 16 : 제어 회로14 input / output circuit 16 control circuit

18 : 메모리(EEPROM)18: Memory (EEPROM)

상기 과제를 해결하기 위해서 이루어진 본 발명에 관한 제 1 IC 카드는, 데이터 판독/기입 장치로부터 커맨드를 수취하고, 수취한 커맨드에 근거하여 상기 데이터 판독/기입 장치의 사이에서 데이터 수수를 행하는 IC 카드에 있어서, 상기 데이터 판독/기입 장치로부터 커맨드를 포함한 데이터를 수취하는 수신 수단과, 상기 데이터 판독/기입 장치로 데이터를 송출하는 송신 수단과, 상기 데이터 판독/기입 장치로부터 수취한 데이터를 저장하기 위한 데이터 영역과 해당 데이터 영역으로의 기입을 나타내는 상태 정보를 저장하기 위한 상태 영역을 포함하는 페이지를 여러 장 모아서 구성되는 기억 영역으로서, 링 버퍼로서 사용되는 기억 영역을 갖는 기억 수단과, 상기 데이터 판독/기입 장치로부터 수취한 데이터를 상기 데이터 영역에 기입했을 때에, 해당 데이터를 기입한 상기 데이터 영역을 포함하는 페이지의 상태 영역에 해당 기입을 나타내는 상태 정보를 기입하는 기입 제어 수단과, 상기 데이터 판독/기입 장치로부터의 데이터로서 수신 수단을 통해 소정의 커맨드를 수취할 경우, 상기 기억 영역내의 모든 페이지에 대하여 상태 영역에 저장된 상태 정보를 순차적으로 판독하고, 그 판독한 상태 정보를 송신 수단을 통해 데이터 판독/기입 장치로 송출하는 판독 제어 수단을 구비한 것을 특징으로 한다.A first IC card according to the present invention, which is made to solve the above problems, receives an instruction from a data read / write device and sends it to an IC card that receives data between the data read / write devices based on the received command. A receiving means for receiving data including a command from the data reading / writing device, Transmission means for sending data to the data reading / writing device, and Data for storing data received from the data reading / writing device A storage area comprising a plurality of pages including an area and a state area for storing state information indicating writing to the data area, the storage means having a storage area used as a ring buffer, and the data reading / writing When data received from the device is written into the data area, Write control means for writing status information indicating the write in a status area of a page including the data area in which the data is written, and receiving a predetermined command via the receiving means as data from the data reading / writing apparatus; And a read control means for sequentially reading the status information stored in the status area for all the pages in the storage area, and sending the read status information to the data read / write device via the transmission means. .

본 발명에 관한 제 2 IC 카드는, 데이터 판독/기입 장치로부터 커맨드를 수취하고, 수취한 커맨드에 근거하여 상기 데이터 판독/기입 장치의 사이에서 데이터 수수를 행하는 IC 카드에 있어서, 상기 데이터 판독/기입 장치로부터 커맨드를 포함하는 데이터를 수취하는 수신 수단과, 상기 데이터 판독/기입 장치로 데이터를 송출하는 송신 수단과, 상기 데이터 판독/기입 장치로부터 수취한 데이터를 저장하기 위한 데이터 영역과 해당 데이터 영역으로의 기입을 나타내는 상태 정보를 저장하기 위한 상태 영역을 포함하는 페이지를 여러 장 모아서 구성되는 기억 영역으로서, 링 버퍼로서 사용되는 기억 영역을 갖는 기억 수단과, 상기 기억 영역을 구성하는 모든 페이지의 상태 정보를 동일한 값으로 미리 초기화해 두고, 상기 데이터 판독/기입 장치로부터 수취한 데이터를 상기 데이터 영역에 기입했을 때에, 해당 데이터를 기입한 상기 데이터 영역을 포함한 페이지의 상태 정보를 구성하는 비트의 값을 반전시키는 기입 제어 수단과, 상기 기억 영역내의 각 페이지의 상태 정보를 순차적으로 판독하여 판독한 상태 정보의 값이 바로 전에 판독한 상태 정보의 값과 다른 경우, 해당 바로 전에 판독한 상태 정보가 저장되어 있던 페이지를 데이터 영역에 가장 최근에 기입이 행해진 최신 기입 페이지로 하고, 판독한 상태 정보의 값이 상기 기억 영역내의 모든 페이지에 걸쳐 동일한 경우, 최후에 판독한 상태 정보가 저장되어 있던 페이지를 최신 기입 페이지로 하여, 해당 최신 기입 페이지에 근거해서, 링 버퍼로서 사용되는 상기 기억 영역에 대한 데이터의 판독 및 기입을 제어하는 링 버퍼 제어 수단을 구비하는 것을 특징으로 한다.A second IC card according to the present invention is an IC card that receives a command from a data read / write device and receives data between the data read / write devices based on the received command, wherein the data read / write is performed. Receiving means for receiving data including a command from the apparatus, transmitting means for sending data to the data reading / writing apparatus, a data region for storing data received from the data reading / writing apparatus, and a corresponding data region. A storage area comprising a plurality of pages including a state area for storing state information indicating the writing of a storage device, the storage means having a storage area used as a ring buffer, and the status information of all pages constituting the storage area. Is initialized to the same value in advance, and the data read / write device is When the taken data is written into the data area, write control means for inverting the value of the bits constituting the status information of the page including the data area in which the data is written, and the status information of each page in the storage area sequentially. If the value of the state information read out by the readout is different from the value of the state information read immediately before, the page in which the state information read immediately before is stored is regarded as the latest write page in which the most recently written data has been written. When the value of the read status information is the same across all the pages in the storage area, the page used as the ring buffer based on the latest write page is used as the page on which the last read status information is stored as the latest write page. Ring buffer control means for controlling the reading and writing of data to and from the storage area And that is characterized.

본 발명에 관한 제 3 IC 카드는, 상기 제 2 IC 카드에 있어서, 상기 상태 정보는 1비트로 이루어지는 것을 특징으로 한다.In the third IC card according to the present invention, in the second IC card, the status information is characterized by one bit.

본 발명에 관한 제 4 IC 카드는, 상기 제 2 IC 카드에 있어서, 상기 상태 정보는 기수개(奇數個)의 비트로 이루어지며, 상기 기입 제어 수단은, 상기 상태 정보를 구성하는 상기 기수개의 비트의 값이 모두 동일하게 되도록 초기화하고, 상기 링 버퍼 제어 수단은, 판독한 상태 정보에 대한 다수결 연산에 의해 값이 다른 비트를 포함하지 않는 상태 정보를 생성하여, 판독한 상태 정보 대신에 해당 다수결 연산에 의해서 생성한 상태 정보를 이용함으로써, 최신 기입 페이지를 검출하는 것을 특징으로 한다.In a fourth IC card according to the present invention, in the second IC card, the state information is made up of odd bits, and the write control means is configured to determine the odd number of bits that constitute the state information. The ring buffer control means generates state information that does not include bits with different values by a majority vote operation on the read state information, and substitutes the read state information for the majority vote operation. By using the status information generated by the above, it is characterized in that the latest written page is detected.

본 발명에 관한 제 5 IC 카드는, 데이터 판독/기입 장치로부터 커맨드를 수취하고, 수취한 커맨드에 근거하여 상기 데이터 판독/기입 장치의 사이에서 데이터의 수수를 행하는 IC 카드에 있어서, 상기 데이터 판독/기입 장치로부터 커맨드를 포함한 데이터를 수취하는 수신 수단과, 상기 데이터 판독/기입 장치로 데이터를 송출하는 송신 수단과, 상기 데이터 판독/기입 장치로부터 수취한 데이터를 저장하기 위한 영역을 포함하는 페이지를 여러 장 모아서 구성되는 기억 영역으로서, 링 버퍼로서 사용되는 기억 영역을 갖는 기억 수단과, 상기 기억 영역을 링 버퍼로서 사용하기 위한 판독 위치 또는 기입 위치를 나타내는 페이지의 값을, 해당 IC 카드에 전원 공급이 시작된 후, 상기 데이터 판독/기입 장치로부터 커맨드를 수취하기 전에 검출하는 링 버퍼 제어 수단을 구비하는 것을 특징으로 한다.A fifth IC card according to the present invention is an IC card that receives a command from a data read / write device and receives data between the data read / write devices based on the received command. A page including receiving means for receiving data including a command from a writing device, transmitting means for sending data to the data reading / writing device, and an area for storing data received from the data reading / writing device. A storage area constituted in a long manner, comprising: a storage means having a storage area used as a ring buffer, and a value of a page indicating a read position or a write position for using the storage area as a ring buffer; Ring buffer to detect after startup, before receiving commands from the data read / write device It characterized in that it comprises a control means.

본 발명에 관한 제 6 IC 카드는, 상기 제 2 내지 제 4 IC 카드 중 어느 한 IC 카드에 있어서, 상기 링 버퍼 제어 수단은, 해당 IC 카드에 전원 공급이 시작된 후, 상기 데이터 판독/기입 장치로부터 커맨드를 수취하기 전에, 상기 최신 기입 페이지를 검출하는 것을 특징으로 한다.The sixth IC card according to the present invention is the IC card according to any one of the second to fourth IC cards, wherein the ring buffer control means is provided from the data reading / writing apparatus after power supply is started to the IC card. The latest write page is detected before receiving the command.

본 발명에 관한 제 7 IC 카드는, 상기 제 2 IC 카드에 있어서, 상기 기억 영역내의 각 페이지의 상태 영역의 사이즈가 정수(整數) 바이트이고, 해당 상태 영역내에, 상태 정보의 저장에 사용되는 영역이외의 영역으로서 기입 확인용 데이터 영역을 마련하며, 상기 기입 제어 수단은, 상기 데이터 판독/기입 장치로부터 수취한 데이터를 상기 데이터 영역에 기입했을 때에, 해당 데이터를 기입한 상기 데이터 영역을 포함하는 페이지의 상태 정보를 구성하는 비트의 값을 반전시킴과 동시에, 해당 페이지의 상태 영역내의 기입 확인용 데이터 영역에, 해당 데이터가 상기 데이터 영역에 정확하게 기입되어 있는지 여부를 확인하기 위한 데이터를 기입하는 것을 특징으로 한다.In the seventh IC card according to the present invention, in the second IC card, the size of the state area of each page in the storage area is an integer byte, and is used for storing state information in the state area. A write confirmation data area is provided as another area, and the write control means includes a page including the data area in which the data is written when data received from the data read / write device is written into the data area. And inverting the value of the bits constituting the state information of the data, and writing data for confirming whether or not the data is correctly written to the data area in the write confirmation data area in the status area of the page. It is done.

본 발명에 관한 제 8 IC 카드는, 상기 제 7 IC 카드에 있어서, 상기 링 버퍼 제어 수단은, i) 상기 기억 영역내의 각 페이지의 상태 정보의 판독에 의해 최신 기입 페이지가 검출되었을 때, 해당 최신 기입 페이지의 기입 확인용 데이터를 판독하여, 해당 기입 확인용 데이터에 의해 해당 최신 기입 페이지의 데이터 영역에 정확하게 데이터가 기입되어 있는지 여부를 판정하는 판정 수단과, ii) 해당 최신 기입 페이지의 데이터 영역에 정확한 데이터가 기입되어 있지 않은 것으로 판정된 경우에, 해당 최신 기입 페이지의 바로 전 페이지를 다시 최신 기입 페이지로 하는 최신 기입 페이지 변경 수단을 포함하는 것을 특징으로 하고 있다.In the eighth IC card according to the present invention, in the seventh IC card, the ring buffer control means includes: i) the latest write page when the latest write page is detected by reading status information of each page in the storage area; Judging means for reading the write confirmation data of the write page and judging whether or not the data is correctly written in the data area of the latest write page by the write confirmation data; and ii) in the data area of the latest write page. When it is determined that the correct data has not been written, it is characterized by including the latest writing page changing means for making the immediately previous page of the latest writing page again into the latest writing page.

발명의 실시예Embodiment of the Invention

이하, 첨부된 도면을 참조하면서 본 발명의 실시예에 대하여 설명한다.Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.

(실시예 1)(Example 1)

〈1.1 하드웨어 구성〉〈1.1 Hardware Configuration〉

도 1은, 본 발명의 실시예 1의 IC 카드의 개략 구성을 도시하는 블럭도이다. 이 IC 카드(100)는, 전파에 의해 판독 기입기(200)의 사이에서 데이터의 수수를 행하는 비접촉형 IC 카드로서, 안테나(10)와, 변복조 회로(12)와, 입출력 회로(14)와, 제어 회로(16)와, 메모리(18)를 구비하며, 입출력 회로(14)와 제어 회로(16)와 메모리(18)는 버스(20)에 의해 접속되어 있다. 이 외에, IC 카드(100)는, 상기 각부에 전원을 공급하기 위한 전원 회로(도시하지 않음)를 구비하고 있다.1 is a block diagram showing a schematic configuration of an IC card according to a first embodiment of the present invention. The IC card 100 is a non-contact type IC card that transmits and receives data between the read and write writers 200 by radio waves, and includes an antenna 10, a modulation / demodulation circuit 12, an input / output circuit 14, and the like. The control circuit 16 and the memory 18 are provided, and the input / output circuit 14, the control circuit 16, and the memory 18 are connected by a bus 20. In addition, the IC card 100 is provided with a power supply circuit (not shown) for supplying power to the respective portions.

상기 구성의 IC 카드(100)에 있어서, 안테나(10), 변복조 회로(12) 및 입출력 회로(14)는, 판독 기입기(200)로부터 커맨드를 포함하는 데이터를 수취하기 위한 수신 수단으로서 기능함과 동시에, IC 카드(100)로부터 판독 기입기(200)로 데이터를 전달하기 위한 송신 수단으로서 기능한다. 메모리(18)는, EEPROM에 의해 구성된 비휘발성의 기억 수단으로서, 판독 기입기(200)로부터 수취한 데이터 등을 저장한다. 제어 회로(16)는, CPU와 소정의 프로그램 등을 저장하는 메모리를 이용하여 구성되어 있으며, CPU가 프로그램을 실행함으로써, 입출력 회로(14) 및 메모리(18) 등의 동작을 제어한다.In the IC card 100 of the above configuration, the antenna 10, the modulation / demodulation circuit 12, and the input / output circuit 14 function as receiving means for receiving data including a command from the read / write device 200. At the same time, it functions as a transmission means for transferring data from the IC card 100 to the reader / writer 200. The memory 18 is a nonvolatile storage means constituted by an EEPROM and stores data received from the read / write device 200 and the like. The control circuit 16 is configured by using a CPU and a memory for storing a predetermined program. The CPU executes a program to control operations of the input / output circuit 14 and the memory 18 and the like.

상기 IC 카드(100)와 데이터의 수수를 행하는 판독 기입기(200)는, 항상 전파를 발신하고 있으며, IC 카드(100)는, 이 판독 기입기(200)로부터의 전파를 수신할 수 있는 소정 범위내에서 동작할 수 있다(이 소정 범위는「동작 영역」이라고 함).The read / write device 200 which transfers data to and from the IC card 100 always transmits radio waves, and the IC card 100 is predetermined to receive radio waves from the read / write device 200. It can operate within a range (this predetermined range is called "operation area").

IC 카드(100)는, 동작 영역내에 들어 가면, 판독 기입기(200)로부터의 전파를 안테나(10)에 의해 수신하여 전기 신호로 변환하고, 그 전기 신호를 변복조 회로(12) 및 전원 회로(도시하지 않음)에 공급한다. 전원 회로는, 그 전기 신호를 정류하여 각 부에 공급함으로써 전원 공급을 행한다. 또, 판독 기입기(200)는, IC 카드(100)에 데이터를 송신하지 않는 경우는, 무변조의 전파를 발신하고 있으며, 데이터를 송신하는 경우는, 그 데이터를 반송파로 변조하여 포함시킨 전파를 발신한다.When entering the operating area, the IC card 100 receives the radio wave from the read / write device 200 by the antenna 10, converts the electric signal into an electric signal, and converts the electric signal into a modulation / demodulation circuit 12 and a power supply circuit ( (Not shown). The power supply circuit supplies power by rectifying the electric signal and supplying the signal to each unit. The read / write unit 200 transmits unmodulated radio waves when the data is not transmitted to the IC card 100, and when the data is transmitted, radio waves in which the data is modulated and included in a carrier wave. To send.

〈1.2 동작의 개요〉<1.2 Outline of Operation>

판독 기입기(200)로부터 IC 카드(100)에 데이터가 송신된 경우, 변복조 회로(12)는 안테나(10)로부터 공급되는 전기 신호를 복조하여 데이터를 추출하고, 이를 직렬 데이터로서 입출력 회로(14)에 입력한다. 입출력 회로(14)는, 변복조 회로(12)로부터 입력된 직렬 데이터를 병렬 데이터로 변환하여 버스(20)에 출력한다. 제어 회로(16)는, 판독 기입기(200)로부터 수취한 데이터에 포함되는 커맨드에 따라서 동작하여, 입출력 회로(14)나 메모리(18)를 제어한다.When data is transmitted from the reader / writer 200 to the IC card 100, the demodulation circuit 12 demodulates the electrical signal supplied from the antenna 10 to extract data, and this is input / output circuit 14 as serial data. ). The input / output circuit 14 converts serial data input from the modulation / demodulation circuit 12 into parallel data and outputs the same to the bus 20. The control circuit 16 operates in accordance with a command included in the data received from the read / write device 200 to control the input / output circuit 14 and the memory 18.

이러한 동작에 의해, IC 카드(100)는, 판독 기입기(200)로부터 데이터를 수취하여 메모리(18)에 저장하고, 또한 메모리(18)에 저장되어 있는 데이터를 판독 기입기(200)로 전송한다. 전술한 바와 같이 메모리(18)는, EEPROM에 의해 구성되어 있으며, 기입은 페이지 단위로 실행되며, 본 실시예에서, 1페이지는 16바이트이다. 이와 더불어, 판독 기입기(200)로부터 IC 카드(100)내의 메모리(18)에 대한 데이터의 판독 및 기입은, 페이지 단위로 되어 있다.By this operation, the IC card 100 receives data from the read / write device 200 and stores the data in the memory 18, and also transfers the data stored in the memory 18 to the read-write device 200. do. As described above, the memory 18 is constituted by an EEPROM, and writing is executed in units of pages. In this embodiment, one page is 16 bytes. In addition, the reading and writing of data from the read / write device 200 to the memory 18 in the IC card 100 are in units of pages.

즉, 판독 기입기(200)로부터 데이터 기입을 요구하는 커맨드(이하「기입 커맨드」라고 함)를 수취한 경우는, 제어 회로(16)가, 그 기입 커맨드에 따라서, 그 기입 커맨드와 함께 전송되어 오는 1페이지분의 데이터(16바이트 데이터)를 메모리(18)에 기입한다. 이 때의 메모리(18)로의 기입 위치를 나타내는 페이지 어드레스는 그 기입 커맨드로 지정된다.That is, when a command for requesting data writing (hereinafter referred to as a &quot; write command &quot;) is received from the read / write device 200, the control circuit 16 is transmitted with the write command in accordance with the write command. One page of data (16 bytes of data) is written into the memory 18. The page address indicating the write position to the memory 18 at this time is specified by the write command.

한편, 판독 기입기(200)로부터 데이터 판독을 요구하는 커맨드(이하 「판독 커맨드」라고 함)를 수취한 경우는, 제어 회로(16)가, 그 판독 커맨드에 따라서, 메모리(18)로부터 원하는 1페이지분의 데이터를 판독한다. 이 때의 메모리(18)로부터의 판독 위치를 나타내는 페이지 어드레스는, 그 판독 커맨드에 의해 지정된다. 제어 회로(16)는, 판독한 데이터를 버스(20)를 거쳐서 입출력 회로(14)에 병렬 데이터로서 전송하고, 입출력 회로(14)는, 이 병렬 데이터를 직렬 데이터로 변환한다. 변복조 회로(12)는, 그 직렬 데이터를 반송파로 변조하여 포함시킨 신호를 생성하고, 안테나(10)는 그 신호를 전파로서 송신한다.On the other hand, when a command for requesting data reading (hereinafter, referred to as a "read command") is received from the read / write device 200, the control circuit 16 requests desired one from the memory 18 according to the read command. Read data for pages. The page address indicating the read position from the memory 18 at this time is designated by the read command. The control circuit 16 transmits the read data to the input / output circuit 14 as parallel data via the bus 20, and the input / output circuit 14 converts the parallel data into serial data. The modulation and demodulation circuit 12 generates a signal in which the serial data is modulated into a carrier wave and included therein, and the antenna 10 transmits the signal as a radio wave.

〈1.3 링 버퍼의 실현〉<1.3 ring buffer realization>

상기한 바와 같은 IC 카드(100)를 각종 거래에 이용하여, 거래 등의 이력 정보를 IC 카드(100)에 기억시키기 위해서는, 기술한 바와 같이, 링 버퍼를 실현해야 한다(도 15 참조). 이 때문에 본 실시예에서는, 메모리(18)내에 있어서 연속하는 복수의 페이지로 이루어지는 기억 영역을 버퍼 영역으로서 확보하고, 이 버퍼 영역을, 판독 기입기(200)와의 사이에서 페이지 단위로 판독 및 기입을 행하는 데이터를 저장하기 위한 영역으로 한다. 버퍼 영역내의 각 페이지는, 도 2에 도시하는 바와 같이 이력 정보를 저장하기 위한 데이터 영역 a2와, 데이터 영역 a2로의 이력 정보의 기입을 나타내는 상태 정보를 저장하는 상태 영역 a1로 이루어진다. 그리고, 최근 기입이 행해진 페이지(최신 기입 페이지)의 값인 페이지 어드레스를 판독 포인터로 하고, 최신 기입 페이지의 다음 페이지를 기입 포인터로 하여(단, 최신 기입 페이지가 버퍼 영역의 최후의 페이지였던 경우, 버퍼 영역의 선두의 페이지 어드레스를 기입 포인터로 함), 버퍼 영역에 대한 기입 및 판독을 행한다. 이에 따라, 버퍼 영역이 링 버퍼로서 사용된다.In order to store the history information such as a transaction in the IC card 100 by using the above-described IC card 100 for various transactions, a ring buffer must be realized as described above (see Fig. 15). For this reason, in the present embodiment, a memory area composed of a plurality of consecutive pages in the memory 18 is secured as a buffer area, and the buffer area is read and written in units of pages between the read and write writers 200. It is an area for storing data to be performed. Each page in the buffer area consists of a data area a2 for storing history information and a state area a1 for storing state information indicating the writing of the history information to the data area a2, as shown in FIG. Then, the page address which is the value of the most recently written page (latest write page) is used as the read pointer, and the next page of the latest write page is used as the write pointer (provided that the latest write page is the last page in the buffer area. The page address at the head of the area is used as a write pointer), and the buffer area is written and read. Thus, the buffer area is used as the ring buffer.

구체적으로는, 판독 기입기(200)가 판독 커맨드에 있어서의 판독 페이지 어드레스로서 판독 포인터를 지정하고, 기입 커맨드에 있어서의 기입 페이지 어드레스로서 기입 포인터를 지정함으로써, 버퍼 영역이 링 버퍼로서 사용된다. 그러나, 이를 위해서는, 판독 기입기(200)는, 판독 커맨드 또는 기입 커맨드를 발행하기 전에 버퍼 영역에 있어서의 최신 기입 페이지를 검출하고, 이에 근거하여 판독 포인터와 기입 포인터를 얻을 필요가 있다. 그래서 본 실시예에서는, 버퍼 영역에 있어서의 각 페이지로의 기입을 나타내는 상태 정보를 한번에 판독하기 위해서, 컬럼 판독 커맨드가 준비되어 있다. 여기에서 말하는 컬럼 판독 커맨드는, 그 커맨드에 의해 지정되는 소정 범위의 기억 영역에 있어서의 각 페이지의 소정 위치의 데이터(예컨대 1바이트째의 값)를 1회의 커맨드 발행으로 IC 카드(100)로부터 판독하는 것을 요구하는 커맨드이다. 즉, 종래의 판독 커맨드는 「가로 방향」으로 16바이트(1페이지분)씩 밖에 데이터를 판독할 수 없지만, 컬럼 판독 커맨드에 의하면, 연속하는 복수의 페이지에 있어서의 소정 위치(예컨대 각 페이지의 1바이트째)의 데이터를 「세로 방향(컬럼 방향)」으로 판독할 수 있게 된다.Specifically, the read / write unit 200 designates a read pointer as the read page address in the read command and the write pointer as the write page address in the write command, so that the buffer area is used as the ring buffer. However, for this purpose, the read / write device 200 needs to detect the latest write page in the buffer area before issuing a read command or a write command, and obtain a read pointer and a write pointer based on this. Therefore, in this embodiment, a column read command is prepared to read status information indicating writing to each page in the buffer area at once. The column read command referred to herein reads data (for example, the first byte value) of the predetermined position of each page in the storage area of the predetermined range designated by the command from the IC card 100 by issuing a single command. Command to request. That is, the conventional read command can read data only by 16 bytes (for one page) in the "horizontal direction", but according to the column read command, a predetermined position (for example, 1 of each page) in a plurality of consecutive pages is read. Byte) data can be read in the "vertical direction (column direction)".

〈1.4 커맨드 실행 처리〉<1.4 Command Execution Process>

상기한 바와 같이, 기입 커맨드 및 판독 커맨드에 부가하여 컬럼 판독 커맨드가 준비된 본 실시예의 IC 카드(100)의 동작을, 도 3에 나타내는 플로우차트를 참조하면서 설명한다. 또 본 실시예에서, 컬럼 판독 커맨드에서는 컬럼 판독의 대상으로 되는 버퍼 영역이 페이지값에 의해 지정됨과 동시에, 그 버퍼 영역내의 각 페이지에 있어서의 판독 대상의 위치(예컨대 각 페이지의 1바이트째)가 지정되어 있는 것으로 한다. 또한, 기입 커맨드에서는 기입 대상의 페이지의 값(예컨대 기입 포인터)이, 판독 커맨드에서는 판독 대상의 페이지의 값(예컨대 판독 포인터)이, 각각 지정되는 것으로 한다.As described above, the operation of the IC card 100 of the present embodiment in which the column read command is prepared in addition to the write command and the read command will be described with reference to the flowchart shown in FIG. In the present embodiment, in the column read command, the buffer area to be read is designated by the page value, and the position of the reading target (for example, the first byte of each page) in each page in the buffer area is specified. It is assumed to be specified. In the write command, the value of the page to be written (for example, the write pointer) is designated, and in the read command, the value of the page to be read (for example, the read pointer) is designated.

IC 카드(100)가 동작 영역에 들어와서 판독 기입기(200)로부터의 전파를 수신하여, IC 카드(100)의 각 부에 대한 전원 공급이 시작되면, 우선, 초기 설정이 행해지고(단계 S10), 이에 따라 IC 카드(100)는, 판독 기입기(200)로부터의 커맨드를 접수할 수 있는 상태로 된다. 초기 설정후에는, 판독 기입기(200)로부터 커맨드가 전송되어 오는 것을 대기하는 상태로 되며(단계 S12), 판독 기입기(200)로부터 커맨드가 발행되어, 그것이 전파로서 발신되면, IC 카드(100)는, 이것을 안테나(10)로 수신하여, 변복조 회로(12) 및 입출력 회로(14)를 거쳐서 제어 회로(16)로 전송한다. 제어 회로(16)는, 그 커맨드를 해석하여(단계 S14), 그 커맨드의 종류에 따라서, 컬럼 판독 커맨드의 실행 처리(단계 S16), 기입 커맨드의 실행 처리(S18), 판독 커맨드의 실행 처리(단계 S20)중 어느 하나를 행한다.When the IC card 100 enters the operation area and receives radio waves from the read / write device 200, and power supply to each part of the IC card 100 starts, first, initial setting is performed (step S10). As a result, the IC card 100 enters a state in which the command from the read / write unit 200 can be accepted. After the initial setting, it is in a state of waiting for a command to be transmitted from the read / write device 200 (step S12), and when a command is issued from the read / write device 200 and transmitted as a radio wave, the IC card 100 ) Receives this to the antenna 10 and transmits it to the control circuit 16 via the modulation / demodulation circuit 12 and the input / output circuit 14. The control circuit 16 analyzes the command (step S14), and executes the column read command execution process (step S16), the write command execution process (S18), and the read command execution process (depending on the type of the command). Any one of step S20) is performed.

〈1.4.1 컬럼 판독 커맨드〉<1.4.1 Column Read Command>

도 4는, 컬럼 판독 커맨드의 실행 처리(도 3의 단계 S16)의 순서를 나타내는 플로우차트이다. 제어 회로(16)는, 컬럼 판독 커맨드를 인식하면, 우선 그 컬럼 판독 커맨드에 의해 지정된 버퍼 영역의 선두 페이지의 값을 제어 회로(16)에 마련된 소정 레지스터(이하 「PA 레지스터」라고 함)에 설정하고(단계 S100), 이 PA 레지스터의 값을 이용하여, 버퍼 영역의 선두 페이지중 컬럼 판독 커맨드에 의해 지정되는 판독 대상 위치에 액세스하기 위한 어드레스(이하 「컬럼 어드레스」라고 함)를 생성한다(단계 S102). 예컨대 상태 영역 a1이 각 페이지의 1바이트째로서 각 페이지의 상태 정보를 판독하고자 하는 경우에는, PA 레지스터로 표시되는 페이지의 1바이트째의 어드레스를 컬럼 어드레스로서 생성한다. 컬럼 어드레스가 생성되면, 이것을 이용하여, 선두 페이지의 판독 대상 위치의 데이터(이하 「컬럼 판독 데이터」라고 함)를 메모리(18)로부터 판독하여, 판독한 컬럼 판독 데이터를 제어 회로(16)내에 일시적으로 저장한다(단계 S104). 다음에, PA 레지스터의 값이 컬럼 판독 커맨드에 의해 지정된 버퍼 영역의 최후의 페이지값인지 여부, 즉 그 버퍼 영역의 최후의 페이지의 컬럼 판독 데이터까지 판독했는지 여부를 판정한다(단계 S106). PA 레지스터의 값이 상기 버퍼 영역의 최후의 페이지값이 아닌 경우는, PA 레지스터의 값을 1만큼 증분시킨 후(단계 S108), 단계 S102로 되돌아간다.4 is a flowchart showing the procedure of executing the column read command (step S16 of FIG. 3). When the control circuit 16 recognizes a column read command, it first sets a value of the first page of the buffer area designated by the column read command to a predetermined register provided in the control circuit 16 (hereinafter referred to as a "PA register"). (Step S100), using the value of this PA register, an address (hereinafter referred to as "column address") for accessing the read target position designated by the column read command in the first page of the buffer area is generated (step). S102). For example, when the status area a1 intends to read status information of each page as the first byte of each page, an address of the first byte of the page indicated by the PA register is generated as a column address. When a column address is generated, data is read from the memory 18 (hereinafter referred to as &quot; column read data &quot;) of the first page reading target position using this to temporarily read the read column read data into the control circuit 16. (Step S104). Next, it is determined whether or not the value of the PA register is the last page value of the buffer area designated by the column read command, that is, whether the column read data of the last page of the buffer area has been read (step S106). If the value of the PA register is not the last page value of the buffer area, the value of the PA register is incremented by one (step S108), and the flow returns to step S102.

이하, 마찬가지로 해서, 단계 S102→S104→S106→S108을 반복하여 실행함으로써, 컬럼 판독 커맨드로 지정된 버퍼 영역의 각 페이지의 컬럼 판독 데이터를 순차적으로 판독하여 제어 회로(16)내에 저장해 간다. 이 동안에, 단계 S106에서 PA 레지스터의 값이 상기 버퍼 영역의 최후의 페이지값인 것으로 판정되면, 즉 최후의 페이지의 컬럼 판독 데이터까지 판독한 것으로 판정되면, 단계 S110으로 진행한다. 이 시점에서는, 제어 회로(16)내에, 상기 버퍼 영역의 모든 페이지의 컬럼 판독 데이터, 즉 상기 버퍼 영역을 컬럼 방향으로 판독한 데이터가 저장되어 있으며, 단계 S110에서는, 이들 데이터를 컬럼 판독 커맨드에 대한 응답으로서 판독 기입기(200)에 송출하기 위해서 입출력 회로(14)로 전송하고, 이에 따라, 컬럼 판독 커맨드에 대한 제어 회로(16)의 처리가 종료된다. 컬럼 판독 커맨드에서 예컨대 링 버퍼로서 사용하는 버퍼 영역 전체를 지정하고, 판독 대상 위치로서 상태 영역 a1의 위치(예컨대 1바이트째)를 지정하면, 상기 처리에 의해, 링 버퍼를 구성하는 각 페이지의 상태 정보를 얻을 수 있게 된다.In the same manner, the steps S102? S104? S106? S108 are executed in the same manner so that the column read data of each page of the buffer area designated by the column read command is sequentially read out and stored in the control circuit 16. In the meantime, if it is determined in step S106 that the value of the PA register is the last page value of the buffer area, that is, it is determined that the column read data of the last page has been read, the process proceeds to step S110. At this point in time, the column read data of all the pages of the buffer area, that is, the data obtained by reading the buffer area in the column direction, is stored in the control circuit 16. In step S110, these data are stored for the column read command. As a response, the data is transmitted to the input / output circuit 14 to be sent to the read / write device 200, whereby the processing of the control circuit 16 for the column read command is terminated. In the column read command, for example, the entire buffer area to be used as the ring buffer is designated, and the position (for example, the first byte) of the state area a1 is designated as the read destination position. Information can be obtained.

입출력 회로(14)에 전송된 응답은, 변복조 회로(12) 및 안테나(10)를 거쳐서 전파로서 판독 기입기(200)를 향하여 송출된다.The response transmitted to the input / output circuit 14 is sent out to the read / write unit 200 as a radio wave via the modulation / demodulation circuit 12 and the antenna 10.

〈1.4.2 기입 커맨드〉<1.4.2 Write command>

도 5는, 링 버퍼에 이력 정보를 기입하기 위한 기입 커맨드의 실행 처리(도 3의 단계 S18)의 순서를 나타내는 플로우차트이다. 이 경우, 기입 커맨드에서는, 기입 대상의 페이지로서 링 버퍼에 대한 기입 포인터가 지정되고, 이력 정보가 기입 데이터로서 기입 커맨드와 함께 판독 기입기(200)로부터 전송되어 온다. 제어 회로(16)는, 기입 커맨드를 인식하면, 우선 그 기입 커맨드에 의해 지정된 페이지값인 기입 포인터를 제어 회로(16)에 마련된 PA 레지스터에 설정하고(단계 S120), 이 PA 레지스터의 값을 이용하여, 메모리(18)에 기입하기 위한 어드레스를 생성한다(단계 S122). 그리고 이 어드레스를 이용하여, 기입 커맨드와 함께 판독 기입기(200)로부터 전송된 이력 정보를 메모리(18)에 있어서의 링 버퍼에 기입한다(단계 S124). 이 때 기입에 의해, PA 레지스터에 지정되는 페이지 즉, 기입 포인터가 가리키는 페이지에 있어서의 상태 정보의 갱신도 실행된다. 그 후, 이 기입 커맨드에 대한 응답을 판독 기입기(200)를 향하여 송신한다(단계 S126). 이에 따라, 기입 커맨드의 실행이 종료된다.FIG. 5 is a flowchart showing a procedure of executing a write command (step S18 in FIG. 3) for writing history information into the ring buffer. In this case, in the write command, a write pointer for the ring buffer is designated as the page to be written, and history information is transferred from the read / write device 200 together with the write command as the write data. Upon recognizing the write command, the control circuit 16 first sets the write pointer, which is the page value designated by the write command, to the PA register provided in the control circuit 16 (step S120), and uses the value of the PA register. Thus, an address for writing to the memory 18 is generated (step S122). Using this address, the history information transmitted from the read / write unit 200 together with the write command is written into the ring buffer in the memory 18 (step S124). At this time, the writing also updates the status information on the page specified in the PA register, that is, the page indicated by the write pointer. Thereafter, a response to this write command is transmitted toward the read / write device 200 (step S126). As a result, execution of the write command is terminated.

〈1.4.3 판독 커맨드〉<1.4.3 Read command>

도 6은, 링 버퍼로부터 이력 정보를 판독하기 위한 판독 커맨드의 실행 처리(도 3의 단계 S20)의 순서를 나타내는 플로우차트이다. 이 경우, 판독 커맨드에 있어서 판독 대상의 페이지로서 링 버퍼에 대한 판독 포인터가 지정된다. 제어 회로(16)는, 판독 커맨드를 인식하면, 우선 그 판독 커맨드에 의해 지정된 페이지값인 판독 포인터를 제어 회로(16)에 마련된 PA 레지스터에 설정하고(단계 S130), 이 PA 레지스터의 값을 이용하여, 메모리(18)로부터 데이터를 판독하기 위한 어드레스를 생성한다(단계 S132). 다음에, 이 어드레스를 이용하여, 메모리(18)에 있어서의 링 버퍼로부터 이력 정보를 판독한다(단계 S134). 그리고, 판독한 이력 정보를 판독 기입기(200)를 향하여 송신한다(단계 S136). 이에 따라, 판독 커맨드의 실행이 종료된다.FIG. 6 is a flowchart showing the procedure of the execution process of the read command (step S20 of FIG. 3) for reading the history information from the ring buffer. In this case, the read pointer for the ring buffer is designated as the page to be read in the read command. When the control circuit 16 recognizes a read command, first, it sets the read pointer which is the page value designated by the read command to the PA register provided in the control circuit 16 (step S130), and uses the value of this PA register. Thus, an address for reading data from the memory 18 is generated (step S132). Next, using this address, history information is read from the ring buffer in the memory 18 (step S134). Then, the read history information is transmitted toward the reader / writer 200 (step S136). As a result, execution of the read command is terminated.

〈1.5 제어 회로의 다른 구성〉<1.5 Other Configuration of Control Circuit>

상술한 동작을 하는 본 실시예의 제어 회로(16)는, CPU와 소정의 프로그램 등을 저장하는 메모리로 구성되어 있으며, CPU가 프로그램을 실행함으로써, 컬럼 판독 커맨드에 대한 상술한 동작을 포함하는, 메모리(18) 및 입출력 회로(14)에 대한 제어 동작이 실현된다. 그러나, 이상의 설명으로부터 알 수 있는 바와 같이, 제어 회로(16)가 실현해야 할 기능은, 판독 기입기(200)로부터 발행되는 커맨드의 해석과, 그 커맨드에 따라서, 메모리(16)로의 액세스를 위한 어드레스를 생성하거나, 메모리(16) 및 입출력 회로(14)에 원하는 동작을 실행시키기 위한 제어 신호를 생성하거나 하는 것이며, 이들 기능은 하드웨어에 의해서도 용이하게 실현될 수 있다. 따라서, 현시점에서 입수가능한 CPU 칩의 비용이나 소비 전력 등과 제어 회로(16)에 요구되는 기능이나 성능을 비교 고려하여, CPU에 의한 실현 대신에 전용 하드웨어로 제어 회로(16)를 실현하여도 좋다.The control circuit 16 of this embodiment which performs the above-mentioned operation is comprised by the CPU and the memory which stores a predetermined program etc., and includes the above-mentioned operation | movement with respect to a column read command by a CPU executing a program. (18) and control operations for the input / output circuit 14 are realized. However, as can be seen from the above description, the function to be realized by the control circuit 16 is to analyze the command issued from the read / write device 200 and to access the memory 16 in accordance with the command. It is to generate an address or to generate a control signal for executing a desired operation in the memory 16 and the input / output circuit 14, and these functions can be easily realized by hardware. Therefore, the control circuit 16 may be realized by dedicated hardware instead of the CPU by considering the cost, power consumption, and the like required for the current control of the CPU chip.

〈1.6 효과〉〈1.6 Effect〉

이상에서 설명한 본 실시예의 IC 카드(100)에 의하면, 판독 기입기(200)는, 컬럼 판독 커맨드를 발행함으로써, 버퍼 영역의 각 페이지의 상태 정보를 한번에 얻을 수 있으며, 이로부터 최신 기입 페이지를 검출할 수 있다. 그리고, 검출한 최신 기입 페이지로부터 버퍼 영역에 대한 기입 포인터 및 판독 포인터를 획득하고, 이것을 이용하여 기입 커맨드나 판독 커맨드를 발행함으로써, IC 카드내의 버퍼 영역을 링 버퍼로서 액세스할 수 있다. 따라서, 최신 기입 페이지를 검출하기 위해 버퍼 영역의 모든 페이지를 판독했던 종래예나, 최신 기입 페이지를 나타내는 포인터를 EEPROM(도 1에 있어서의 메모리(18)에 상당)에 저장했던 종래예에 비해, 링 버퍼에 대한 이력 정보의 판독이나 기입이 고속화된다.According to the IC card 100 of the present embodiment described above, the read / write unit 200 can obtain the state information of each page of the buffer area at once by issuing a column read command, and thereby detecting the latest write page. can do. The buffer area in the IC card can be accessed as a ring buffer by obtaining a write pointer and a read pointer for the buffer area from the detected latest write page and using this to issue a write command or a read command. Therefore, compared with the conventional example in which all pages of the buffer area have been read in order to detect the latest write page, or the conventional example in which a pointer indicating the latest write page is stored in the EEPROM (corresponding to the memory 18 in FIG. 1). The reading and writing of history information for the buffer is speeded up.

또 상기에서는 비접촉형 IC 카드를 예로 들어 설명하였지만, 접촉형 IC 카드에 있어서도, 수신 수단이나 송신 수단 등, 판독 기입기(200)와의 인터페이스는 상이하나, 상기와 같이 하여 컬럼 판독 커맨드를 실현하는 것이 가능하며, 마찬가지의 효과를 얻을 수 있다.In the above description, the non-contact type IC card has been described as an example. However, in the contact type IC card, the interface with the read / write device 200, such as the receiving means and the transmitting means, is different. It is possible to achieve the same effect.

〈1.7 변형예〉<1.7 modification>

상기 실시예 1의 IC 카드(100)는, 판독/기입 기능 밖에 갖고 있지 않지만, 제어 회로(16)가 CPU를 이용하여 실현되어 있는 경우에는, CPU에 의해, 버퍼 영역내의 최신 기입 페이지를 검출하고, 판독 포인터 및 기입 포인터를 IC 카드(100)내 (제어 회로(16)내)에서 유지하는 것도 가능하다. 이 경우, 판독 기입기(200)는, 판독 포인터를 지정하지 않고서 판독 커맨드를 발행하고, 또한 기입 커맨드를 지정하지 않고서 기입 커맨드를 발행함으로써, IC 카드(100)내의 버퍼 영역을 링 버퍼로서 사용할 수 있다. 또한, 이 경우, IC 카드(100)는, 동작 영역내에 들어와 전원 공급이 시작되고 나서 판독 기입기(200)로부터 판독 커맨드 또는 기입 커맨드가 발행될 때까지, 최신 기입 페이지를 검출하여 판독 포인터 및 기입 포인터를 설정하는 것이 바람직하다. 비접촉형 IC 카드 등과 같이 아날로그 회로를 포함하는 IC 카드의 경우에는, 특히, 이러한 구성이 효과적이다. 그 이유는, 비접촉형 IC 카드에서는, 전원 공급이 시작되어 디지털 회로가 동작 가능하게 되어도 아날로그 회로의 동작이 안정될 때까지 대기해야 하며, 이 대기 기간에 디지털 회로에 의해 판독 포인터 및 기입 포인터의 설정을 하면, 시간을 효율적으로 이용할 수 있으므로, 결과적으로, IC 카드에 있어서의 링 버퍼에 대한 판독이나 기입이 실질적으로 고속화되기 때문이다.The IC card 100 of the first embodiment has only a read / write function, but when the control circuit 16 is realized using a CPU, the CPU detects the latest write page in the buffer area. It is also possible to hold the read pointer and the write pointer in the IC card 100 (in the control circuit 16). In this case, the read / write device 200 can use the buffer area in the IC card 100 as a ring buffer by issuing a read command without specifying a read pointer and issuing a write command without specifying a write command. have. In this case, the IC card 100 detects the latest write page by entering the operation area and starting the power supply until a read command or a write command is issued from the read / write device 200, thereby reading the read pointer and the write. It is desirable to set a pointer. In the case of an IC card including an analog circuit such as a noncontact IC card or the like, such a configuration is particularly effective. The reason is that in the non-contact type IC card, even when the power supply is started and the digital circuit is enabled, the analog circuit must wait until the operation of the analog circuit is stabilized. In this waiting period, the read and write pointers are set by the digital circuit. This is because the time can be used efficiently, and as a result, the read and write to the ring buffer in the IC card is substantially speeded up.

(실시예 2)(Example 2)

〈2.1 전체의 구성 및 동작〉<2.1 General Configuration and Operation>

다음에, 본 발명의 실시예 2의 IC 카드에 대하여 설명한다. 이 IC 카드의 개략 구성은 실시예 1과 마찬가지이고 도 1에 도시하는 바와 같으며, 본 실시예에 대해서도 도 1을 참조하면서 설명한다.Next, the IC card of Embodiment 2 of the present invention will be described. The schematic configuration of this IC card is the same as that of the first embodiment and is shown in FIG. 1, and this embodiment will be described with reference to FIG.

본 실시예의 IC 카드(100)에서는, 도 7에 도시하는 바와 같이 메모리(18)내의 링 버퍼로서 사용하는 버퍼 영역을 구성하는 각 페이지는, 1비트의 상태 정보(이하 「상태 비트」라고 함)를 저장하기 위한 상태 영역 a1과, 이력 정보를 저장하기 위한 데이터 영역 a2로 이루어진다. 그리고 상태 비트의 설정은 IC 카드(100)내에서 제어 회로(16)에 의해 실행되고, 이 버퍼 영역을 링 버퍼로서 사용하기 위한 판독 포인터 및 기입 포인터의 설정도 제어 회로(16)에 의해 실행된다. 본 실시예의 제어 회로(16)의 구성도 실시예 1과 마찬가지이고, CPU와 소정의 프로그램 등을 저장하는 메모리로 구성되어 있으며, CPU가 그 프로그램을 실행함으로써 메모리(18)나 입출력 회로(14)에 대한 제어 동작이 실현된다.In the IC card 100 of the present embodiment, as shown in Fig. 7, each page constituting the buffer area used as the ring buffer in the memory 18 is 1 bit of status information (hereinafter referred to as "status bit"). A status area a1 for storing the data and a data area a2 for storing the history information. The setting of the status bit is executed by the control circuit 16 in the IC card 100, and the setting of the read pointer and the write pointer for using this buffer area as the ring buffer is also executed by the control circuit 16. . The configuration of the control circuit 16 of the present embodiment is also the same as that of the first embodiment, and is composed of a CPU and a memory for storing a predetermined program, and the like. The memory 18 or the input / output circuit 14 is executed by the CPU executing the program. The control operation for is realized.

〈2.2 주요부의 상세한 동작〉<2.2 Detailed Operations of Main Parts>

본 실시예에서는 버퍼 영역에서의 각 페이지의 상태 비트는 「0」으로 미리 초기화되어 있으며, 판독 기입기(200)로부터 기입 커맨드를 수취하여 이력 정보가 버퍼 영역에 기입될 때에, 그 이력 정보가 기입되는 페이지의 상태 비트가 반전된다(이것이 상태 정보의 갱신에 상당함). 즉, 어떤 페이지의 데이터 영역 a2에 최초로 이력 정보가 기입되면, 그 페이지의 상태 비트는 「1」로 설정되고, 그 후 이력 정보의 기입이 계속되어 링 버퍼를 일순(一巡)하여 다시 그 페이지에 이력 정보가 기입되면, 그 페이지의 상태 비트는 「0」으로 설정된다. 본 실시예에서는, IC 카드내에서 제어 회로(16)가, 상기한 바와 같이 설정되는 각 페이지의 상태 비트를 참조하여 최신 기입 페이지를 검출하고, 검출한 최신 기입 페이지에 근거하여 버퍼 영역에 대한 판독 포인터 및 기입 포인터를 제어 회로(16)내에 설정하여 유지한다. 전술한 바와 같이, 본 실시예와 같은 비접촉형 IC 카드의 경우에는, IC 카드가 동작 영역에 들어와 전원의 공급이 시작되고 나서 판독 기입기(200)로부터 판독 커맨드 또는 기입 커맨드가 발행될 때까지, 판독 포인터 및 기입 포인터를 설정하는 것이 바람직하다. 그래서 본 실시예에서는, IC 카드(100)에 전원의 공급이 시작된 후, 제어 회로(16)가 도 8의 플로우차트에 도시하는 바와 같이 동작함으로써, 판독 포인터 및 기입 포인터가 설정된다.In this embodiment, the status bit of each page in the buffer area is initialized to "0" in advance, and when the write command is received from the read / write device 200 and the history information is written to the buffer area, the history information is written. The status bit of the page being reversed is reversed (this corresponds to updating of status information). In other words, when history information is first written to the data area a2 of a page, the status bit of the page is set to &quot; 1 &quot;. Then, writing of history information is continued, and the ring buffer is sequentially ordered again to the page. When the history information is written, the status bit of the page is set to "0". In this embodiment, in the IC card, the control circuit 16 detects the latest write page with reference to the status bits of each page set as described above, and reads out the buffer area based on the detected latest write page. The pointer and the write pointer are set and held in the control circuit 16. As described above, in the case of the non-contact type IC card as in the present embodiment, until the IC card enters the operation area and the supply of power is started until a read command or a write command is issued from the read / write device 200, It is preferable to set the read pointer and the write pointer. Thus, in this embodiment, after the power supply is started to the IC card 100, the control circuit 16 operates as shown in the flowchart of Fig. 8, whereby the read pointer and the write pointer are set.

즉, 우선 링 버퍼로서 사용하는 버퍼 영역의 선두 페이지인 페이지 1의 상태 비트를 판독하고 이것을 STAa로 한다(단계 S30). 다음에 페이지 번호를 나타내는 변수 k를 2로 한 후(단계 S32), 페이지 k의 상태 비트를 판독하여 이것을 STAb로 한다. 그리고, 연속하는 2개의 페이지의 상태 비트인 STAa와 STAb가 동일한지 여부를 판정한다(단계 S36). STAa와 STAb가 동일하면 단계 S38로 진행하여, 페이지 k가, 링 버퍼로서 사용하는 버퍼 영역의 최후의 페이지인지 여부를 판정한다. 그 결과, 최후의 페이지가 아니면, k의 값을 1만큼 증분하여(단계 S40), STAa의 값을 STAb의 값으로 치환한 후(단계 S42), 단계 S34로 되돌아간다. 이후, 연속하는 2개의 페이지의 상태 비트인 STAa와 STAb가 동일하고, 또한 페이지 k가 상기 버퍼 영역의 최후의 페이지가 아닌 한, 단계 S34→S36→S38→S40→S42라고 하는 루프가 반복하여 실행된다.That is, first, the status bit of page 1, which is the first page of the buffer area to be used as the ring buffer, is read out, and this is STAa (step S30). Next, after setting the variable k representing the page number to 2 (step S32), the status bit of the page k is read out to be STAb. Then, it is determined whether STAa and STAb which are status bits of two consecutive pages are the same (step S36). If STAa and STAb are the same, the flow advances to step S38 to determine whether page k is the last page of the buffer area used as the ring buffer. As a result, if it is not the last page, the value of k is incremented by 1 (step S40), the value of STAa is replaced with the value of STAb (step S42), and the process returns to step S34. Thereafter, as long as STAa and STAb, which are status bits of two consecutive pages, are the same and page k is not the last page of the buffer area, a loop of steps S34-> S36-> S38-> S40-> S42 is repeatedly executed. do.

이 루프의 실행중에, STAa와 STAb가 상이하면 단계 S44로 진행한다. 이 경우, 상태 비트 STAa를 포함하는 페이지 k-1이 최신 기입 페이지이기 때문에, 판독 포인터 Rptr을 k-1로 설정하고, 기입 포인터 Wptr을 k로 설정한다(도 7의 (a) 참조).During the execution of this loop, if STAa and STAb are different, the process proceeds to step S44. In this case, since the page k-1 including the status bit STAa is the latest write page, the read pointer Rptr is set to k-1 and the write pointer Wptr is set to k (see Fig. 7A).

상기 루프의 실행중에, 단계 S38에 있어서 페이지 k가 최후의 페이지인 것으로 판정된 경우, 즉 상기 버퍼 영역의 모든 페이지의 상태 비트가 동일한 경우는, 단계 S46으로 진행한다. 이 경우, 판독 포인터 Rptr을 k로 설정하고, 기입 포인터 Wptr을 1로 설정한다(도 7의 (b) 참조).During the execution of the loop, if it is determined in step S38 that page k is the last page, i.e., if the status bits of all pages of the buffer area are the same, step S46 is reached. In this case, the read pointer Rptr is set to k, and the write pointer Wptr is set to 1 (see Fig. 7B).

〈2.3 효과〉<2.3 effects>

이상과 같이 본 실시예에 의하면, 각 페이지에 마련된 1비트의 상태에서 최신 기입 페이지가 검출되기 때문에, 메모리 용량이 작아진다. 또한, 기입 포인터와 판독 포인터의 설정 처리를 하는 제어 회로(16)는, CPU와 그 CPU가 실행하는 프로그램을 저장하기 위한 메모리 등으로 구성되어 있지만, 상기 설정 처리를 전용 하드웨어에 의해 실현하는 것도 가능하다. 이 경우, 각 페이지에 마련된 1비트의 상태로 최신 기입 페이지가 검출되는 것으로부터, 그 전용 하드웨어의 구성이 간단해지는 이점이 있다.As described above, according to the present embodiment, since the latest write page is detected in the state of 1 bit provided in each page, the memory capacity is reduced. The control circuit 16 for setting the write pointer and the read pointer is composed of a CPU and a memory for storing a program executed by the CPU, but the setting process can be realized by dedicated hardware. Do. In this case, since the latest write page is detected in the state of 1 bit provided in each page, there is an advantage that the configuration of the dedicated hardware is simplified.

〈2.4 기타〉〈2.4 Others〉

또 본 실시예에 있어서의 기입 커맨드 및 판독 커맨드의 실행 처리는, 실시예 1의 경우와 기본적으로 마찬가지이다(도 5 및 도 6 참조). 단 본 실시예에서는, 링 버퍼에 대하여 이력 정보의 기입 또는 판독을 하는 경우에는, 그 기입 또는 판독의 대상으로 되는 페이지는, 기입 커맨드 또는 판독 커맨드에 의해서는 지정되지 않고, IC 카드(100)의 제어 회로(16)내에 저장되어 있는 기입 포인터 또는 판독포인터에 의해서 지정된다. 따라서, 이 경우 메모리(18)에 액세스하기 위한 어드레스 생성시 PA 레지스터는 사용되지 않으며, 기입 포인터 또는 판독 포인터가 사용된다.The execution processing of the write command and the read command in the present embodiment is basically the same as in the case of the first embodiment (see Figs. 5 and 6). In the present embodiment, however, when writing or reading the history information to the ring buffer, the page to be written or read is not designated by the write command or the read command. This is specified by a write pointer or read pointer stored in the control circuit 16. Thus, in this case, the PA register is not used in generating an address for accessing the memory 18, and a write pointer or read pointer is used.

(실시예 3)(Example 3)

〈3.1 전체의 구성 및 동작〉<3.1 Overall Configuration and Operation>

다음에, 본 발명의 실시예 3의 IC 카드에 대하여 설명한다. 이 IC 카드는, 메모리(18)내의 링 버퍼로서 사용하는 버퍼 영역의 각 페이지의 상태 비트는 3비트로 이루어지고, 기입 포인터 및 판독 포인터의 설정을 위해 최신 기입 페이지를 검출할 때에 다수결 처리를 하는 점이 상기 실시예 2와 상위하며, 그 외의 점에 대해서는, 상기 실시예 2와 마찬가지이다. 그래서, 이하에서는, 본 실시예에 있어서의 기입 포인터 및 판독 포인터의 설정을 위한 제어 회로(16)의 동작에 대해서만, 도 11의 플로우차트를 참조하면서 설명한다.Next, the IC card of Embodiment 3 of the present invention will be described. In the IC card, the status bit of each page of the buffer area to be used as the ring buffer in the memory 18 is 3 bits, and a majority voting process is performed when detecting the latest write page for setting the write pointer and read pointer. It differs from the said Example 2 and is the same as that of the said Example 2 about another point. Therefore, hereinafter, the operation of the control circuit 16 for setting the write pointer and read pointer in the present embodiment will be described with reference to the flowchart of FIG.

〈3.2 주요부의 상세한 동작〉<3.2 Detailed operation of main parts>

도 11의 플로우차트는, 실시예 2에 있어서의 도 8의 플로우차트에 대응하는 것이다. 두 플로우차트를 비교하면 알 수 있는 바와 같이, 연속하는 2개의 페이지의 상태 비트를 나타내는 STAa와 STAb를 설정할 때, 본 실시예에서는, 다수결 처리후의 값(3비트값)을 설정하고(단계 S50, S54), 그 다수결 처리후의 3비트의 상태 비트 STAa와 STAb를 비교함으로써 최신 기입 페이지를 검출하고 있다(단계 S56).The flowchart of FIG. 11 corresponds to the flowchart of FIG. 8 in Example 2. As shown in FIG. As can be seen by comparing the two flowcharts, in setting the STAa and the STAb indicating the status bits of two consecutive pages, in this embodiment, the value after the majority vote process (3 bit value) is set (step S50, S54), the latest write page is detected by comparing the 3-bit status bits STAa and STAb after the majority vote processing (step S56).

본 실시예에 있어서, 링 버퍼로서 사용하는 버퍼 영역의 각 페이지의 상태 비트는 「000」이나 「11l」중 어느 하나의 값이며, 페이지에 기입을 할 때마다 그 페이지의 상태 비트의 값은 이 2개의 사이에서 교대로 전환된다. 그런데, 메모리(18)로의 기입 오류 등에 의해 이들 두 가지 이외의 값이 상태 비트로서 기입되는 경우가 있으며, 예컨대 도 9의 (a)에 도시하는 바와 같이 되는 경우가 있다. 본 실시예에 의하면, 이러한 경우에도, 다수결 처리후의 상태 비트를 이용하여 최신 기입 페이지가 검출된다. 즉 「101」은 「111」로서, 「001」은 「000」으로서 최신 기입 페이지가 검출되고, 그 결과에 따라 기입 포인터 Wptr 및 판독 포인터 Rptr이 설정된다(도 9의 (b) 참조). 따라서, 어느 정도의 메모리 기입 오류 등이 발생하더라도 기입 포인터 Wptr 및 판독 포인터 Rptr이 정확하게 설정되어, 링 버퍼에 대한 기입이나 판독 동작의 신뢰성이 향상된다.In this embodiment, the status bit of each page of the buffer area to be used as the ring buffer is either "000" or "11l", and each time a page is written, the value of the status bit of the page is It is alternated between the two. By the way, there are cases where values other than these two are written as status bits due to an error in writing to the memory 18, for example, as shown in Fig. 9A. According to this embodiment, even in this case, the latest write page is detected using the status bit after the majority vote process. That is, "101" is "111", "001" is "000", and the latest write page is detected, and the write pointer Wptr and the read pointer Rptr are set according to the result (see Fig. 9B). Therefore, even if some memory write error or the like occurs, the write pointer Wptr and the read pointer Rptr are set correctly, thereby improving the reliability of the write or read operation to the ring buffer.

(실시예 4)(Example 4)

〈4.1 전체의 구성 및 동작〉<4.1 Overall Configuration and Operation>

다음에, 본 발명의 실시예 4의 IC 카드에 대하여 설명한다. 이 IC 카드는, 메모리(18)내의 링 버퍼로서 사용하는 버퍼 영역의 각 페이지에 있어서의 상태 영역 a1이 1바이트로 구성되고, 도 10에 도시하는 바와 같이 그 중 3비트의 영역에는 상기 실시예 3과 마찬가지로 상태 비트가 저장되지만, 나머지 5비트의 영역에는 기입 확인 데이터가 저장된다. 즉, 링 버퍼로 기입을 할 때마다, 그 기입 대상의 페이지에 미리 정해진 5비트 데이터(예컨대 「10101」라고 하는 고정 비트 패턴)를 기입 확인 데이터로서 기입하여 놓고, 그 후 링 버퍼에 있어서의 최신 기입 페이지의 검출에 근거한 기입 포인터나 판독 포인터의 설정시나, 링 버퍼로부터의 데이터의 판독시 등에, 링 버퍼의 각 페이지나 판독 대상 페이지의 기입 확인 데이터를 판독하고, 판독한 기입 확인 데이터에 근거하여 그 페이지에 기입되어 있는 데이터 (이력 정보)가 정확한지 여부를 판단한다.Next, the IC card of Embodiment 4 of the present invention will be described. In the IC card, the state area a1 in each page of the buffer area to be used as the ring buffer in the memory 18 is composed of 1 byte, and as shown in FIG. As in 3, the status bit is stored, but write confirmation data is stored in the remaining 5 bits. That is, each time a write is made to the ring buffer, predetermined 5-bit data (for example, a fixed bit pattern called "10101") is written into the page to be written as the write confirmation data, and then the latest in the ring buffer is written. At the time of setting a write pointer or read pointer based on detection of a write page, or reading data from the ring buffer, the write confirmation data of each page of the ring buffer or the page to be read is read and based on the read write confirmation data. It is determined whether the data (history information) written on the page is correct.

본 실시예의 IC 카드의 하드웨어 구성이나 각 커맨드의 실행 처리 등은, 기본적으로는 상기 실시예 3과 마찬가지이다(도 1, 도 9, 도 11 참조). 그러나, 본 실시예에서는, 기입 확인 데이터의 도입에 의한 상기 특징으로부터, 링 버퍼의 기입 포인터 및 판독 포인터의 설정을 위한 제어 회로(16)의 동작 등이 약간 상위하다. 이하, 이 상위점을 중심으로 본 실시예의 IC 카드의 동작을 설명한다.The hardware configuration of the IC card of the present embodiment, the execution processing of each command, and the like are basically the same as those of the third embodiment (see Figs. 1, 9 and 11). However, in the present embodiment, the operation of the control circuit 16 for setting the write pointer and the read pointer of the ring buffer differs slightly from the above characteristics by the introduction of the write confirmation data. The operation of the IC card of the present embodiment will be described below centering on this difference.

〈4.2 주요부의 상세 동작〉<4.2 Detailed operation of main part>

〈4.2.1 포인터의 설정〉<4.2.1 Pointer setting>

본 실시예에 있어서의 링 버퍼의 기입 포인터 및 판독 포인터의 설정을 위한 처리에서는, 상기 실시예 3과 마찬가지로, 3비트의 상태 비트를 이용하여 다수결 처리를 이용하면서 최신 기입 페이지를 검출한다(도 11의 단계 S50∼S62 참조). 그러나, 검출된 최신 기입 페이지에 근거하여 판독 포인터 Rptr 및 기입 포인터 Wptr을 설정하기 위한 처리 내용이 상위하다. 즉, 도 11에 있어서의 단계 S64 대신에 도 12의 (a)에 나타내는 처리(이하 「포인터 설정 처리 A」라고 함)가 행해지고, 도 11에 있어서의 단계 S66 대신에 도 12의 (b)에 나타내는 처리(이하 「포인터 설정 처리 B」라고 함)가 행해진다.In the processing for setting the write pointer and the read pointer of the ring buffer in the present embodiment, similarly to the third embodiment, the latest write page is detected while using the majority vote process using the 3-bit status bits (Fig. 11). See steps S50 to S62). However, the processing contents for setting the read pointer Rptr and the write pointer Wptr are different based on the detected latest write page. That is, the process shown in FIG. 12A (hereinafter referred to as "pointer setting process A") is performed instead of step S64 in FIG. 11, and in FIG. 12B instead of step S66 in FIG. The processing (hereinafter referred to as "pointer setting processing B") is performed.

도 12의 (a)의 포인터 설정 처리 A는, 링 버퍼에 있어서 연속하는 2개의 페이지인 페이지 k-1과 k에서 상태 비트의 값(다수결 처리후의 값)이 상위하는 경우의 처리이다. 이 경우, 페이지 k-1에 있어서의 상태 영역 a1로부터 기입 확인 데이터를 판독하고(단계 S150), 판독한 기입 확인 데이터가 미리 정해진 값과 동일한지 여부를 판정한다(단계 S152). 그 결과, 미리 정해진 값과 같으면, 그 페이지 k-1에는 정확하게 데이터가 기입되어 있는 것으로 하고, 페이지 k-l이 최신 기입 페이지인 것으로 하여, 판독 포인터 Rptr을 k-1로 설정하고, 기입 포인터 Wptr을 k로 설정한다(단계 S160).The pointer setting processing A in Fig. 12A is processing when the value of the status bit (the value after the majority processing) differs between pages k-1 and k which are two consecutive pages in the ring buffer. In this case, the write confirmation data is read from the state area a1 in page k-1 (step S150), and it is determined whether the read write confirmation data is equal to a predetermined value (step S152). As a result, if it is equal to a predetermined value, the data is correctly written to the page k-1, the page kl is the latest write page, the read pointer Rptr is set to k-1, and the write pointer Wptr is k. (Step S160).

단계 S152에 있어서, 페이지 k-1로부터 판독한 기입 확인 데이터가 미리 정해진 값과 같지 않다고 판정된 경우는, 그 페이지 k-1에 데이터가 정확하게 기입되어 있지 않은 것으로 판단한다. 이 경우, 페이지 k-1의 하나 앞의 페이지가 최신 기입 페이지인 것으로 하여 포인터의 설정을 한다. 즉 이 경우, 단계 S154로 진행하여 페이지 번호 k가 2인지 여부를 판정하여(단계 S154), k가 2가 아니면, 페이지 k-2가 최신 기입 페이지인 것으로 하여, 판독 포인터 Rptr을 k-2로 설정하고, 기입 포인터 Wptr을 k-1로 설정한다(단계 S162). k가 2이면, 버퍼 영역의 최종 페이지 N을 최신 기입 페이지인 것으로 하여, 판독 포인터 Rptr을 최종 페이지 N으로 설정하고, 기입 포인터 Wptr을 1로 설정한다(단계 S156).If it is determined in step S152 that the write confirmation data read from the page k-1 is not equal to the predetermined value, it is determined that the data is not correctly written in the page k-1. In this case, the pointer is set by assuming that the page preceding the page k-1 is the latest write page. That is, in this case, the flow advances to step S154 to determine whether the page number k is 2 (step S154). If k is not 2, the page k-2 is the latest write page, and the read pointer Rptr is k-2. The write pointer Wptr is set to k-1 (step S162). If k is 2, the last page N of the buffer area is assumed to be the latest write page, the read pointer Rptr is set to the last page N, and the write pointer Wptr is set to 1 (step S156).

도 12의 (b)의 포인터 설정 처리 B는, 링 버퍼에 있어서의 각 페이지의 상태 비트의 값(다수결 처리후의 값)이 모두 동일한 경우의 처리이다. 이 경우, 페이지 k 즉 최종 페이지 N에서의 상태 영역 a1로부터 기입 확인 데이터를 판독하고(단계 S170), 판독한 기입 확인 데이터가 미리 정해진 값과 동일한지 여부를 판정한다(단계 S172). 그 결과, 미리 정해진 값과 같으면, 그 페이지 k에는 정확하게 데이터가 기입되어 있는 것으로 한다. 이 경우, 링 버퍼의 모든 페이지의 상태 비트가 동일한 값이고, 그 페이지 k가 최신 기입 페이지인 것으로 하여, 판독 포인터 Rptr을 k(최종 페이지 N)로 설정하고, 기입 포인터 Wptr을 1로 설정한다(단계 S176).The pointer setting processing B in FIG. 12B is a process in which the values (values after the majority processing) of the status bits of each page in the ring buffer are all the same. In this case, the write confirmation data is read from the state k of the page k, that is, the last page N (step S170), and it is determined whether the read write confirmation data is equal to a predetermined value (step S172). As a result, if it is equal to a predetermined value, it is assumed that data is correctly written to the page k. In this case, assuming that the status bits of all pages of the ring buffer are the same value, and that page k is the latest write page, the read pointer Rptr is set to k (final page N) and the write pointer Wptr is set to 1 ( Step S176).

단계 S172에 있어서, 페이지 k에서 판독한 기입 확인 데이터가 미리 정해진 값과 동일하지 않은 것으로 판정된 경우는, 그 페이지 k(최종 페이지 N)에 데이터가 정확하게 기입되어 있지 않은 것으로 판단한다. 이 경우는, 페이지 k의 하나 앞의 페이지 k-1이 최신 기입 페이지인 것으로 하여, 판독 포인터 Rptr을 k-1로 설정하고, 기입 포인터 Wptr을 k로 설정한다(단계 S174).In step S172, when it is determined that the write confirmation data read in page k is not equal to the predetermined value, it is determined that the data is not correctly written in the page k (final page N). In this case, it is assumed that the previous page k-1 of the page k is the latest write page, the read pointer Rptr is set to k-1, and the write pointer Wptr is set to k (step S174).

〈4.2.2 기입 커맨드 실행 처리〉<4.2.2 Write command execution processing>

도 13은, 본 실시예에 있어서, 링 버퍼에 이력 정보를 기입하기 위한 기입 커맨드의 실행 처리(도 3의 단계 S18)의 순서를 나타내는 플로우차트이다. 이 경우, 상기의 포인터 설정 처리(도 12 등 참조)에 의해 얻어지는 판독 포인터 Rptr 및 기입 포인터 Wptr을 미리 제어 회로(16)가 유지하고 있으며, 기입 커맨드에서는 기입 대상의 페이지는 지정되지 않고, 이력 정보가 기입 데이터로서 기입 커맨드와 함께 판독 기입기(200)로부터 전송되어 온다. 제어 회로(16)는, 기입 커맨드를 인식하면, 제어 회로(16)내에 유지된 판독 포인터 Rptr 및 기입 포인터 Wptr를 이용하여, 메모리(18)에 대한 판독 및 기입을 하기 위한 어드레스를 생성한다(단계 S220). 다음에, 생성된 어드레스를 이용하여, 판독 포인터 Rptr이 가리키는 페이지의 상태 비트를 판독한 후(단계 S222), 기입 커맨드와 함께 판독 기입기(200)로부터 전송된 이력 정보를 메모리(18)에 있어서의 링 버퍼에 기입한다(단계 S224). 이 때, EEPROM인 메모리(18)에 대하여, 그 이력 정보를 포함하는 1페이지분의 데이터가 기입되고, 그 페이지의 상태 영역 a1에는, 상태 비트로서 단계 S222에서 판독한 상태 비트의 값이 기입된다. 단, 모든 페이지의 상태 비트가 같은 경우(도 7의 (b)에 도시하는 바와 같이 판독 포인터 Rptr이 버퍼 영역의 최후의 페이지를 가리키고 있는 경우)에는, 단계 S222에서 판독한 상태 비트의 반전값이 기입된다. 이러한 기입에 의해, 기입 포인터 Wptr이 가리키는 페이지의 상태 비트의 값이 반전된다. 또한, 기입 포인터 Wptr이 가리키는 페이지의 상태 영역 a1에는, 기입 확인 데이터로서 미리 정해진 데이터(예컨대 「10101」이라고 하는 고정 비트 패턴)가 기입된다. 이상으로부터, 기입 포인터 Wptr이 가리키는 페이지의 상태 비트가 갱신된 것으로 됨과 동시에, 후에 이 페이지의 금번의 기입이 정확하게 이루어졌는지 여부의 체크가 가능해진다. 기입 포인터 Wptr이 가리키는 페이지로의 기입이 종료되면, 이 기입 커맨드에 대한 응답을 판독 기입기(200)를 향하여 송신한다(단계 S226). 이에 따라, 기입 커맨드의 실행이 종료된다.FIG. 13 is a flowchart showing the procedure of executing a write command (step S18 in FIG. 3) for writing history information into the ring buffer in this embodiment. In this case, the control circuit 16 holds in advance the read pointer Rptr and the write pointer Wptr obtained by the above pointer setting process (see FIG. 12, etc.), and the write target page is not specified, and the history information is not specified. Is sent from the read / write unit 200 together with the write command as write data. When the control circuit 16 recognizes the write command, the control circuit 16 uses the read pointer Rptr and the write pointer Wptr held in the control circuit 16 to generate an address for reading and writing to the memory 18 (step) S220). Next, using the generated address, after reading the status bits of the page indicated by the read pointer Rptr (step S222), the history information transferred from the read / write unit 200 with the write command is stored in the memory 18. Is written to the ring buffer (step S224). At this time, one page of data including the history information is written into the memory 18, which is an EEPROM, and the value of the status bit read in step S222 is written as the status bit in the status area a1 of the page. . However, when the status bits of all pages are the same (as shown in Fig. 7B) when the read pointer Rptr points to the last page of the buffer area, the inverted value of the status bits read in step S222 is Is written. This write reverses the value of the status bit of the page indicated by the write pointer Wptr. Furthermore, predetermined data (for example, a fixed bit pattern called "10101") is written as the write confirmation data in the state area a1 of the page indicated by the write pointer Wptr. As described above, the status bit of the page indicated by the write pointer Wptr is updated, and at the same time, it is possible to check whether or not this page has been correctly written. When writing to the page indicated by the write pointer Wptr is completed, a response to this write command is sent toward the read write unit 200 (step S226). As a result, execution of the write command is terminated.

〈4.2.3 판독 커맨드 실행 처리〉<4.2.3 Read command execution processing>

도 14는, 링 버퍼로부터 이력 정보를 판독하기 위한 판독 커맨드의 실행 처리(도 3의 단계 S20)의 순서를 나타내는 플로우차트이다. 이 경우, 상기의 포인터 설정 처리(도 12 등 참조)에 의해 얻어지는 판독 포인터 Rptr을 미리 제어 회로(16)가 유지하고 있어서, 판독 커맨드에서는 판독 대상의 페이지는 지정되지 않는다. 제어 회로(16)는, 판독 커맨드를 인식하면, 제어 회로(16)내에 유지된 판독 포인터 Rptr을 이용하여, 메모리(18)로부터 데이터를 판독하기 위한 어드레스를 생성한다(단계 S230). 다음에, 이 어드레스를 이용하여, 메모리(18)에 있어서의 링 버퍼로부터 이력 정보를 판독한다(단계 S232). 그리고, 판독한 이력 정보를 판독 기입기(200)를 향하여 송신한다(단계 S234). 이에 따라, 판독 커맨드의 실행이 종료된다.FIG. 14 is a flowchart showing the procedure of executing a read command (step S20 of FIG. 3) for reading history information from the ring buffer. In this case, the control circuit 16 holds in advance the read pointer Rptr obtained by the pointer setting process (see FIG. 12, etc.), and the page to be read is not designated in the read command. When the control circuit 16 recognizes the read command, the control circuit 16 generates an address for reading data from the memory 18 using the read pointer Rptr held in the control circuit 16 (step S230). Next, using this address, history information is read from the ring buffer in the memory 18 (step S232). Then, the read history information is transmitted toward the reader / writer 200 (step S234). As a result, execution of the read command is terminated.

〈4.3 효과〉〈4.3 Effect〉

본 실시예에 의하면, IC 카드(100)의 링 버퍼로 이력 정보를 기입할 때마다 기입 확인 데이터도 기입된다(도 13의 단계 S224 참조). 그 후에 링 버퍼에 대한 판독 또는 기입을 하기 위해서 IC 카드가 동작 영역에 들어와 기입 포인터 Wptr 및 판독 포인터 Rptr을 설정할 때에, 최신 기입 페이지로서 검출된 페이지의 기입 확인 데이터가 체크된다. 이 체크에 의해, 그 페이지로의 기입이 정확하게 실행되었는지 여부가 조사되고(도 12의 단계 S152, S172 참조), 정확하게 기입이 행해지지 않은 경우에는, 그 페이지의 하나 앞의 페이지가 최신 기입 페이지인 것으로 하여, 링 버퍼의 기입 포인터 Wptr 및 판독 포인터 Rptr이 설정된다(도 12의 단계 S156, S162, S174, S176). 따라서, 예컨대, 데이터의 기입 도중에 IC 카드가 동작 영역으로부터 벗어나게 된 경우, 그 데이터의 기입이 정확하게 실행되지 않게 되지만, 상기의 기입 확인 데이터를 이용한 포인터 설정 처리(도 12)에 있어서, 이러한 IC 카드로의 기입 불량의 페이지가 인식되어, 그 기입 불량의 데이터를 제거한 형태로 링 버퍼의 기입 포인터 Wptr 및 판독 포인터 Rptr이 설정된다. 그 결과, 그 후의 링 버퍼로의 액세스는 정확하게 실행되게 된다.According to this embodiment, write confirmation data is also written every time history information is written into the ring buffer of the IC card 100 (see step S224 in FIG. 13). Then, when the IC card enters the operation area to set the write pointer Wptr and the read pointer Rptr to read or write the ring buffer, the write confirmation data of the page detected as the latest write page is checked. By this check, it is checked whether or not writing to the page has been executed correctly (see steps S152 and S172 in FIG. 12), and if writing is not done correctly, the page preceding the page is the latest writing page. By doing so, the write pointer Wptr and the read pointer Rptr of the ring buffer are set (steps S156, S162, S174, S176 in Fig. 12). Thus, for example, when the IC card is moved out of the operation area in the middle of writing data, writing of the data will not be executed correctly, but in such a pointer setting process (Fig. 12) using the write confirmation data described above, The write failure page is recognized, and the write pointer Wptr and the read pointer Rptr of the ring buffer are set in such a manner that the data of the write failure is removed. As a result, subsequent accesses to the ring buffer are performed correctly.

또, 상기 실시예에서는, 판독 커맨드의 실행 처리(도 14)의 앞에 반드시 링 버퍼의 포인터 설정 처리(도 12)가 실행되는 경우를 상정하고 있기 때문에, 링 버퍼로부터의 판독에 있어서 기입 확인 데이터의 체크를 할 필요는 없다. 그러나, 상기 이외의 경우를 고려하여, 판독 커맨드의 실행 처리에 있어서도, 기입 확인 데이터의 체크에 의해, 판독 대상인 페이지의 이력 정보 등이 정확하게 기입되어 있는지 여부를 판정하도록 하여도 좋다.In the above embodiment, it is assumed that the pointer buffer setting processing (Fig. 12) of the ring buffer is executed before the execution processing of the read command (Fig. 14). There is no need to check. However, in consideration of the case other than the above, in the execution process of the read command, it may be determined whether or not the history information and the like of the page to be read are correctly written by checking the write confirmation data.

〈4.4 변형예〉<4.4 modification>

상기한 실시예 4에서는, 미리 결정된 고정 비트 패턴을 기입 확인 데이터로서 사용하는 것으로 하여, 기입 확인 데이터는 그것이 저장되는 페이지의 상태 정보이외의 데이터와는 무관하지만, 그 페이지의 상태 정보이외의 다른 데이터(이력 정보 등)와 관련이 있는 것, 예컨대 오류 검출 코드 등을 기입 확인 데이터로 하여도 좋다.In Embodiment 4 described above, the predetermined fixed bit pattern is used as the write confirmation data, so that the write confirmation data is independent of data other than the status information of the page in which it is stored, but other data than the status information of the page. What is related to (history information, etc.), such as an error detection code, may be used as write confirmation data.

또한 상기한 실시예 4에서는, 각 페이지에 있어서의 1바이트의 상태 영역 a1 중 3비트의 상태 비트를 제외한 5비트를 기입 확인 데이터를 위한 영역으로 하고 있지만(도 10 참조), 상태 영역 a1을 1바이트 또는 그 이상 확장하여(메모리(18)에 대한 액세스 형편상, 확장 바이트수는 정수 바이트로 하는 것이 바람직함), 확장한 영역도 기입 확인 데이터의 저장 영역으로 하여도 좋다. 이렇게 기입 확인 데이터의 비트수를 늘리면, 전술한 기입 불량을 보다 정확하게 검출하여, 그 검출 결과에 근거해 기입 불량에 대한 대처가 가능하게 되므로, IC 카드에 있어서의 링 버퍼에 대한 기입 또는 판독 동작의 신뢰성을 더욱 향상시킬 수 있다.In the fourth embodiment described above, five bits excluding the three bit status bits of the one-byte status area a1 in each page are used as the write confirmation data area (see FIG. 10). By extending the byte or more (it is preferable that the number of extended bytes be an integer byte for the convenience of access to the memory 18), the extended area may also be a storage area for write confirmation data. Increasing the number of bits of the write confirmation data in this way makes it possible to more accurately detect the above-described write failure and to cope with the write failure based on the detection result. Therefore, the write or read operation of the ring buffer in the IC card can be performed. The reliability can be further improved.

본 발명에 관한 제 1 IC 카드에 의하면, 링 버퍼로서 사용되는 기억 영역을 구성하는 각 페이지에는 그 페이지의 데이터 영역으로의 기입을 나타내는 상태 정보가 저장되어 있어, 외부의 데이터 판독/기입 장치로부터 소정의 커맨드가 발행되면, 상기 기억 영역의 각 페이지의 상태 정보가 판독되어, 데이터 판독/기입 장치에 전송된다. 따라서, 데이터 판독/기입 장치는, 소정의 커맨드를 1회 발행하는 것만으로, IC 카드에 있어서 실현되어 있는 링 버퍼의 모든 페이지의 상태 정보를 얻어, 이것에 근거하여 최신 기입 페이지를 검출하고, 이 최신 기입 페이지로부터 링 버퍼에 대한 기입 포인터 및 판독 포인터를 획득할 수 있다. 따라서, 최신 기입 페이지를 검출하기 위해서 버퍼 영역의 모든 페이지를 판독했던 종래예나, 최신 기입 페이지를 나타내는 포인터를 EEPR0M(비휘발성 메모리)에 저장했던 종래예에 비교하여, 링 버퍼에 대한 판독이나 기입이 고속화된다. 또, 최신 기입 페이지를 나타내는 포인터를 EEPROM에 저장했던 종래예에서는, 포인터 영역의 리라이트의 회수가 많아지는 것으로 인한 EEPROM의 열화가 문제로 되지만, 본 IC 카드에 의하면 그와 같은 문제도 해소된다.According to the first IC card according to the present invention, each page constituting a storage area to be used as a ring buffer stores state information indicating writing of the page to a data area, and is determined from an external data reading / writing device. Is issued, the status information of each page of the storage area is read and transmitted to the data reading / writing apparatus. Therefore, the data reading / writing apparatus only issues a predetermined command once, obtains the state information of all pages of the ring buffer realized in the IC card, detects the latest writing page based on this, A write pointer and a read pointer for the ring buffer can be obtained from the latest write page. Therefore, compared with the conventional example in which all pages of the buffer area have been read in order to detect the latest write page, or the conventional example in which a pointer indicating the latest write page is stored in EEPR0M (nonvolatile memory), the reading or writing to the ring buffer is performed. It is faster. In the conventional example in which the pointer indicating the latest write page is stored in the EEPROM, the deterioration of the EEPROM due to the increase in the number of rewrites of the pointer area becomes a problem. However, such an IC card also eliminates such a problem.

본 발명에 관한 제 2 IC 카드에 의하면, 링 버퍼로서 사용되는 기억 영역을 구성하는 각 페이지의 상태 영역에 저장되는 상태 정보는 미리 동일한 값으로 초기화되어 있어서, 링 버퍼에 대하여 기입이 행해지면, 그 기입 대상 페이지의 상태 정보를 구성하는 비트의 값이 반전된다. 그리고, 이러한 각 페이지의 상태 정보를 순차적으로 판독하여, 연속하는 2 개의 페이지의 상태 정보를 비교함으로써, 링 버퍼에 있어서의 최신 기입 페이지가 검출되고, 그 최신 기입 페이지에 근거하여 링 버퍼에 대한 판독이나 기입이 행해진다. 따라서, 본 IC 카드에 의하면, IC 카드내에서 링 버퍼에 대한 기입 포인터 및 판독 포인터를 단시간내에 획득할 수 있어, 상기 제 1 IC 카드와 마찬가지로, 최신 기입 페이지를 검출하기 위하여 버퍼 영역의 모든 페이지를 판독했던 종래예나, 최신 기입 페이지를 나타내는 포인터를 EEPROM에 저장했던 종래예에 비교하여, 링 버퍼에 대한 판독이나 기입이 고속화된다.According to the second IC card according to the present invention, the state information stored in the state area of each page constituting the storage area to be used as the ring buffer is initialized to the same value in advance, and when writing is made to the ring buffer, The values of the bits constituting the state information of the write target page are reversed. By reading the status information of each of these pages sequentially and comparing the status information of two consecutive pages, the latest write page in the ring buffer is detected, and the read to the ring buffer is read based on the latest write page. Or writing is performed. Therefore, according to this IC card, it is possible to obtain a write pointer and a read pointer for a ring buffer in a short time in the IC card, and similarly to the first IC card, all pages of the buffer area are detected in order to detect the latest write page. Compared to the conventional example which was read and the conventional example which stored the pointer which shows the latest write page in EEPROM, reading and writing to a ring buffer are speeded up.

본 발명에 관한 제 3 IC 카드에 의하면, 상기 제 2 IC 카드와 마찬가지의 동작이 행해지지만, 링 버퍼의 각 페이지의 상태 정보가 1비트로 구성되기 때문에, IC 카드내의 메모리가 효율적으로 이용되어 메모리 용량이 저감된다. 또한, 그 상태 정보로부터 링 버퍼에 있어서의 최신 기입 페이지를 검출하기 위한 하드웨어량도 저감된다.According to the third IC card according to the present invention, the same operation as that of the second IC card is performed, but since the state information of each page of the ring buffer is composed of 1 bit, the memory in the IC card is efficiently used, and the memory capacity This is reduced. The amount of hardware for detecting the latest write page in the ring buffer is also reduced from the state information.

본 발명에 관한 제 4 IC 카드에 의하면, 상기 제 2 IC 카드의 구성에 있어서, 상태 정보가 기수개의 비트로 이루어지고, 그 기수개의 비트가 모두 동일값이 되도록 초기화되며, 통상, 링 버퍼로의 기입에 따르는 상태 정보의 갱신후에 있어서도 그 상태 정보를 구성하는 비트는 모두 동일값으로 되지만, 링 버퍼의 최신 기입 페이지를 검출할 때는, 각 페이지로부터 판독된 상태 정보에 대한 다수결 연산 후의 값이 사용된다. 따라서, 메모리로의 기입 오류 등에 의해 각 상태 정보를 구성하는 비트가 모두 동일하지 않더라도, 각 상태 정보의 비트수의 과반수가 동일한 값이면, 최신 기입 페이지가 정확하게 검출된다. 이에 따라, 링 버퍼에 대한 판독 및 기입의 신뢰성이 향상된다.According to the fourth IC card according to the present invention, in the configuration of the second IC card, the status information is composed of odd bits, and the odd bits are initialized so that all of the odd bits have the same value, and is usually written in a ring buffer. Even after updating of the state information, the bits constituting the state information become the same value. However, when detecting the latest write page of the ring buffer, the value after the majority vote operation on the state information read from each page is used. Therefore, even if the bits constituting each state information are not the same due to a write error in the memory or the like, if the majority of the number of bits of each state information is the same value, the latest write page is correctly detected. This improves the reliability of reading and writing to the ring buffer.

본 발명에 관한 제 5 IC 카드에 의하면, 그 IC 카드에 전원 공급이 시작된 후, 데이터 판독/기입 장치로부터 커맨드를 수취하기 전에, 링 버퍼에 대한 판독 위치를 나타내는 페이지값(판독 포인터) 및 기입 위치를 나타내는 페이지값(기입 포인터)을 얻을 수 있다. 따라서, 비접촉형 IC 카드와 같이 아날로그 회로를 갖는 IC 카드의 경우에는, 전원 공급 개시 후 그 아날로그 회로의 동작이 안정될 때까지의 대기 시간을 이용하여, 디지털 회로에 의해 판독 포인터 및 기입 포인터가 설정되게 된다. 이에 따라 시간이 효율적으로 이용되며, 결과적으로, IC 카드의 링 버퍼에 대한 판독이나 기입이 실질적으로 고속화되게 된다.According to the fifth IC card according to the present invention, a page value (read pointer) indicating a read position to the ring buffer and a write position after receiving power from the IC card and before receiving a command from the data read / write apparatus You can get a page value (write pointer) indicating. Therefore, in the case of an IC card having an analog circuit such as a non-contact type IC card, the read pointer and the write pointer are set by the digital circuit using the waiting time from the start of power supply until the operation of the analog circuit is stabilized. Will be. As a result, time is efficiently used, and as a result, reading or writing to the ring buffer of the IC card becomes substantially faster.

본 발명에 관한 제 6 IC 카드에 의하면, 상기 제 2 내지 제 4 IC 카드 중 어느 한 IC 카드에 있어서, 전원 공급이 시작된 후, 데이터 판독/기입 장치로부터 커맨드를 수취하기 전에, 링 버퍼에 있어서의 최신 기입 페이지가 검출되고, 그 후에, 이 최신 기입 페이지에 근거하여 링 버퍼에 대한 판독 또는 기입이 행하여진다. 따라서, 상기 제 5 IC 카드와 마찬가지로, 비접촉형 IC 카드와 같이 아날로그 회로를 갖는 IC 카드의 경우에는, 전원 공급 개시 후 그 아날로그 회로의 동작이 안정될 때까지의 대기 시간을 이용하여 디지털 회로에 의해 최신 기입 페이지가 검출되며, 이에 따라, IC 카드의 링 버퍼에 대한 판독이나 기입이 실질적으로 고속화된다.According to the sixth IC card according to the present invention, in any one of the second to fourth IC cards, after the power supply is started, before receiving a command from the data read / write device, the ring buffer is used. The latest write page is detected, and then reading or writing to the ring buffer is performed based on this latest write page. Therefore, similar to the fifth IC card, in the case of an IC card having an analog circuit such as a non-contact type IC card, the digital circuit uses the waiting time from the start of power supply until the operation of the analog circuit is stabilized. The latest write page is detected, thereby substantially speeding up reading or writing to the ring buffer of the IC card.

본 발명에 관한 제 7 IC 카드에 의하면, 링 버퍼의 각 페이지의 상태 영역내에 상태 정보외의 기입 확인 데이터를 저장하기 위한 영역이 마련되어, 링 버퍼로의 기입시에 여기에 저장되는 기입 확인 데이터에 의해, 링 버퍼로의 기입이 정확하게 실행되었는지 여부를 판정할 수 있다. 이 판정 결과에 근거하여 기입 불량에 대처할 수 있기 때문에, 링 버퍼에 대한 판독이나 기입의 신뢰성을 향상시킬 수 있다.According to the seventh IC card according to the present invention, an area for storing write confirmation data other than status information is provided in the status area of each page of the ring buffer, and the write confirmation data stored therein at the time of writing to the ring buffer is provided. It is possible to determine whether or not writing to the ring buffer has been correctly performed. Since writing failure can be coped with based on the determination result, the reliability of reading and writing to the ring buffer can be improved.

본 발명에 관한 제 8 IC 카드에 의하면, 상기 제 7 IC 카드와 마찬가지의 기입 확인 데이터가 도입되어 있고, 링 버퍼의 각 페이지의 상태 정보를 순차적으로 판독함으로써 최신 기입 페이지가 검출되었을 때, 그 최신 기입 페이지의 데이터가 정확하게 기입되어 있지 않은 경우는, 그 최신 기입 페이지의 기입 확인 데이터에 근거하여, 그 최신 기입 페이지의 바로 전 페이지를 다시 최신 기입 페이지로 한다. 이에 따라, 기입 불량 페이지를 제거한 형태로, 그 후의 링 버퍼에 대한 액세스를 정확하게 실행할 수 있다.According to the eighth IC card of the present invention, write confirmation data similar to the seventh IC card is introduced, and when the latest write page is detected by sequentially reading the status information of each page of the ring buffer, the latest When the data of the writing page is not correctly written, the page immediately before the latest writing page is made into the latest writing page again based on the writing confirmation data of the latest writing page. As a result, subsequent access to the ring buffer can be executed accurately in the form of eliminating the write bad page.

Claims (8)

데이터 판독/기입 장치로부터 커맨드를 수취하고, 수취한 커맨드에 근거하여 상기 데이터 판독/기입 장치의 사이에서 데이터 수수를 행하는 IC 카드에 있어서,An IC card that receives a command from a data read / write device and receives data between the data read / write devices based on the received command. 상기 데이터 판독/기입 장치로부터 커맨드를 포함하는 데이터를 수취하는 수신 수단과,Receiving means for receiving data including a command from the data reading / writing apparatus; 상기 데이터 판독/기입 장치로 데이터를 송출하는 송신 수단과,Transmitting means for sending data to the data reading / writing device; 상기 데이터 판독/기입 장치로부터 수취한 데이터를 저장하기 위한 데이터 영역과 이 데이터 영역으로의 기입을 나타내는 상태 정보를 저장하기 위한 상태 영역을 포함하는 페이지를 여러 장 모아서 구성되는 기억 영역으로서, 링 버퍼로서 사용되는 기억 영역을 갖는 기억 수단과,A storage area comprising a plurality of pages including a data area for storing data received from the data reading / writing device and a status area for storing state information indicating writing to the data area, which is a ring buffer. Storage means having a storage area used; 상기 데이터 판독/기입 장치로부터 수취한 데이터를 상기 데이터 영역에 기입했을 때에, 상기 데이터를 기입한 상기 데이터 영역을 포함하는 페이지의 상태 영역에 상기 기입을 나타내는 상태 정보를 기입하는 기입 제어 수단과,Write control means for writing state information indicating the write in a state area of a page including the data area in which the data is written, when data received from the data reading / writing apparatus is written into the data area; 상기 데이터 판독/기입 장치로부터의 데이터로서 수신 수단에 의해 소정의 커맨드를 수취하면, 상기 기억 영역내의 모든 페이지에 대하여, 상태 영역에 저장된 상태 정보를 순차적으로 판독하고, 판독한 상태 정보를 송신 수단에 의해 데이터 판독/기입 장치로 송출하는 판독 제어 수단When a predetermined command is received by the receiving means as data from the data reading / writing apparatus, the status information stored in the status area is sequentially read for all the pages in the storage area, and the read status information is sent to the transmitting means. Reading control means for sending to the data reading / writing device 을 포함하는 것을 특징으로 하는 IC 카드.IC card comprising a. 데이터 판독/기입 장치로부터 커맨드를 수취하고, 수취한 커맨드에 근거하여 상기 데이터 판독/기입 장치의 사이에서 데이터 수수를 행하는 IC 카드에 있어서,An IC card that receives a command from a data read / write device and receives data between the data read / write devices based on the received command. 상기 데이터 판독/기입 장치로부터 커맨드를 포함하는 데이터를 수취하는 수신 수단과,Receiving means for receiving data including a command from the data reading / writing apparatus; 상기 데이터 판독/기입 장치로 데이터를 송출하는 송신 수단과,Transmitting means for sending data to the data reading / writing device; 상기 데이터 판독/기입 장치로부터 수취한 데이터를 저장하기 위한 데이터 영역과 이 데이터 영역으로의 기입을 나타내는 상태 정보를 저장하기 위한 상태 영역을 포함하는 페이지를 여러 장 모아서 구성되는 기억 영역으로서, 링 버퍼로서 사용되는 기억 영역을 갖는 기억 수단과,A storage area comprising a plurality of pages including a data area for storing data received from the data reading / writing device and a status area for storing state information indicating writing to the data area, which is a ring buffer. Storage means having a storage area used; 상기 기억 영역을 구성하는 모든 페이지의 상태 정보를 동일한 값으로 미리 초기화해 두고, 상기 데이터 판독/기입 장치로부터 수취한 데이터를 상기 데이터 영역에 기입했을 때에, 상기 데이터를 기입한 상기 데이터 영역을 포함하는 페이지의 상태 정보를 구성하는 비트의 값을 반전시키는 기입 제어 수단과,And including the data area in which the state information of all the pages constituting the storage area is initialized to the same value in advance, and when the data received from the data reading / writing apparatus is written into the data area. Write control means for inverting the value of bits constituting the page state information; 상기 기억 영역내의 각 페이지의 상태 정보를 순차적으로 판독하고, 판독한 상태 정보의 값이 바로 전에 판독한 상태 정보의 값과 다른 경우, 상기 바로 전에 판독한 상태 정보가 저장되어 있던 페이지를 데이터 영역에 가장 최근에 기입이 행하여진 최신 기입 페이지로 하고, 판독한 상태 정보의 값이 상기 기억 영역내의 모든 페이지에 걸쳐 동일한 경우, 최후에 판독한 상태 정보가 저장되어 있던 페이지를 최신 기입 페이지로 하며, 상기 최신 기입 페이지에 근거하여, 링 버퍼로서 사용되는 상기 기억 영역에 대한 데이터의 판독 및 기입을 제어하는 링 버퍼 제어 수단If the status information of each page in the storage area is read sequentially and the value of the read status information is different from the value of the immediately read status information, the page in which the immediately read status information is stored is stored in the data area. If the most recently written page has been written most recently, and the value of the read status information is the same across all the pages in the storage area, the page where the last read status information has been stored is referred to as the latest write page. Ring buffer control means for controlling reading and writing of data to the storage area used as a ring buffer based on the latest write page 을 포함하는 것을 특징으로 하는 IC 카드.IC card comprising a. 제 2 항에 있어서,The method of claim 2, 상기 상태 정보는 1비트로 이루어진 것을 특징으로 하는 IC 카드.And said status information consists of one bit. 제 2 항에 있어서,The method of claim 2, 상기 상태 정보는 기수개의 비트로 이루어지고,The state information is composed of odd bits, 상기 기입 제어 수단은, 상기 상태 정보를 구성하는 상기 기수개의 비트의 값이 모두 동일하게 되도록 초기화하며,The write control means initializes the values of the odd bits constituting the state information to be the same, 상기 링 버퍼 제어 수단은, 판독한 상태 정보에 대한 다수결 연산에 의해 값이 다른 비트를 포함하지 않는 상태 정보를 생성하여, 판독한 상태 정보 대신에 상기 다수결 연산에 의해서 생성한 상태 정보를 이용함으로써, 최신 기입 페이지를 검출하는The ring buffer control means generates state information that does not include bits having different values by a majority vote operation on the read state information, and uses the state information generated by the majority vote operation instead of the read state information. To detect the latest registry page 것을 특징으로 하는 IC 카드.IC card, characterized in that. 데이터 판독/기입 장치로부터 커맨드를 수취하고, 수취한 커맨드에 근거하여 상기 데이터 판독/기입 장치의 사이에서 데이터 수수를 행하는 IC 카드에 있어서,An IC card that receives a command from a data read / write device and receives data between the data read / write devices based on the received command. 상기 데이터 판독/기입 장치로부터 커맨드를 포함하는 데이터를 수취하는 수신 수단과,Receiving means for receiving data including a command from the data reading / writing apparatus; 상기 데이터 판독/기입 장치로 데이터를 송출하는 송신 수단과,Transmitting means for sending data to the data reading / writing device; 상기 데이터 판독/기입 장치로부터 수취한 데이터를 저장하기 위한 영역을 포함하는 페이지를 여러 장 모아서 구성되는 기억 영역으로서, 링 버퍼로서 사용되는 기억 영역을 갖는 기억 수단과,A storage area comprising a plurality of pages including areas for storing data received from the data reading / writing device, the storage means having a storage area used as a ring buffer, and 상기 기억 영역을 링 버퍼로서 사용하기 위한 판독 위치 또는 기입 위치를 나타내는 페이지의 값을, 상기 IC 카드에 전원 공급이 시작된 후, 상기 데이터 판독/기입 장치로부터 커맨드를 수취하기 전에 검출하는 링 버퍼 제어 수단Ring buffer control means for detecting a value of a page indicating a read position or a write position for using the storage area as a ring buffer before receiving a command from the data read / write device after power supply to the IC card is started; 을 포함하는 것을 특징으로 하는 IC 카드.IC card comprising a. 제 2 항 내지 제 4 항 중 어느 한 항에 있어서,The method according to any one of claims 2 to 4, 상기 링 버퍼 제어 수단은, 상기 IC 카드에 전원 공급이 시작된 후, 상기 데이터 판독/기입 장치로부터 커맨드를 수취하기 전에, 상기 최신 기입 페이지를 검출하는 것을 특징으로 하는 IC 카드.And the ring buffer control means detects the latest write page after power supply to the IC card is started and before receiving a command from the data read / write device. 제 2 항에 있어서,The method of claim 2, 상기 기억 영역내의 각 페이지의 상태 영역의 사이즈가 정수 바이트이고, 상기 상태 영역내에 상태 정보를 저장하는데 사용되는 영역이외의 영역으로서 기입 확인용 데이터 영역을 마련하며,The size of the status area of each page in the storage area is an integer byte, and a write confirmation data area is provided as an area other than the area used for storing state information in the status area, 상기 기입 제어 수단은, 상기 데이터 판독/기입 장치로부터 수취한 데이터를 상기 데이터 영역에 기입했을 때에, 상기 데이터를 기입한 상기 데이터 영역을 포함하는 페이지의 상태 정보를 구성하는 비트의 값을 반전시킴과 동시에, 상기 페이지의 상태 영역내의 기입 확인용 데이터 영역에, 상기 데이터가 상기 데이터 영역에 정확하게 기입되었는지 여부를 확인하기 위한 데이터를 기입하는The write control means inverts the value of a bit constituting the state information of a page including the data area in which the data is written, when writing data received from the data reading / writing apparatus into the data area; At the same time, writing data for confirming whether or not the data is correctly written to the data area is written in the write confirmation data area in the status area of the page. 것을 특징으로 하는 IC 카드.IC card, characterized in that. 제 7 항에 있어서,The method of claim 7, wherein 상기 링 버퍼 제어 수단은,The ring buffer control means, i) 상기 기억 영역내의 각 페이지의 상태 정보의 판독에 의해 최신 기입 페이지가 검출되었을 때, 상기 최신 기입 페이지의 기입 확인용 데이터를 판독하고, 상기 기입 확인용 데이터에 의해 상기 최신 기입 페이지의 데이터 영역에 정확하게 데이터가 기입되어 있었는지 여부를 판정하는 판정 수단과,i) When the latest write page is detected by reading the status information of each page in the storage area, the write confirmation data of the latest write page is read and the data area of the latest write page is read by the write confirmation data. Judging means for judging whether or not the data has been correctly written into the ii) 상기 최신 기입 페이지의 데이터 영역에 정확하게 데이터가 기입되어 있지 않다고 판정된 경우에, 상기 최신 기입 페이지의 바로 전 페이지를 다시 최신 기입 페이지로 하는 최신 기입 페이지 변경 수단ii) when it is determined that data is not correctly written in the data area of the latest writing page, the latest writing page changing means for making the page immediately preceding the latest writing page a new writing page again. 을 포함하는 것을 특징으로 하는 IC 카드.IC card comprising a.
KR1019980007230A 1997-07-24 1998-03-05 Ic card KR100273614B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP97-198305 1997-07-24
JP9198305A JPH1139450A (en) 1997-07-24 1997-07-24 Ic card

Publications (2)

Publication Number Publication Date
KR19990013323A KR19990013323A (en) 1999-02-25
KR100273614B1 true KR100273614B1 (en) 2000-12-15

Family

ID=16388931

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980007230A KR100273614B1 (en) 1997-07-24 1998-03-05 Ic card

Country Status (3)

Country Link
JP (1) JPH1139450A (en)
KR (1) KR100273614B1 (en)
TW (1) TW366473B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4323745B2 (en) 2002-01-15 2009-09-02 三洋電機株式会社 Storage device
JP3971941B2 (en) 2002-03-05 2007-09-05 三洋電機株式会社 Data storage
JP4387087B2 (en) 2002-07-25 2009-12-16 三洋電機株式会社 Data storage device
KR100706246B1 (en) 2005-05-24 2007-04-11 삼성전자주식회사 Memory card capable of improving read performance
JP2009163339A (en) * 2007-12-28 2009-07-23 Toppan Printing Co Ltd Ic medium, ic medium control program, history information reading method
US10130587B2 (en) 2011-01-11 2018-11-20 Capsugel Belgium Nv Hard capsules
JP6523941B2 (en) * 2015-12-18 2019-06-05 株式会社東芝 Water leak detection device
US11319566B2 (en) 2017-04-14 2022-05-03 Capsugel Belgium Nv Process for making pullulan
JP2020516653A (en) 2017-04-14 2020-06-11 カプスゲル・ベルギウム・ナムローゼ・フェンノートシャップCapsugel Belgium NV Pullulan capsule

Also Published As

Publication number Publication date
JPH1139450A (en) 1999-02-12
KR19990013323A (en) 1999-02-25
TW366473B (en) 1999-08-11

Similar Documents

Publication Publication Date Title
US8756384B2 (en) Information processing device and information processing method for data recovery after failure
US6330633B1 (en) Data processing method and apparatus
KR100299341B1 (en) Non-contact type ic card with monitor for source power
US7752406B2 (en) Information processing method and information processing apparatus having data locations accessible by different devices in accordance with different permissions
US9418224B2 (en) Portable electronic device and control method of portable electronic device
EP2216719A1 (en) Mobile electronic apparatus and data management method in mobile electronic apparatus
KR100273614B1 (en) Ic card
US20090177921A1 (en) Portable electronic device and control method thereof
US20120234926A1 (en) Portable electronic apparatus
JP5633125B2 (en) Information processing method, information processing apparatus, and program
US7346730B2 (en) Mobile electronic device
JP7005934B2 (en) Electronic information storage medium, IC card, data transmission method, data writing method, data transmission program and data writing program
KR20030035171A (en) Smart card and method for writing/erasing and operating an os program the same
JPH1027225A (en) Memory management system for non-contact ic card
JP2013191117A (en) Ic chip, atr response processing program, and atr response method
JP3243591B2 (en) Contactless data carrier
JP5038918B2 (en) Portable electronic device and method for controlling portable electronic device
JP2004206575A (en) Portable electronic medium and communication method used for portable electronic medium
JP2018152142A (en) IC card, portable electronic device, and IC card processing device
JP2013191116A (en) Ic chip, atr response processing program, and atr response method
JP2009075816A (en) Portable electronic device, and method of managing data in portable electronic device

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20070823

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee