JP3840510B2 - Micro computer - Google Patents

Micro computer Download PDF

Info

Publication number
JP3840510B2
JP3840510B2 JP2003407344A JP2003407344A JP3840510B2 JP 3840510 B2 JP3840510 B2 JP 3840510B2 JP 2003407344 A JP2003407344 A JP 2003407344A JP 2003407344 A JP2003407344 A JP 2003407344A JP 3840510 B2 JP3840510 B2 JP 3840510B2
Authority
JP
Japan
Prior art keywords
rom
data
program
eep
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2003407344A
Other languages
Japanese (ja)
Other versions
JP2004094981A (en
Inventor
直幹 三ツ石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Technology Corp
Original Assignee
Renesas Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2003407344A priority Critical patent/JP3840510B2/en
Publication of JP2004094981A publication Critical patent/JP2004094981A/en
Application granted granted Critical
Publication of JP3840510B2 publication Critical patent/JP3840510B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Microcomputers (AREA)

Description

この発明は、マイクロ・コンピュータ技術、さらにはEEP−ROM(エレクトリカリ・エレーサブル・アンド・プログラマブル・リード・オンリ・メモリ)のような電気的に書込または消去が可能なROMを内蔵したシングルチップ型マイクロ・コンピュータに適用して有効な技術に関するもので、たとえば、ICカードに内蔵されるマイクロ・コンピュータに利用して有効な技術に関するものである。   The present invention is a single-chip type having a built-in ROM that can be electrically written or erased, such as micro computer technology, and also an EEP-ROM (electrically erasable and programmable read only memory). The present invention relates to a technology that is effective when applied to a microcomputer. For example, the present invention relates to a technology that is effective when used for a microcomputer built in an IC card.

最近、磁気カードなどに代わるものとして、いわゆるICカードが注目されている。このICカードは、たとえば特許文献1(特公昭56−19665号公報)などに記載されているように、ID(識別コード)などのデータを記憶させたP−ROM(紫外線消去型のプログラマブル・ROM)を内蔵することにより、たとえばキーの代わりをなす識別カードとして機能させることができる。   Recently, so-called IC cards have attracted attention as an alternative to magnetic cards. This IC card is, for example, a P-ROM (ultraviolet erasable programmable ROM) in which data such as an ID (identification code) is stored, as described in Patent Document 1 (Japanese Patent Publication No. 56-19665). ) Can be made to function as an identification card instead of a key, for example.

ここで、本発明者は、たとえば上述したごときICカードに内蔵するのに適したEEP−ROM内蔵型のシングルチップ型マイクロ・コンピュータについて検討した。以下は、公知とされた技術ではないが、本発明者によって検討された技術であり、その概要は次のとおりである。   Here, the present inventor has studied an EEP-ROM built-in type single chip microcomputer suitable for being built in an IC card as described above, for example. The following is not a publicly known technique, but is a technique examined by the present inventor, and its outline is as follows.

図6は、本発明者によって検討されたマイクロ・コンピュータ10の構成を示す。同図に示すマイクロ・コンピュータ10はEEP−ROM内蔵のシングルチップ型であって、CPU(中央処理ユニット)1、RAM(ランダム・アクセス・メモリ)2、マスクROM(固定記憶ROM)3、EEP−ROM41,42、I/O(入出力ユニット)5、周辺回路6、及びEEP−ROM書込制御回路7などを同一半導体チップ内に有する。各部(1〜7)はアドレスバスLA及びデータバスLDによって相互に接続されている。   FIG. 6 shows a configuration of the microcomputer 10 examined by the present inventor. The microcomputer 10 shown in the figure is a single chip type with a built-in EEP-ROM, and includes a CPU (central processing unit) 1, a RAM (random access memory) 2, a mask ROM (fixed storage ROM) 3, and an EEP-ROM. ROM 41, 42, I / O (input / output unit) 5, peripheral circuit 6, EEP-ROM write control circuit 7 and the like are provided in the same semiconductor chip. Each part (1-7) is mutually connected by the address bus LA and the data bus LD.

このシングルチップ型マイクロ・コンピュータ10は、たとえばICカード内に内蔵されて使用される。そして、図7に示すように、外部とのデータDxの授受はすべてCPU1を介して行われるようになっている。図7は、図6に示したマイクロ・コンピュータ10をデータDxの流れに着目して示したものである。このマイクロ・コンピュータ10は適切なソフトウェアによる「鍵」を使用しない限り内蔵ソフトウェアを知ることができない構成とすることができ、ICカード内に内蔵されるシングルチップ型マイクロ・コンピュータとしての適正を持たせている。   This single-chip type microcomputer 10 is used by being built in, for example, an IC card. As shown in FIG. 7, the exchange of data Dx with the outside is all performed via the CPU 1. FIG. 7 shows the microcomputer 10 shown in FIG. 6 while paying attention to the flow of data Dx. The microcomputer 10 can be configured such that the built-in software cannot be known unless a “key” by appropriate software is used, so that the microcomputer 10 is appropriate as a single-chip microcomputer incorporated in the IC card. ing.

ここで、EEP−ROM41,42は同等のものが互いに独立して2つ設けられている。そして、図8に示すように、一方のEEP−ROM41は、いわゆるユーザ・プログラム領域(M1)として利用される。ここには、ユーザが任意に作成したプログラムが予め書き込まれる。このプログラムの書込は外部からの制御によってCPU1を停止し、外部から直接EEP−ROM41に対して行われる。このようなP−ROMのプログラム方法は、たとえば非特許文献1((株)日立製作所、昭和59年8月発行「日立マイクロコンピュータデータブック8ビットシングルチップ」823〜865頁)によって公知である。これにより製造工程におけるマスクROMの書換えが不要となり、ユーザの多様な応用に即座に応ずることができる。さらに、EEP−ROM41に対するプログラムが行われた後、このEEP−ROMに対する再書込あるいは読出しを禁止することを可能とする手段を有する構成とすれば内蔵ソフトウェアの保護として効果がある。他方のEEP−ROM42はデータ領域(M2)として利用される。ここには、CPU1によって管理される入出力データのうち、保存を要するデータDxが必要に応じて随時に書き込まれる。このEEP−ROM42に対する書込はCPU1によって制御される書込制御回路7を介して行われる。一般にEEP−ROMの書込に要する時間はCPUの平均的な命令実行時間に比べ1000倍程度であって、この書込期間、EEP−ROM42はCPU1から電気的に切離され、EEP−ROM42の読出し、書込ともに不可能となっている。   Here, two equivalent EEP-ROMs 41 and 42 are provided independently of each other. As shown in FIG. 8, one EEP-ROM 41 is used as a so-called user program area (M1). Here, a program arbitrarily created by the user is written in advance. The program is written to the EEP-ROM 41 directly from the outside by stopping the CPU 1 under the control from the outside. Such a P-ROM programming method is known, for example, from Non-Patent Document 1 (Hitachi, Ltd., August 1984 "Hitachi Microcomputer Data Book 8-bit Single Chip" pages 823-865). This eliminates the need to rewrite the mask ROM in the manufacturing process, and can immediately respond to various applications of the user. Furthermore, if a configuration having a means for prohibiting rewriting or reading of the EEP-ROM after the EEP-ROM 41 is programmed is effective in protecting the built-in software. The other EEP-ROM 42 is used as a data area (M2). Here, of the input / output data managed by the CPU 1, data Dx that needs to be saved is written as needed. Writing to the EEP-ROM 42 is performed via a write control circuit 7 controlled by the CPU 1. Generally, the time required for writing to the EEP-ROM is about 1000 times the average instruction execution time of the CPU. During this writing period, the EEP-ROM 42 is electrically disconnected from the CPU 1 and Both reading and writing are impossible.

他方、CPU1は、プログラム格納用EEP−ROM41に書き込まれたユーザ・プログラムIx2を1命令ずつ読込みながら、所定の処理動作を実行する。そして、その処理動作の過程にて要保存データDxをデータ格納用EEP−ROM42に書き込む必要が生じた場合には、EEP−ROM書込制御回路7を介して、そのEEP−ROM42への書込を行う。この処理動作の実行に際しては、マスクROM3に予め標準プログラムIx1として用意されているプログラム・ルーチン(あるいはプログラム・モジュール)が適宜参照される。前記プログラム・ルーチンは、たとえばソフトウェアタイマや除算のプログラムであって、多くの用途あるいは応用によって有用なプログラムが用意されている。一般にマスクROMは同容量のEEP−ROMに比べて小さい面積で実現可能である。このため、全てのプログラムをEEP−ROM41に格納せずに前記ROM3を利用することで半導体チップ全体のサイズを縮小することが可能となっている。   On the other hand, the CPU 1 executes a predetermined processing operation while reading the user program Ix2 written in the program storing EEP-ROM 41 one instruction at a time. When it is necessary to write the storage-required data Dx to the data storage EEP-ROM 42 in the course of the processing operation, the writing to the EEP-ROM 42 is performed via the EEP-ROM write control circuit 7. I do. When executing this processing operation, a program routine (or program module) prepared as a standard program Ix1 in advance in the mask ROM 3 is appropriately referred to. The program routine is, for example, a software timer or division program, and useful programs are prepared for many uses or applications. In general, a mask ROM can be realized with a smaller area than an EEP-ROM having the same capacity. For this reason, it is possible to reduce the size of the entire semiconductor chip by using the ROM 3 without storing all the programs in the EEP-ROM 41.

しかし、全体的な処理はEEP−ROM41に書き込まれたユーザ・プログラムに従って行われる。   However, the overall processing is performed according to the user program written in the EEP-ROM 41.

図7において示されるようなEEP−ROM書込制御回路7は、たとえば一方のEEP−ROM41に書き込まれたプログラムに基づく制御を受けながら、他方のEEP−ROM42への書込動作を行う。この他方のEEP−ROM42は、書込が行われている間、CPU1から切り離される。   The EEP-ROM write control circuit 7 as shown in FIG. 7 performs a write operation to the other EEP-ROM 42 while receiving control based on a program written to one EEP-ROM 41, for example. The other EEP-ROM 42 is disconnected from the CPU 1 while writing is being performed.

以上のようにして、ユーザの多様な仕様要求及び多様な用途に対して即座に応じられ、かつデータDxを必要に応じてEEP−ROMに半永久的に保存させることが可能なマイクロ・コンピュータ10が構成されている。
特公昭56−19665号公報 (株)日立製作所、昭和59年8月発行「日立マイクロコンピュータデータブック8ビットシングルチップ」823〜865頁
As described above, the microcomputer 10 that can immediately respond to various specification requirements and various uses of the user and can semi-permanently store the data Dx in the EEP-ROM as necessary. It is configured.
Japanese Patent Publication No.56-19665 Hitachi, Ltd., August 1984 "Hitachi Microcomputer Data Book 8-bit Single Chip" pages 823-865

しかしながら、上述した技術には、次のような問題点があることが本発明者によって明らかとされた。   However, the inventor has revealed that the above-described technique has the following problems.

すなわち、上述したマイクロ・コンピュータ10では、ユーザ・プログラムIx2を書き込むためと要保存データDxを記憶するために、互いに独立した2つのEEP−ROM41,42が必要となる。EEP−ROMが1つだけでは、そのEEP−ROMに書込を行っている間、そのEEP−ROMに対する読出しアクセスができなくなって、CPU1が実行すべき命令を読み出せなくなってしまうからである。したがって、上述したように、プログラムとデータとをそれぞれに独立した2つのEEP−ROM41,42に格納させ、一方のEEP−ROM41から命令を読み出しながら、その読み出した命令に基づいて他方のEEP−ROM42の書込制御を実行するように構成しなければならなかった。   That is, in the microcomputer 10 described above, two EEP-ROMs 41 and 42 that are independent from each other are required to write the user program Ix2 and to store the necessary data Dx. This is because if there is only one EEP-ROM, read access to the EEP-ROM cannot be performed while writing to the EEP-ROM, and instructions to be executed by the CPU 1 cannot be read. Therefore, as described above, the program and data are stored in the two independent EEP-ROMs 41 and 42, and the instruction is read from one EEP-ROM 41, while the other EEP-ROM 42 is based on the read instruction. Had to be configured to perform write control.

しかし、そのためには、互いに独立した2つのEEP−ROM41,42が必要であり、しかも各EEP−ROM41,42は、各方面のユーザからの種々多様な仕様要求に対応できるようにするために、それぞれに十分に大きな記憶領域M1,M2を用意できるものでなければならない。たとえば、データサイズは小さくてよいがプログラムサイズは大きく、あるいはプログラムサイズは小さくてよいがデータサイズは大きく、といったような2通りの要求のいずれにも対応できるようにするためには、結局、2つのEEP−ROM41,42のそれぞれの記憶容量をどちらも大きくせざるを得ない。さらに、2つのEEP−ROM41,42の各記憶容量を両方ともに大きくしても、そのどちらかは記憶容量が大きく余って有効に利用されない、という無駄が生じやすい。   However, in order to do so, two EEP-ROMs 41 and 42 that are independent from each other are required, and each EEP-ROM 41 and 42 can cope with various specification requirements from users in various directions. It must be possible to prepare sufficiently large storage areas M1 and M2. For example, in order to be able to cope with any of two types of requests such as a small data size but a large program size, or a small program size but a large data size, 2 Both the storage capacities of the two EEP-ROMs 41 and 42 must be increased. Furthermore, even if both the storage capacities of the two EEP-ROMs 41 and 42 are both increased, it is easy to waste that either one of them has a large storage capacity and cannot be used effectively.

なお、EEP−ROM41,42のそれぞれは、メモリアレイとともにセンスアンプ、ドライバ回路のようなデータ入出力のための回路やアドレスを選択するための回路からなる周辺回路を持つ。それ故に、EEP−ROMが複数個独立して形成された場合、センスアンプ、ドライバなどの周辺回路がそれぞれのEEP−ROM内に設けられることになるので、多くの回路要素が必要とされる。これに応じて、EEP−ROMの全体のサイズを大きくせざるを得なくなっている。   Each of the EEP-ROMs 41 and 42 has a memory array and a peripheral circuit including a circuit for data input / output, such as a sense amplifier and a driver circuit, and a circuit for selecting an address. Therefore, when a plurality of EEP-ROMs are independently formed, peripheral circuits such as a sense amplifier and a driver are provided in each EEP-ROM, so that many circuit elements are required. Accordingly, the entire size of the EEP-ROM has to be increased.

そこで、本発明者は、EEP−ROM41に、EEP−ROM42の制御のためのプログラムを格納するとともにEEP−ROM42のプログラムによって参照されるべきデータを格納し、またEEP−ROM42に、EEP−ROM41の制御のためのプログラムとともにEEP−ROM41のプログラムによって参照されるデータを格納することも検討した。このようにすると、EEP−ROM41及び42のそれぞれにおけるプログラム格納エリアとデータ格納エリアとを可変にすることが可能になる。この場合、前述のようなメモリエリアもしくはサイズに関する問題は幾分緩和される。しかしながら、この場合であっても、各EEP−ROM41及び42が互いに独立的なセンスアンプやデコーダ回路のような周辺回路をそれぞれに持つので、EEP−ROM全体のサイズもしくは半導体チップ全体のサイズに関しての不利益は十分に除去されない。   Therefore, the inventor stores a program for controlling the EEP-ROM 42 in the EEP-ROM 41 and stores data to be referred to by the program in the EEP-ROM 42, and stores the data in the EEP-ROM 42 in the EEP-ROM 42. It was also considered to store data referred to by the program of the EEP-ROM 41 together with the control program. In this way, the program storage area and the data storage area in each of the EEP-ROMs 41 and 42 can be made variable. In this case, the memory area or size problem as described above is somewhat mitigated. However, even in this case, each EEP-ROM 41 and 42 has a peripheral circuit such as a sense amplifier and a decoder circuit independent from each other. The disadvantage is not fully eliminated.

以上のように、上述したマイクロ・コンピュータでは、ユーザの多様な仕様要求及び多様な用途に対して即座に応じられ、かつデータDxを必要に応じてEEP−ROMに半永久的に保存させることができるという利点を有するものの、それぞれに十分に大きな記憶容量を持つ2つの独立したEEP−ROM41,42が必要であった。このため、そのハードウェア的な構成負担が大きく、特に、シングルチップ型のものにあっては、その半導体チップサイズがどうしても大きくなってしまい、その割にハードウェア資源の利用効率が必ずしもよくない、という問題点のあることが本発明者によって始めて明らかとされた。特にICカードに内蔵する場合に半導体チップサイズの縮小はカード強度の向上のために強い要求があり、上記の半導体チップはこれに反するものとなっている。   As described above, the above-described microcomputer can immediately respond to various specification requirements and various uses of the user, and can store the data Dx semi-permanently in the EEP-ROM as necessary. However, two independent EEP-ROMs 41 and 42 each having a sufficiently large storage capacity are required. For this reason, the hardware configuration burden is large, especially in the case of a single chip type, the semiconductor chip size is inevitably large, and the utilization efficiency of hardware resources is not necessarily good. It has been clarified for the first time by the present inventor that there is a problem. In particular, when the semiconductor chip is built in an IC card, there is a strong demand for reducing the size of the semiconductor chip in order to improve the card strength, and the above semiconductor chip is contrary to this.

本発明の目的は、上述したマイクロ・コンピュータの利点、すなわちユーザの多様な仕様要求及び多様な用途に対して即座に応じられ、かつデータを必要に応じてEEP−ROMに半永久的に保存させることができるという利点を保持しつつ、そのハードウェア的な構成規模の縮小を可能にし、かつハードウェア資源の利用効率を高められるようにする、という技術を提供することにある。特に、CPUの処理速度より、書込または消去の時間が長かったり、素子特性のバラツキの大きいEEP−ROMなどの電気的に書込(または消去)が可能なROMを内蔵した場合のように、素子特性にあった高速かつ確実な書込を実現することができ、書込時間の短縮、さらに応答時間の短縮が図れるようにする技術を提供するものである。   The object of the present invention is to provide the above-mentioned advantages of the microcomputer, that is, to meet the various specification requirements and various uses of the user immediately and to store the data semi-permanently in the EEP-ROM as needed. It is an object of the present invention to provide a technology that allows the hardware configuration scale to be reduced and the utilization efficiency of hardware resources to be increased while retaining the advantage of being able to perform the above-described process. In particular, as in the case of incorporating a ROM that can be electrically written (or erased) such as an EEP-ROM that has a longer writing or erasing time than the processing speed of the CPU or a large variation in element characteristics, The present invention provides a technique capable of realizing high-speed and reliable writing suitable for element characteristics, and shortening the writing time and further shortening the response time.

本願において開示される発明のうち、代表的なものの概要を簡単に説明すれば、下記のとおりである。   Of the inventions disclosed in this application, the outline of typical ones will be briefly described as follows.

すなわち、本発明のマイクロ・コンピュータは、中央処理ユニット(CPU)と、上記中央処理ユニットが実行する第1プログラムを格納する領域を有するマスクROMと、上記中央処理ユニットが実行する第2プログラムとデータとを格納する領域を有する電気的に書込及び消去可能なROM(EEP−ROMなど)と、RAMとを有し、上記第1プログラムは、上記RAMに用意されたデータを上記ROMに書き込むためのプログラムであり、上記第2プログラムは、上記第1プログラムへジャンプする命令を有しているものである。   That is, the microcomputer of the present invention includes a central processing unit (CPU), a mask ROM having an area for storing a first program executed by the central processing unit, a second program and data executed by the central processing unit. And an electrically writable and erasable ROM (EEP-ROM or the like) having a region for storing the data, and a RAM, and the first program writes data prepared in the RAM into the ROM. The second program has an instruction to jump to the first program.

さらに、本発明の他のマイクロ・コンピュータは、上記第2プログラムが、上記中央処理ユニットが上記第1プログラムによって上記電気的に書込及び消去可能なROMにデータを書き込むための処理に移行するための命令を有している、上記第1プログラムが、上記電気的に書込及び消去可能なROMへのデータの書込処理が完了した後に、上記中央処理ユニットが上記第2プログラムの実行へと復帰するための命令を有している、あるいはフラグを有して上記中央処理ユニットが、上記フラグに基づき、上記電気的に書込及び消去可能なROMへのデータの書込処理の完了を判定し、上記判定結果に基づき上記中央処理ユニットが上記第2プログラムの実行へと復帰する、などの特徴を組み合わせて有しているものである。   Further, according to another microcomputer of the present invention, the second program shifts to a process for the central processing unit to write data to the electrically writable and erasable ROM by the first program. After the first program having the instruction has completed the process of writing data to the electrically writable and erasable ROM, the central processing unit proceeds to the execution of the second program. The central processing unit having an instruction to return or having a flag determines completion of writing of data into the electrically writable and erasable ROM based on the flag In addition, the central processing unit has a combination of features such as returning to the execution of the second program based on the determination result.

また、本発明の他のマイクロ・コンピュータは、中央処理ユニット(CPU)と、上記中央処理ユニットによって実行されるプログラムの格納領域と、データの格納領域とを有する電気的に書込及び消去可能なROM(EEP−ROMなど)と、上記電気的に書込及び消去可能なROMに書込を行うための書込制御プログラムを格納する領域を有する記憶手段(マスクROM、RAMなど)と、入出力手段(I/O)とを有するマイクロ・コンピュータであって、上記中央処理ユニットは、上記書込制御プログラムに基づき、上記電気的に書込及び消去可能なROMの上記プログラムの格納領域に、上記入出力手段を介して上記マイクロ・コンピュータ外より受信したプログラムを書き込み、上記電気的に書込及び消去可能なROMに格納されたプログラムは、上記中央処理ユニットが上記書込制御プログラムによって上記電気的に書込及び消去可能なROMにプログラムを書き込むための処理に移行するための命令を有しているものである。   Another microcomputer of the present invention is an electrically writable and erasable memory having a central processing unit (CPU), a storage area for programs executed by the central processing unit, and a data storage area. ROM (EEP-ROM, etc.), storage means (mask ROM, RAM, etc.) having an area for storing a write control program for writing to the electrically writable and erasable ROM, and input / output The central processing unit is provided in a storage area for the program in the electrically writable and erasable ROM based on the write control program. The program received from outside the microcomputer is written via the entry / output means and stored in the electrically writable / erasable ROM. Program is one that the central processing unit has an instruction to shift to the processing for writing a program to the electrically writing and erasable ROM by the write control program.

さらに、本発明の他のマイクロ・コンピュータは、上記書込制御プログラムが、上記電気的に書込及び消去可能なROMへのプログラムの書込処理が完了した後に、上記中央処理ユニットが上記電気的に書込及び消去可能なROMに格納されたプログラムの実行へと復帰するための命令を有している、フラグを有して上記中央処理ユニットが、上記フラグに基づき、上記電気的に書込及び消去可能なROMへのプログラムの書込処理の完了を判定し、上記判定結果に基づき上記中央処理ユニットが上記電気的に書込及び消去可能なROMに格納されたプログラムの実行へと復帰する、上記記憶手段が、上記電気的に書込及び消去可能なROMから上記書込制御プログラムの転送を受けたRAMである、あるいは上記電気的に書込及び消去可能なROMの上記プログラムの格納領域あるいは上記データの格納領域にプログラムあるいはデータを書き込み、そのプログラムあるいはデータを書き込むための処理に移行するための命令を有する、などの特徴を組み合わせて有しているものである。   Furthermore, another microcomputer of the present invention is configured so that the central processing unit performs the electrical control after the write control program has completed the process of writing the program to the electrically writable and erasable ROM. The central processing unit having a flag having an instruction for returning to the execution of the program stored in the ROM that can be written to and erased from is electrically written based on the flag. And determining completion of the program writing process to the erasable ROM, and the central processing unit returns to the execution of the program stored in the electrically writable and erasable ROM based on the determination result. The storage means is a RAM which has received the transfer of the write control program from the electrically writable and erasable ROM, or the electrically writable and erasable It has a combination of features such as writing a program or data in the program storage area or data storage area of the ROM, and having an instruction to shift to processing for writing the program or data. is there.

よって、前記マイクロ・コンピュータによれば、書込可能なROMにデータを書き込むのに際し、そのときだけCPUを別の記憶装置へジャンプさせて、そこに予め格納された所定の書込制御プログラムを実行させることにより、書込可能なROMへの書込動作中にもCPUに所定の書込制御処理を実行させることができる。これにより、ユーザ・プログラム領域とデータ領域とを1つの書込可能なROM内に置くことができ、さらに各領域の大きさの割合を任意に選ぶことができる。これによって、ユーザの多様な仕様要求に即座に応じられ、かつデータを必要に応じて上記ROMに半永久的に保存させることができるという利点を保持しつつ、そのハードウェア的な構成規模の縮小を可能にし、かつハードウェア資源の利用効率を高められるようにする、という目的が達成される。特に、制御プログラムによってフラグを操作してROMの書込(または消去)を制御することにより、素子特性にあった高速かつ確実な書込を実現することができ、書込時間の短縮、さらに応答時間の短縮を図ることができる。   Therefore, according to the microcomputer, when data is written in the writable ROM, only when that is the case, the CPU jumps to another storage device and executes a predetermined write control program stored in the CPU. By doing so, it is possible to cause the CPU to execute a predetermined write control process even during a write operation to the writable ROM. As a result, the user program area and the data area can be placed in one writable ROM, and the ratio of the size of each area can be arbitrarily selected. As a result, the hardware configuration scale can be reduced while maintaining the advantages of being able to immediately respond to various specifications requirements of the user and storing data in the ROM semi-permanently as needed. The objective of enabling and improving the utilization efficiency of hardware resources is achieved. In particular, by controlling the writing (or erasing) of the ROM by manipulating the flag by the control program, high-speed and reliable writing suitable for the element characteristics can be realized, shortening the writing time and further response Time can be shortened.

本願において開示される発明のうち、代表的なものによって得られる効果を簡単に説明すれば、下記のとおりである。   The effects obtained by typical ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、EEP−ROM内蔵型のマイクロ・コンピュータにあって、ユーザの多様な仕様要求及び多様な用途に対して即座に応じることができる。   In other words, the microcomputer with built-in EEP-ROM can immediately respond to various specifications requirements and various uses of users.

以下、本発明の好適な実施の形態を図面に基づいて説明する。なお、各図中、同一符号は同一あるいは相当部分を示す。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described with reference to the drawings. In each figure, the same numerals indicate the same or corresponding parts.

図1はこの発明による技術が適用されたマイクロ・コンピュータ10の主要部における一実施の形態を示す。   FIG. 1 shows an embodiment of the main part of a microcomputer 10 to which the technology according to the present invention is applied.

同図にその主要部を示すマイクロ・コンピュータ10はシングルチップ型のものであって、CPU1とともに、ユーザ・プログラムIx2と要保存データの両方が任意の割合で書き込まれるEEP−ROM4を備える。これとともに、そのEEP−ROM4に書込を行うための書込制御プログラムが標準プログラムIx1の一部として予め固定的に格納されたいわゆるマスクROM3を備える。   The microcomputer 10 which shows the main part in the figure is of a single chip type, and is provided with an EEP-ROM 4 in which both the user program Ix2 and required storage data are written at an arbitrary ratio together with the CPU 1. Along with this, a so-called mask ROM 3 in which a write control program for writing to the EEP-ROM 4 is fixedly stored in advance as a part of the standard program Ix1 is provided.

マスクROM3は、書込制御プログラムのみを格納したものであってもよく、あるいはさらに前記した標準プログラム・ルーチンを格納したものであってもよい。ここで、書込制御プログラムはたとえば書込制御回路7に対する起動のためのプログラムあるいは書込の終了を検出するためのプログラムを含むようなものである。さらに書込データが多量である場合にはRAM2内の所定の領域に用意されたデータを順次EEP−ROM4に対して転送し、書込を行うものであってもよい。さらに、そのEEP−ROM4とマスクROM3はそれぞれ、上記CPU1のアドレス空間上にて、互いに異なるアドレス位置に配置されている。ここで、図1におけるスイッチは仮想的なものであって、CPU1の実行プログラムがEEP−ROM4に対する書込時にはコール命令によってマスクROM3に移り、書込終了後リターン命令によってEEP−ROM4に戻ることを示すものである。   The mask ROM 3 may store only the write control program, or may further store the standard program routine described above. Here, the write control program includes, for example, a program for starting up the write control circuit 7 or a program for detecting the end of writing. Further, when there is a large amount of write data, data prepared in a predetermined area in the RAM 2 may be sequentially transferred to the EEP-ROM 4 for writing. Further, the EEP-ROM 4 and the mask ROM 3 are arranged at different address positions on the address space of the CPU 1. Here, the switch in FIG. 1 is virtual, and when the execution program of the CPU 1 is written to the EEP-ROM 4, it is transferred to the mask ROM 3 by a call command, and after returning to the EEP-ROM 4 by a return command. It is shown.

この場合、EEP−ROM4内には、そのEEP−ROM4への書込制御プログラムの代わりに、マスクROM3内の特定ルーチンへのコール命令が書き込まれるようになっている。他方、マスクROM3内には、EEP−ROM4のための書込制御プログラムとともに、この書込制御プログラムの最後にEEP−ROM4へのリターン命令が書き込まれるようになっている。   In this case, a call instruction to a specific routine in the mask ROM 3 is written in the EEP-ROM 4 instead of the write control program for the EEP-ROM 4. On the other hand, in the mask ROM 3, a return command to the EEP-ROM 4 is written at the end of the write control program together with a write control program for the EEP-ROM 4.

図2は、図1に示したマイクロプロセッサ10の全体的な構成の一実施の形態を示す。   FIG. 2 shows an embodiment of the overall configuration of the microprocessor 10 shown in FIG.

同図に示すように、上記マイクロ・コンピュータ10には、上述した構成要素すなわちCPU1、マスクROM3、及びEEP−ROM4の他に、CPU1の作業領域を提供するRAM2、外部に対してデータDxの受け渡しを行うI/O(入出力ユニット)5、周辺回路6、及びEEP−ROM書込制御回路7などが内蔵されている。これらを内蔵することにより、たとえばICカード内に内蔵されるシングルチップ型マイクロ・コンピュータとしての適性を持たせられている。マイクロ・コンピュータ10内の各部(1〜7)はアドレスバスLA及びデータバスLDによって相互に接続されている。各メモリや周辺回路に対する制御信号は省略されている。   As shown in the figure, in addition to the above-described components, that is, the CPU 1, the mask ROM 3, and the EEP-ROM 4, the microcomputer 10 receives the RAM 2 that provides the work area of the CPU 1, and the data Dx to the outside. An I / O (input / output unit) 5, a peripheral circuit 6, an EEP-ROM write control circuit 7 and the like are built in. By incorporating these, the suitability of a single-chip microcomputer incorporated in, for example, an IC card is given. Each part (1-7) in the microcomputer 10 is mutually connected by an address bus LA and a data bus LD. Control signals for each memory and peripheral circuit are omitted.

図3は、図2に示したマイクロ・コンピュータ10を、データDxの流れに着目して示す。同図に示すように、外部とのデータDxの授受は全てCPU1を介して行われるようになっている。これにより適切なソフトウェアによる「鍵」を使用しない限り、内蔵ソフトウェアを知ることができない構成とすることが可能である。   FIG. 3 shows the microcomputer 10 shown in FIG. 2 focusing on the flow of data Dx. As shown in the figure, the exchange of data Dx with the outside is all performed via the CPU 1. Thus, it is possible to adopt a configuration in which the built-in software cannot be known unless a “key” by appropriate software is used.

図4は、上記CPU1のアドレス空間の状態の3つの例をそれぞれメモリ・マップによって示す。同図に示すように、上記EEP−ROM4による記憶領域M内には、ユーザ・プログラム領域M1と、データ領域M2の両方が任意の割合でもって割り当てられるようになっている。   FIG. 4 shows three examples of the state of the address space of the CPU 1 by a memory map. As shown in the figure, both the user program area M1 and the data area M2 are allocated at an arbitrary ratio in the storage area M of the EEP-ROM 4.

図5は、上記CPU1がEEP−ROM4への書込制御を行う場合の処理動作例をフローチャートによって示す。   FIG. 5 is a flowchart showing an example of processing operation when the CPU 1 controls writing to the EEP-ROM 4.

図2において、CPU1は、ユーザ・プログラム領域M1に書き込まれたプログラムIx2を1命令ずつ読込みながら、所定の処理動作を実行する(ステップS6)。   In FIG. 2, the CPU 1 executes a predetermined processing operation while reading the program Ix2 written in the user program area M1 one instruction at a time (step S6).

ここで、その処理動作の過程にて要保存データDxをEEP−ROM4に書き込む必要が生じると(ステップS1)、CPU1は、コール命令によって、マスクROM3に格納された標準プログラム領域Ix1中の書込制御プログラムの先頭アドレスにジャンプする(ステップS2)。そして、その書込制御プログラムにしたがってEEP−ROM4の書込制御処理を実行する(ステップS3)。これにより、EEP−ROM書込制御回路7を介して、そのEEP−ROM4への書込が行われる。この書込が行われている間、EEP−ROM4はCPU1から切り離される。   Here, if it is necessary to write the required storage data Dx into the EEP-ROM 4 in the course of the processing operation (step S1), the CPU 1 writes in the standard program area Ix1 stored in the mask ROM 3 by a call instruction. Jump to the start address of the control program (step S2). Then, the writing control process of the EEP-ROM 4 is executed according to the writing control program (step S3). As a result, writing to the EEP-ROM 4 is performed via the EEP-ROM write control circuit 7. While this writing is being performed, the EEP-ROM 4 is disconnected from the CPU 1.

この後、書込が完了すると、CPU1は、たとえば書込制御回路7側から発せられるフラグあるいは割込要求に基づいて、書込の完了を判定する(ステップS4)。すると、CPU1は、マスクROM3からEEP−ROM4のプログラム領域M1にリターンし、ジャンプ時のアドレスの次の番地からユーザ・プログラムの読込みを再開する(ステップS5)。そして、処理の終了あるいは次のデータ書込要求が発生するまで、EEP−ROM4のユーザ・プログラムを実行する(ステップS6)。   Thereafter, when the writing is completed, the CPU 1 determines the completion of the writing based on, for example, a flag or an interrupt request issued from the write control circuit 7 side (step S4). Then, the CPU 1 returns from the mask ROM 3 to the program area M1 of the EEP-ROM 4, and resumes reading of the user program from the address next to the address at the time of jump (step S5). Then, the user program in the EEP-ROM 4 is executed until the end of processing or the next data write request is generated (step S6).

以上のようにして、ユーザ・プログラム領域M1とデータ領域M2とを1つのEEP−ROM4内に置くことができるようになっている。これとともに、両領域M1とM2の大きさの割合を任意に選ぶことができるので、EEP−ROM全体の記憶領域Mのサイズがそれほど大きくなくとも、たとえば図4に3つの例を示すように、データ領域M2のサイズを小さくする代わりにプログラム領域M1のサイズを大きくとったり、あるいはプログラム領域M1のサイズを小さくする代わりにデータ領域M2のサイズを大きくとったり、といったように記憶領域Mを融通し合って効率良く利用することができる。   As described above, the user program area M1 and the data area M2 can be placed in one EEP-ROM 4. At the same time, since the ratio of the sizes of both areas M1 and M2 can be arbitrarily selected, even if the size of the storage area M of the entire EEP-ROM is not so large, for example, as shown in FIG. The storage area M can be interchanged, such as increasing the size of the program area M1 instead of reducing the size of the data area M2, or increasing the size of the data area M2 instead of reducing the size of the program area M1. It can be used efficiently.

これによって、ユーザの多様な用途に対して即座に応じられ、かつデータDxを必要に応じてEEP−ROM4に半永久的に保存させることができるという利点を保持しつつ、そのハードウェア的な構成規模の縮小を可能にし、かつハードウェア資源の利用効率を高められるようにする、という目的が達成される。   As a result, it is possible to immediately respond to various uses of the user, and to maintain the advantage that the data Dx can be stored semi-permanently in the EEP-ROM 4 as necessary, while having a hardware configuration scale. The purpose of enabling the reduction of the hardware resources and improving the utilization efficiency of the hardware resources is achieved.

ここで、EEP−ROMの書込が完了されたときのユーザ・プログラムへのリターンは、実施の形態のように書込制御回路7から発せられるフラグあるいは割込要求によらなくてもよい。たとえば、CPU1内の適当な作業レジスタが、EEP−ROMへの書込動作の開始と同時に動作開始されて、その動作中に一定周期で更新される一種のカウンタもしくはタイマとして利用され、かかる作業レジスタの内容が所定値に達したときに上記リターン動作が実行されるように構成されてもよい。つまり、CPU1が予め見込まれる所定の書込所要時間を計時し、この計時が完了した時点でEEP−ROMへの書込動作の完了をソフトウェア的にチェックする構成であってもよい。この場合、書込時間の設定とその後のリターン動作の制御は、タイマ回路のような専用回路によってハードウェア的に行わせるようにしてもよい。   Here, the return to the user program when the writing of the EEP-ROM is completed may not be based on the flag or the interrupt request issued from the write control circuit 7 as in the embodiment. For example, an appropriate work register in the CPU 1 is used as a kind of counter or timer which starts operating simultaneously with the start of the writing operation to the EEP-ROM and is updated at a constant period during the operation. The return operation may be executed when the content of the file reaches a predetermined value. That is, the CPU 1 may measure a predetermined required write time that is expected in advance, and check the completion of the writing operation to the EEP-ROM by software when the time is completed. In this case, the setting of the writing time and the control of the subsequent return operation may be performed in hardware by a dedicated circuit such as a timer circuit.

上記した例では、ユーザ・プログラムは、特に制限されないものの、外部からの制御によってCPU1を停止し、外部から直接EEP−ROM4のユーザ・プログラム領域M1に対して書込を行う構成となっている。   In the example described above, the user program is not particularly limited, but is configured to stop the CPU 1 by external control and directly write to the user program area M1 of the EEP-ROM 4 from the outside.

このユーザ・プログラムの書込は、マスクROM3のプログラムに従ってCPU1がI/Oユニット5を介して外部よりプログラムを受信し、順次EEP−ROM4のユーザ・プログラム領域M1に対して書き込む構成としてもよい。この例では、内蔵EEP−ROM4に対して外部から直接アクセスする手段を持たないために、機密保護機能が強化され、ICカード内に内蔵されるシングルチップ型マイクロ・コンピュータとしての適正を増大させることができる。   The user program may be written in such a manner that the CPU 1 receives the program from the outside via the I / O unit 5 according to the program in the mask ROM 3 and sequentially writes it in the user program area M 1 of the EEP-ROM 4. In this example, since there is no means for directly accessing the built-in EEP-ROM 4 from the outside, the security protection function is strengthened, and the suitability as a single-chip type microcomputer built in the IC card can be increased. it can.

この場合、ユーザ・プログラム4に対する書込が既に行われているか否かは、EEP−ROM4内にフラグを有してその状態で判定すればよい。このフラグの状態に応じて、CPU1のリセット後のスタートアドレスを変更するような構成にしてもよい。   In this case, whether or not writing to the user program 4 has already been performed may be determined in a state having a flag in the EEP-ROM 4. The start address after resetting the CPU 1 may be changed according to the state of the flag.

また、書込可能なROMとしては、EEP−ROMのような電気的に書込及び消去可能なROMだけではなく、紫外線消去型のEP−ROMも利用できる。   As a writable ROM, not only an electrically writable and erasable ROM such as an EEP-ROM but also an ultraviolet erasable EP-ROM can be used.

上記の例では、特に制限はされないものの、書込は書込制御回路7によって行われ、一定時間の書込が行われている。   In the above example, although not particularly limited, writing is performed by the writing control circuit 7 and writing is performed for a predetermined time.

EP−ROMの場合には、一般にEEP−ROMに比して書込時間が長い。このために、上記のような書込時間一定の方法ではICカードに内蔵した場合には応答時間の増加を招いてしまう。ここで、EP−ROM素子のプロセスバラツキが大きいことにより、ワーストケースを考慮して書込時間は設定されるために多くの場合、書込時間が必要以上に費やされてしまっている。   In the case of EP-ROM, writing time is generally longer than that of EEP-ROM. For this reason, when the writing time is constant as described above, if the IC card is built in, the response time increases. Here, since the process variation of the EP-ROM element is large, the writing time is set in consideration of the worst case, and in many cases, the writing time is consumed more than necessary.

そこで、本発明者は書込制御回路7に対してCPU1が起動をかけるとともにさらに、停止も可能とできる構成とすることを考えた。すなわち、書込制御回路7内にフラグPGMを設け、このフラグPGMをCPU1がセットすると書込が開始され、前記フラグをリセットすると書込が終了されるというものである。書込時間は、たとえば前記したようにソフトウェアによって計時されてもよいし、あるいはタイマ回路を内蔵しているものにあっては、これを利用してもよい。   Therefore, the present inventor has considered that the CPU 1 is activated with respect to the write control circuit 7 and can be stopped. That is, a flag PGM is provided in the write control circuit 7, and writing is started when the flag PGM is set by the CPU 1, and writing is ended when the flag is reset. The write time may be measured by software, for example, as described above, or may be used if a timer circuit is incorporated.

図9は上記の場合のマスクROM3内に格納されるべき書込制御プログラムの一実施の形態を示すフローチャートである。   FIG. 9 is a flowchart showing an embodiment of a write control program to be stored in the mask ROM 3 in the above case.

まず、CPU1がEP−ROMに対する書込アドレス・データを設定し、EP−ROMはこれらをラッチする(ステップS1)。次にCPU1は特定レジスタNの内容をクリアし(ステップS2)、上記レジスタNに+1の加算を行った(ステップS3)後に、フラグPGMをセットする(ステップS4)。所定の単位時間たとえば1msの計時を行い(ステップS5)、その後にフラグPGMをリセットし(ステップS6)、単位時間の書込を終了する。   First, the CPU 1 sets write address data for the EP-ROM, and the EP-ROM latches them (step S1). Next, the CPU 1 clears the contents of the specific register N (step S2), adds +1 to the register N (step S3), and then sets the flag PGM (step S4). Time is measured for a predetermined unit time, for example, 1 ms (step S5), after which the flag PGM is reset (step S6), and the writing of the unit time is terminated.

この後、正しく書込が行われたか否かを判定する(ステップS7)。この判定は、EP−ROMの読出しを行い、この読出された内容と書込データを比較する。特に制限はされないが、この読出し時には前記ラッチされたデータを破壊しないように構成されている。この比較結果が不一致であればCPU1は前記レジスタNの値を判定して(ステップS11)、24以下であれば上記ステップS3に戻り再び単位時間の書込を実行する。上記単位時間の書込が25回行われても、すなわちN=25となっても不一致の場合は不良と判定して(ステップS12)終了する。   Thereafter, it is determined whether or not writing has been correctly performed (step S7). This determination is performed by reading the EP-ROM and comparing the read contents with the write data. Although not particularly limited, the latched data is not destroyed at the time of reading. If the comparison result does not match, the CPU 1 determines the value of the register N (step S11), and if it is 24 or less, the CPU 1 returns to step S3 and executes unit time writing again. Even if the writing of the unit time is performed 25 times, that is, even if N = 25, if it does not match, it is determined as defective (step S12), and the process ends.

上記判定の結果が一致していれば、CPU1はフラグPGMをセットし(ステップS8)、さらに3×Nmsの計時を行った(ステップS9)後に、フラグPGMをクリアして(ステップS10)終了する。すなわち、上記判定結果が一致するまでに要した時間Nmsの3倍の時間による重ね書込が行われる。   If the result of the determination is coincident, the CPU 1 sets the flag PGM (step S8), further measures the time of 3 × Nms (step S9), clears the flag PGM (step S10), and ends. . That is, the overwriting is performed for a time three times the time Nms required until the above determination results match.

これによって、素子特性にあった高速かつ確実な書込を実現することができ、書込時間の短縮、さらに応答時間の短縮を図ることができる。   As a result, high-speed and reliable writing suitable for the element characteristics can be realized, and the writing time can be shortened and further the response time can be shortened.

上記した方法によって、ユーザの多様な仕様要求及び多様な用途に対して即座に応じられ、かつデータDxを必要に応じてEP−ROMに半永久的に保存させることができるという利点を有しつつ、そのハードウェア的な構成規模の縮小を可能にし、かつハードウェア資源の利用効率を高められるようにし、さらに応答時間を短縮することができる。   With the above-described method, it is possible to immediately respond to various specification requirements and various uses of the user, and to have the advantage that the data Dx can be semi-permanently stored in the EP-ROM as necessary. The hardware configuration scale can be reduced, the utilization efficiency of hardware resources can be increased, and the response time can be shortened.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は上記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。たとえば、書込制御プログラムをマスクROM3あるいはEEP−ROM4に予め格納し、EEP−ROM4の書込動作を行うときに、その格納された書込制御プログラムをRAM2へ転送してCPU1に実行させるような構成でもよい。   As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the above embodiment, and various modifications can be made without departing from the scope of the invention. Needless to say. For example, a write control program is stored in advance in the mask ROM 3 or EEP-ROM 4, and when the write operation of the EEP-ROM 4 is performed, the stored write control program is transferred to the RAM 2 and executed by the CPU 1. It may be configured.

また、ICカード用シングルチップ型マイクロ・コンピュータに適用した場合について説明したが、それに限定されるものではなく、たとえば、ボード型のマイクロ・コンピュータなどにも適用できる。   Further, the case where the present invention is applied to a single chip type microcomputer for IC card has been described, but the present invention is not limited thereto, and can be applied to, for example, a board type microcomputer.

少なくとも、EEP−ROMにプログラムとデータの両方を記憶させる条件のものには適用できる。   The present invention can be applied at least to a condition where both the program and data are stored in the EEP-ROM.

この発明による技術が適用されたEEP−ROM内蔵型マイクロ・コンピュータの主要部を示すブロック図である。1 is a block diagram showing a main part of an EEP-ROM built-in microcomputer to which a technique according to the present invention is applied; FIG. 図1に示したマイクロ・コンピュータの全体的な構成を示すブロック図である。FIG. 2 is a block diagram showing an overall configuration of the microcomputer shown in FIG. 1. 図2に示したマイクロ・コンピュータをデータの流れに着目して示すブロック図である。FIG. 3 is a block diagram showing the microcomputer shown in FIG. 2 focusing on the data flow. 図2に示したマイクロ・コンピュータ内CPUのアドレス空間の3つの状態を例示するアドレスマップである。3 is an address map illustrating three states of the address space of the CPU in the microcomputer shown in FIG. 図2に示したマイクロ・コンピュータの動作例を示すフローチャートである。3 is a flowchart showing an operation example of the microcomputer shown in FIG. 2. この発明に先立って検討されたEEP−ROM内蔵型マイクロ・コンピュータの構成を示すブロック図である。1 is a block diagram showing a configuration of an EEP-ROM built-in type microcomputer studied prior to the present invention. FIG. 図6に示したマイクロ・コンピュータをデータの流れに着目して示すブロック図である。FIG. 7 is a block diagram showing the microcomputer shown in FIG. 6 focusing on the data flow. 図6に示したマイクロ・コンピュータ内CPUのアドレス空間の状態を例示するアドレスマップである。7 is an address map illustrating the state of the address space of the CPU in the microcomputer illustrated in FIG. 6. EP−ROMを内蔵した場合の書込制御プログラムを示すフローチャートである。It is a flowchart which shows the write-in control program at the time of incorporating EP-ROM.

符号の説明Explanation of symbols

1 CPU
2 RAM
3 マスクROM
4,41,42 EEP−ROM
5 I/O
6 周辺回路
7 書込制御回路
10 マイクロ・コンピュータ
1 CPU
2 RAM
3 Mask ROM
4, 41, 42 EEPROM-ROM
5 I / O
6 Peripheral circuit 7 Write control circuit 10 Microcomputer

Claims (4)

中央処理装置と、
上記中央処理装置によって実行されるプログラムを格納するプログラム領域とデータ領域とを有し、電気的に書込および消去可能な不揮発性メモリと、
RAMと、
外部とのデータの入出力が可能な入出力回路とを有し、
上記不揮発性メモリと上記RAMとは、異なるアドレス空間に配置され、
上記不揮発性メモリは、書込を行うための書込制御プログラムが格納され、
上記書込制御プログラムは、上記RAMへ転送可能で、
上記中央処理装置は、上記RAMへ転送された上記書込制御プログラムを実行することによって上記入出力回路を介して入力されたデータを、上記不揮発性メモリに書込可能であることを特徴とするマイクロ・コンピュータ。
A central processing unit;
A non-volatile memory having a program area and a data area for storing a program executed by the central processing unit, and electrically writable and erasable;
RAM,
An input / output circuit capable of inputting / outputting data from / to the outside;
The nonvolatile memory and the RAM are arranged in different address spaces,
The nonvolatile memory stores a write control program for performing writing,
The write control program can be transferred to the RAM,
The central processing unit can write data input via the input / output circuit to the nonvolatile memory by executing the write control program transferred to the RAM. Micro computer.
上記中央処理装置は、さらに、上記RAMへ転送された上記書込制御プログラムを実行することによって、上記RAMに格納されたデータを上記不揮発性メモリに書込可能であることを特徴とする請求項1に記載のマイクロ・コンピュータ。 The central processing unit is further capable of writing the data stored in the RAM into the nonvolatile memory by executing the write control program transferred to the RAM. 2. The microcomputer according to 1 . 中央処理装置と、
外部からデータを入出力可能な入出力回路と、
上記中央処理装置が実行するプログラムおよびデータを格納し、上記中央処理装置がアクセス可能なアドレス空間に割り付けられているメモリとを有し、
上記メモリは、不揮発性メモリが割り付けられている第1アドレス空間と、揮発性メモリが割り付けられている第2アドレス空間とを有し、
上記第1アドレス空間は、上記不揮発性メモリに対しデータおよびプログラムの書込制御を行うための書込制御プログラムを格納し、
上記不揮発性メモリの書込動作を行うとき、上記書込制御プログラムを上記第2アドレス空間に格納し、上記中央処理装置は、上記第2アドレス空間に格納された書込制御プログラムを実行することによって、上記入出力回路を介して入力されたデータの書込動作を行い、又は、上記中央処理装置は、上記第2アドレス空間に格納された書込制御プログラムを実行することによって、上記第2アドレス空間に格納されたデータを上記第1アドレス空間に書込動作を行うことが可能であることを特徴とするマイクロ・コンピュータ。
A central processing unit;
An input / output circuit capable of inputting and outputting data from the outside;
Storing a program and data executed by the central processing unit, and having a memory allocated to an address space accessible by the central processing unit,
The memory has a first address space to which a nonvolatile memory is allocated, and a second address space to which a volatile memory is allocated,
The first address space stores a write control program for performing write control of data and programs to the nonvolatile memory,
When performing a write operation of the nonvolatile memory, the write control program is stored in the second address space, and the central processing unit executes the write control program stored in the second address space The central processing unit executes the write control program stored in the second address space by performing the write operation of the data input via the input / output circuit. A microcomputer capable of writing data stored in an address space into the first address space .
中央処理装置と、
外部からデータを入出力可能な入出力回路と、
上記中央処理装置によって実行されるプログラムを格納するプログラム領域とデータ領域とを有し、電気的に書込および消去可能な不揮発性メモリと、
RAMとを有し、
上記不揮発性メモリと上記RAMとは、上記中央処理装置によってアクセス可能なアドレス空間に配置され、
上記不揮発性メモリは、上記不揮発性メモリの書込制御を行うための書込制御プログラムを格納し、
上記書込制御プログラムの実行に基づいて上記不揮発性メモリに対し書込まれるデータもしくはプログラムは、上記入出力回路を介して入力される、もしくは、上記RAMに格納されているデータであって、
上記不揮発性メモリに対し書込制御を行うとき、上記書込制御プログラムを上記RAMに格納し、上記中央処理装置は上記RAMに格納された書込制御プログラムを実行することによって、上記データの書込制御を行うことが可能であることを特徴とするマイクロ・コンピュータ。
A central processing unit;
An input / output circuit capable of inputting and outputting data from the outside;
A non-volatile memory having a program area and a data area for storing a program executed by the central processing unit, and electrically writable and erasable;
RAM,
The nonvolatile memory and the RAM are arranged in an address space accessible by the central processing unit,
The nonvolatile memory stores a writing control program for performing writing control of the nonvolatile memory,
Data or a program written to the nonvolatile memory based on the execution of the write control program is data input via the input / output circuit or stored in the RAM,
When performing write control on the nonvolatile memory, the write control program is stored in the RAM, and the central processing unit executes the write control program stored in the RAM, thereby writing the data. A microcomputer characterized in that it is possible to carry out the control of the recording .
JP2003407344A 2003-12-05 2003-12-05 Micro computer Expired - Lifetime JP3840510B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003407344A JP3840510B2 (en) 2003-12-05 2003-12-05 Micro computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003407344A JP3840510B2 (en) 2003-12-05 2003-12-05 Micro computer

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP11317935A Division JP2000200257A (en) 1999-01-01 1999-11-09 Microcomputer

Publications (2)

Publication Number Publication Date
JP2004094981A JP2004094981A (en) 2004-03-25
JP3840510B2 true JP3840510B2 (en) 2006-11-01

Family

ID=32064746

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003407344A Expired - Lifetime JP3840510B2 (en) 2003-12-05 2003-12-05 Micro computer

Country Status (1)

Country Link
JP (1) JP3840510B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4896479B2 (en) * 2005-09-30 2012-03-14 シチズンホールディングス株式会社 Data erasing method of semiconductor memory device

Also Published As

Publication number Publication date
JP2004094981A (en) 2004-03-25

Similar Documents

Publication Publication Date Title
KR100375217B1 (en) Microcontroller incorporating an electrically rewritable non-volatile memory
EP0991081B1 (en) Emulated EEPROM memory device and corresponding method
KR19980042796A (en) Microcomputer comprising flash EEPROM and method of erasing flash EEPROM
JP2009054275A (en) Flash memory device for storing multi-bit and single-bit data, method for programming the same, and memory system using the same
EP0239283B1 (en) Microcomputer
JP3840510B2 (en) Micro computer
KR100310486B1 (en) Microcumputer
JPWO2006040798A1 (en) Semiconductor integrated circuit device and electronic system
US20050243616A1 (en) Non-volatile semiconductor storage device
JP2650474B2 (en) Integrated circuit
JP3032207B2 (en) Micro computer
JP2865807B2 (en) Semiconductor storage system
JPS62131354A (en) Method for controlling information write on ic card
JP2000200257A (en) Microcomputer
JP2005107608A (en) Electronic device, nonvolatile memory, and method for rewriting data of nonvolatile memory
JPH10143434A (en) Semiconductor integrated circuit
JP2000276461A (en) Microcomputer
JP2003203063A (en) Microcomputer
KR100965079B1 (en) Non volatiel memory device
JPH11259357A (en) Semiconductor integrated device and nonvolatile memory writing system
JP3866269B2 (en) Microcomputer
JP4810108B2 (en) IC card and control method thereof
JPS62289999A (en) Data writing method
JP4018085B2 (en) Nonvolatile memory, memory card using the same, information processing apparatus, and software write protection control method for nonvolatile memory
JPH0697442B2 (en) Micro computer

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040622

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040823

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050322

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050523

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050608

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060606

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060703

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070818

Year of fee payment: 1