JP2003203064A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JP2003203064A
JP2003203064A JP2003023225A JP2003023225A JP2003203064A JP 2003203064 A JP2003203064 A JP 2003203064A JP 2003023225 A JP2003023225 A JP 2003023225A JP 2003023225 A JP2003023225 A JP 2003023225A JP 2003203064 A JP2003203064 A JP 2003203064A
Authority
JP
Japan
Prior art keywords
command
flash memory
data
microcomputer
write
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003023225A
Other languages
Japanese (ja)
Other versions
JP3810745B2 (en
Inventor
Kiyoshi Matsubara
清 松原
Narihisa Sato
斉尚 佐藤
Hirofumi Mukai
浩文 向井
Eiichi Ishikawa
栄一 石川
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2003023225A priority Critical patent/JP3810745B2/en
Publication of JP2003203064A publication Critical patent/JP2003203064A/en
Application granted granted Critical
Publication of JP3810745B2 publication Critical patent/JP3810745B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a microcomputer capable of rewriting a built-in flash memory by utilizing a generally used PROM writer. <P>SOLUTION: This microcomputer 1 is provided with a central processor 10 and the electrically writable flash memory FMRY2 on one semiconductor base, and has a first operation mode operated in accordance with the command inputted from an external device 30. When a read command for reading out the information stored in the flash memory from the external device is inputted to the microcomputer in the first operation mode, the central processor is separated from a bus. Whereby the external device can freely read large volumes of flash memory built in the microcomputer on the basis of the read command in accordance with its specification. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、電気的に書換え可能な
不揮発性のフラッシュメモリを内蔵したデータ処理装
置、さらには当該内蔵フラッシュメモリを単体フラッシ
ュメモリと同様にPROMライタのような外部装置で書
換え可能にする技術に係り、例えばマイクロコンピュー
タに適用して有効な技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing device having an electrically rewritable non-volatile flash memory built-in, and the built-in flash memory can be used as an external device such as a PROM writer as well as a single flash memory. The present invention relates to a rewritable technology, for example, a technology effectively applied to a microcomputer.

【0002】[0002]

【従来の技術】特開平1−161469号には、プログ
ラム可能な不揮発性メモリとしてEPROM(イレーザ
ブル・アンド・プログラマブル・リード・オンリ・メモ
リ)またはEEPROM(エレクトリカリ・イレーザブ
ル・アンド・プログラマブル・リード・オンリ・メモ
リ)を単一の半導体チップに搭載したマイクロコンピュ
ータについて記載されている。そのようなマイクロコン
ピュータにオン・チップ化された不揮発性メモリにはプ
ログラムやデータが保持される。EPROMは紫外線に
より記憶情報を消去するものであるから、それを実装シ
ステムから取り外さなければ書換えを行うことができな
い。EEPROMは電気的に消去・書込みを行うことが
できるので、システムに実装された状態でその記憶情報
を書換えることができるが、それを構成するメモリセル
は、MNOS(メタル・ナイトライド・オキサイド・セ
ミコンダクタ)のような記憶素子のほかに選択トランジ
スタを必要とするため、EPROMのメモリセルに比べ
て例えば2.5倍から5倍程度の大きさになり、相対的
に大きなチップ占有面積を必要とする。
2. Description of the Related Art JP-A-1-161469 discloses an EPROM (erasable and programmable read only memory) or an EEPROM (electrically erasable and programmable read only memory) as a programmable nonvolatile memory. -A memory) is mounted on a single semiconductor chip. Programs and data are held in a non-volatile memory which is on-chip in such a microcomputer. Since the EPROM erases stored information by ultraviolet rays, rewriting cannot be performed without removing it from the mounting system. Since the EEPROM can be electrically erased and written, its stored information can be rewritten in the state where it is mounted in the system. However, the memory cell constituting the EEPROM is MNOS (Metal Nitride Oxide). Since a selection transistor is required in addition to a memory element such as a semiconductor, the size is, for example, about 2.5 to 5 times that of an EPROM memory cell, and a relatively large chip occupation area is required. To do.

【0003】特開平2−289997号には一括消去型
EEPROMについて記載されている。この一括消去型
EEPROMは本明細書におけるフラッシュメモリと同
意義に把握することができる。フラッシュメモリは、電
気的な消去・書込みによって情報を書換え可能であっ
て、EPROMと同様にそのメモリセルを1個のトラン
ジスタで構成することができ、メモリセルの全てを一括
して、またはメモリセルのブロックを一括して電気的に
消去する機能を持つ。したがって、フラッシュメモリ
は、システムに実装された状態(オンボード)でそれの
記憶情報を書換えることができると共に、その一括消去
機能により書換え時間の短縮を図ることができ、さら
に、チップ占有面積の低減にも寄与する。
Japanese Unexamined Patent Publication No. 2-289997 discloses a batch erase type EEPROM. This collective erasing type EEPROM can be understood in the same meaning as the flash memory in this specification. A flash memory can rewrite information by electrical erasing / writing, and like the EPROM, its memory cell can be configured by one transistor, and all the memory cells can be collectively or It has a function to electrically erase all blocks. Therefore, the flash memory can rewrite the stored information in a state where it is mounted on the system (onboard), and can shorten the rewriting time by its batch erasing function, and further, it can reduce the chip occupation area. It also contributes to reduction.

【0004】[0004]

【発明が解決しようとする課題】本発明者はフラッシュ
メモリを搭載したマイクロコンピュータについて検討し
た。フラッシュメモリを内蔵したマイクロコンピュータ
は、オンボード書き換えが可能であるが、ユーザの使い
方を考えた場合には初期の書き込みはオンボードではな
く基板実装前にPROMライタのような書込み装置を利
用して書き込んだ方が効率のよい場合がある。そこで、
斯るフラッシュメモリ内蔵マイクロコンピュータにおい
ても、ソケットアダプタを介してPROMライタのよう
なEPROMやEEPROMの書込みなどに汎用的に利
用される書込み装置に結合し、この書込み装置で書込み
可能な機能をサポートすることの必要性を見出した。こ
のとき、フラッシュメモリの書込み並びに消去は、EP
ROMやEEPROMに比べて複雑な制御が要求され
る。特に消去の場合フラッシュメモリ特有の問題である
過消去(消去を行い過ぎるとメモリセルトランジスタの
しきい値電圧が小さく成り過ぎ、さらには負になって、
正常な読み出しができなくなる現象)を避けるため、消
去前に書込みレベルを均一化するためのプレライトを行
ったり、ベリファイを行いながら少しずつ消去を行うと
いった消去手法が必要になる。このような処理のための
制御手順を汎用的なPROMライター側に委ねようとす
ると無理があり、また、フラッシュメモリ内蔵マイクロ
コンピュータ専用のPROMライタのような書込み装置
で対処することも現実的ではない。
The present inventor has studied a microcomputer equipped with a flash memory. A microcomputer with a built-in flash memory is capable of on-board rewriting, but considering the user's usage, initial writing is not on-board, but using a writing device such as a PROM writer before board mounting. It may be more efficient to write it. Therefore,
Even in such a microcomputer with a built-in flash memory, it is connected to a writing device generally used for writing in EPROM or EEPROM such as a PROM writer via a socket adapter, and supports a function writable by the writing device. I found the need for that. At this time, the writing and erasing of the flash memory is performed by the EP
Complex control is required as compared with ROM and EEPROM. In particular, in the case of erasing, over-erasing, which is a problem peculiar to flash memory (if erasing too much, the threshold voltage of the memory cell transistor becomes too small and becomes negative,
In order to avoid such a phenomenon that normal reading cannot be performed), it is necessary to perform an erasing method such as pre-writing for equalizing the write level before erasing or erasing little by little while performing verification. It is unreasonable to entrust the control procedure for such processing to the general-purpose PROM writer side, and it is not realistic to deal with it with a writing device such as a PROM writer dedicated to a microcomputer with a built-in flash memory. .

【0005】本発明の目的は、回路基板実装前にPRO
Mライタのような外部装置を利用して情報書込みを行う
ときの使い勝手の良好なフラッシュメモリ内蔵型のデー
タ処理装置を提供することにある。本発明の別の目的
は、汎用的に利用されるPROMライタのような外部装
置を利用して内蔵フラッシュメモリを書換え可能にする
データ処理装置を提供することにある。さらにこのと
き、外部装置による情報書込みのために新たに内蔵すべ
き回路規模の増大を極力抑えたデータ処理装置を提供す
ることにある。
An object of the present invention is to provide PRO before mounting on a circuit board.
An object of the present invention is to provide a data processing device with a built-in flash memory, which is easy to use when writing information using an external device such as an M writer. Another object of the present invention is to provide a data processing device capable of rewriting the built-in flash memory by utilizing an external device such as a PROM writer which is used for general purposes. Further, at this time, it is another object of the present invention to provide a data processing device which suppresses an increase in the circuit scale to be newly built in for writing information by an external device as much as possible.

【0006】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

【0007】[0007]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The outline of the representative one of the inventions disclosed in the present application will be briefly described as follows.

【0008】すなわち、中央処理装置と、電気的に書換
え可能な不揮発性のフラッシュメモリとを、1個の半導
体基板に含み、外部装置の指示に従って内蔵フラッシュ
メモリを書換え可能にする動作モードを備え、その動作
モードが設定された状態において外部から書込み可能に
されるコマンドラッチ手段と、これにラッチされたコマ
ンドを解析するコマンド解析手段と、解析された内容に
応じてフラッシュメモリの書換えのための手順制御を行
う制御手段とを、備えてデータ処理装置を構成する。
That is, a central processing unit and an electrically rewritable non-volatile flash memory are included in one semiconductor substrate, and an operation mode for rewriting the built-in flash memory according to an instruction of an external device is provided, A command latch unit that is externally writable in a state where the operation mode is set, a command analysis unit that analyzes the command latched therein, and a procedure for rewriting the flash memory according to the analyzed content. A data processing device is configured by including control means for performing control.

【0009】外部装置によるフラッシュメモリの書換え
中において内蔵中央処理装置は、それとは別の処理を行
わなければならない必然性はなく、実質的に休眠状態で
あっても差し支えない。このとき、前記コマンド解析手
段や制御手段での処理を、内蔵中央処理装置に実行させ
ることによって、コマンド解析手段や制御手段のような
書換えのための専用回路を削減する。
While the flash memory is being rewritten by the external device, the built-in central processing unit does not necessarily have to perform another process, and may be in a sleep state substantially. At this time, by causing the built-in central processing unit to execute the processing by the command analysis means and the control means, the dedicated circuit for rewriting such as the command analysis means and the control means is reduced.

【0010】汎用的に利用されるEPROMライタのよ
うな外部装置は、少なくとも、不揮発性記憶素子に対す
る書換え用高電圧を印加し、書換えのためのアドレスや
データを書込み信号などに従ってフラッシュメモリを含
む対象半導体装置(LSI)に供給するようになってい
る。このような外部装置は、コマンド、データ、及びア
ドレスを、データ処理装置に内蔵された中央処理装置と
は非同期で供給してくる。そこで、前記コマンドラッチ
手段にコマンドが書き込まれたことを示すフラグ手段
と、このフラグ手段が前記コマンドラッチ状態を示すと
きに、前記コマンドラッチ手段に代えて外部から書込み
可能にされるデータラッチ手段と、外部からアドレス情
報が書込み可能にされるアドレスラッチ手段とを更に備
え、外部装置から相互に別サイクルで書き込まれるコマ
ンドとデータ情報とのラッチ手段上での衝突を防止する
と共に、前記中央処理装置は、前記フラグ手段のコマン
ドラッチ状態に基づいてコマンドラッチ手段のコマンド
をリードするものである。
An external device such as an EPROM writer used for general purposes is a target including at least a flash memory for applying a high voltage for rewriting to a non-volatile memory element and for writing an address and data for rewriting according to a write signal. It is designed to be supplied to a semiconductor device (LSI). Such an external device supplies commands, data, and addresses asynchronously with the central processing unit incorporated in the data processing device. Therefore, there is provided flag means for indicating that a command has been written in the command latch means, and data latch means that is externally writable in place of the command latch means when the flag means indicates the command latch state. And an address latching means capable of writing address information from the outside, thereby preventing a collision between a command and data information written in a different cycle from the external device on the latching means, and the central processing unit. Is for reading the command of the command latch means based on the command latch state of the flag means.

【0011】前記フラグ手段に対する制御も中央処理装
置に委ねるならば、中央処理装置はバスサイクルを起動
して常にコマンドラッチ手段の内容をモニタしなければ
ならず、動作上無駄を生ずる。そこで、前記コマンドラ
ッチ手段のラッチ内容をデコードし、前記所定のコマン
ドをデコードすることによって前記フラグ手段をコマン
ドラッチ状態にセットするコマンドデコーダを備える。
If the control of the flag means is also entrusted to the central processing unit, the central processing unit must activate the bus cycle and constantly monitor the contents of the command latching means, resulting in a waste of operation. Therefore, a command decoder is provided which decodes the latch contents of the command latch means and decodes the predetermined command to set the flag means to the command latch state.

【0012】ラッチした全てのコマンドを中央処理装置
が解析していたのではそのコマンドで指示される動作が
タイミング上間に合わないものがある。例えば、フラッ
シュメモリからデータを読出すようなリードコマンドで
ある。これに対処するため、コマンドラッチ手段、デー
タラッチ手段、及びアドレスラッチ手段がフラッシュメ
モリと中央処理装置に接続される状態と、前記コマンド
ラッチ手段、データラッチ手段、及びアドレスラッチ手
段がフラッシュメモリに接続され中央処理装置には非接
続とされる状態とを、選択可能なゲート手段を内部バス
に設け、そのゲート手段を、前記所定のコマンド以外の
コマンドをデコードすることによって前記コマンドデコ
ーダで生成される信号によって制御するようにする。斯
るゲート手段が開いた状態において、フラッシュメモリ
はデータ処理装置の外部から直接リードアクセス可能に
される。前記リードコマンドが所定のコマンド以外のコ
マンドとされる。
If the central processing unit analyzes all the latched commands, the operation instructed by the commands may not meet the timing. For example, it is a read command for reading data from the flash memory. In order to deal with this, the command latch means, the data latch means, and the address latch means are connected to the flash memory and the central processing unit, and the command latch means, the data latch means, and the address latch means are connected to the flash memory. A state in which the central processing unit is not connected to the central processing unit is provided in the internal bus with selectable gate means, and the gate means is generated by the command decoder by decoding a command other than the predetermined command. Be controlled by signals. When the gate means is open, the flash memory can be directly read-accessed from the outside of the data processing device. The read command is a command other than the predetermined command.

【0013】前記中央処理装置が実行すべきフラッシュ
メモリ書換えのための手順制御用プログラムは、フラッ
シュメモリに予め格納しておき、外部装置による書換え
動作モードの設定に呼応してそのプログラムをRAMに
転送し、そのRAMに転送された前記プログラムを中央
処理装置に実行させることができる。
The procedure control program for rewriting the flash memory to be executed by the central processing unit is stored in advance in the flash memory, and the program is transferred to the RAM in response to the setting of the rewriting operation mode by the external device. However, the program transferred to the RAM can be executed by the central processing unit.

【0014】用途に応じてフラッシュメモリに格納すべ
き情報量がその情報の種類例えばプログラム、データテ
ーブル、制御データなどに応じて相違されることを考慮
した場合、システム(回路基板)への実装後、内蔵フラ
ッシュメモリの保持情報の部分的若しくは一部の書換え
に伴って、メモリブロックを一括消去した後の書込み動
作の無駄をなくして、書換え効率を向上させるには、前
記フラッシュメモリにおける一括消去可能な単位とし
て、相互に記憶容量の相違される複数個のメモリブロッ
クを割当てるとよい。
Considering that the amount of information to be stored in the flash memory differs depending on the type of information, such as a program, a data table, and control data, depending on the application, after mounting on a system (circuit board). In order to improve the rewriting efficiency by eliminating the waste of the write operation after collectively erasing the memory block in accordance with the partial or partial rewriting of the information held in the built-in flash memory, the batch erasing in the flash memory is possible. As a unit, a plurality of memory blocks having different storage capacities may be allocated.

【0015】[0015]

【作用】上記した手段によれば、外部装置から非同期で
与えられるコマンドに応じた書換えシーケンスを内蔵回
路で実現することは、外部装置にとってデータ情報とア
ドレス情報を与える前に、データ情報を与えるのと同様
にしてコマンドをデータ処理装置に与えればよく、汎用
的に利用されるPROMライタのような外部装置にソケ
ットアダプタを介して結合することによって、データ処
理装置の内蔵フラッシュメモリに対する情報書込みを可
能にする。
According to the above-mentioned means, the realization of the rewriting sequence according to the command asynchronously given from the external device by the built-in circuit means that the data information is given to the external device before the data information and the address information are given. The command can be given to the data processing device in the same manner as described above, and information can be written to the built-in flash memory of the data processing device by connecting to a general-purpose-used external device such as a PROM writer via a socket adapter. To

【0016】コマンドによって指示される書換えのため
のシーケンスを内蔵中央処理装置が制御することは、そ
の制御のための専用回路を不要若しくは削減し、データ
処理装置のチップ面積低減を実現する。更に、書換えの
ための制御シーケンスは、中央処理装置が実行すべきソ
フトウェアで変更可能であり、このことは、フラッシュ
メモリを構成する記憶素子の特性に合わせて書き込み時
間などの条件設定を可能にする。
The control of the rewriting sequence instructed by the command by the built-in central processing unit eliminates or eliminates the dedicated circuit for the control, and realizes the reduction of the chip area of the data processing unit. Furthermore, the control sequence for rewriting can be changed by the software that the central processing unit should execute, which enables setting of conditions such as the write time according to the characteristics of the storage elements that make up the flash memory. .

【0017】[0017]

【実施例】本発明の実施例を以下の項目にしたがって説
明する。 〔1〕フラッシュメモリの原理 〔2〕記憶容量を相違させた複数メモリブロック化 〔3〕PROMライタによるコマンド方式の情報書込み
原理 〔4〕マイクロコンピュータ 〔5〕内蔵フラッシュメモリ 〔6〕コマンド方式対応ハードウェア 〔7〕PROMライタによる情報書込みなどのコマンド
仕様 〔8〕オンボードでの情報書込み
EXAMPLES Examples of the present invention will be described in accordance with the following items. [1] Principle of flash memory [2] Multiple memory blocks with different storage capacities [3] Principle of command-based information writing by PROM writer [4] Microcomputer [5] Built-in flash memory [6] Command-compatible hardware Wear [7] Command specifications such as information writing by PROM writer [8] On-board information writing

〔9〕コマンド方式による情報書込み動作(コマンド対
応) 〔10〕コマンド方式による情報書込み時のPROMラ
イタの動作 〔11〕コマンド方式による情報書き込み時のCPUの
動作 〔12〕PROMライタによる書込み仕様の単体フラッ
シュメモリLSIとの互換性
[9] Information writing operation by command method (command correspondence) [10] Operation of PROM writer at information writing by command method [11] CPU operation at information writing by command method [12] Single unit of writing specification by PROM writer Compatibility with flash memory LSI

【0018】〔1〕フラッシュメモリの原理[1] Principle of flash memory

【0019】図31にはフラッシュメモリの原理が示さ
れる。同図(A)に例示的に示されたメモリセルは、2
層ゲート構造の絶縁ゲート型電界効果トランジスタによ
り構成されている。同図において、1はP型シリコン基
板、2は上記シリコン基板1に形成されたP型半導体領
域、3,4はN型半導体領域である。5はトンネル絶縁
膜としての薄い酸化膜6(例えば厚さ10nm)を介し
て上記P型シリコン基板1上に形成されたフローティン
グゲート、7は酸化膜8を介して上記フローティングゲ
ート5上に形成されたコントロールゲートである。ソー
スは4によって構成され、ドレインは3,2によって構
成される。このメモリセルに記憶される情報は、実質的
にしきい値電圧の変化としてトランジスタに保持され
る。以下、特に述べないかぎり、メモリセルにおいて、
情報を記憶するトランジスタ(以下メモリセルトランジ
スタとも記す)がNチャンネル型の場合について述べ
る。
FIG. 31 shows the principle of the flash memory. The memory cell exemplarily shown in FIG.
It is composed of an insulated gate field effect transistor having a layer gate structure. In the figure, 1 is a P-type silicon substrate, 2 is a P-type semiconductor region formed on the silicon substrate 1, and 3 and 4 are N-type semiconductor regions. 5 is a floating gate formed on the P-type silicon substrate 1 via a thin oxide film 6 (for example, 10 nm thick) as a tunnel insulating film, and 7 is formed on the floating gate 5 via an oxide film 8. It is a control gate. The source is constituted by 4, and the drain is constituted by 3, 2. The information stored in this memory cell is substantially held in the transistor as a change in threshold voltage. Hereinafter, unless otherwise stated, in the memory cell,
A case where a transistor for storing information (hereinafter also referred to as a memory cell transistor) is an N-channel type will be described.

【0020】メモリセルへの情報の書込み動作は、例え
ばコントロールゲート7及びドレインに高圧を印加し
て、アバランシェ注入によりドレイン側からフローティ
ングゲート5に電子を注入することで実現される。この
書込み動作により記憶トランジスタは、図31の(B)
に示されるように、そのコントロールゲート7からみた
しきい値電圧が、書込み動作を行わなかった消去状態の
記憶トランジスタに比べて高くなる。
The operation of writing information to the memory cell is realized, for example, by applying a high voltage to the control gate 7 and the drain and injecting electrons from the drain side to the floating gate 5 by avalanche injection. By this write operation, the memory transistor is changed to the one shown in FIG.
As shown in FIG. 5, the threshold voltage seen from the control gate 7 becomes higher than that of the memory transistor in the erased state in which the write operation is not performed.

【0021】一方消去動作は、例えばソースに高圧を印
加して、トンネル現象によりフローティングゲート5か
らソース側に電子を引き抜くことによって実現される。
図31の(B)に示されるように、消去動作により記憶
トランジスタはそのコントロールゲート7からみたしき
い値電圧が低くされる。図31の(B)では、書込み並
びに消去状態の何れにおいてもメモリセルトランジスタ
のしきい値は正の電圧レベルにされる。すなわちワード
線からコントロールゲート7に与えられるワード線選択
レベルに対して、書込み状態のしきい値電圧は高くさ
れ、消去状態のしきい値電圧は低くされる。双方のしき
い値電圧とワード線選択レベルとがそのような関係を持
つことによって、選択トランジスタを採用することなく
1個のトランジスタでメモリセルを構成することができ
る。記憶情報を電気的に消去する場合においては、フロ
ーティングゲート5に蓄積された電子をソース電極に引
く抜くことにより、記憶情報の消去が行われるため、比
較的長い時間、消去動作を続けると、書込み動作の際に
フローティングゲート5に注入した電子の量よりも多く
の電子が引く抜かれることになる。そのため、電気的消
去を比較的長い時間続けるような過消去を行うと、メモ
リセルトランジスタのしきい値電圧は例えば負のレベル
になって、ワード線の非選択レベルにおいても選択され
るような不都合を生ずる。尚、書込みも消去と同様にト
ンネル電流を利用して行うこともできる。
On the other hand, the erase operation is realized, for example, by applying a high voltage to the source and extracting electrons from the floating gate 5 to the source side by the tunnel phenomenon.
As shown in FIG. 31B, the threshold voltage seen from the control gate 7 of the memory transistor is lowered by the erase operation. In FIG. 31B, the threshold voltage of the memory cell transistor is set to a positive voltage level in both the write and erase states. That is, the threshold voltage in the written state is raised and the threshold voltage in the erased state is lowered with respect to the word line selection level applied from the word line to control gate 7. By having such a relationship between both threshold voltages and the word line selection level, it is possible to configure a memory cell with one transistor without employing a selection transistor. In the case of electrically erasing the stored information, the stored information is erased by pulling out the electrons accumulated in the floating gate 5 to the source electrode. Therefore, if the erase operation is continued for a relatively long time, the write operation is performed. More electrons than the amount of electrons injected into the floating gate 5 during operation will be extracted. Therefore, when over-erasing is performed such that electrical erasing is continued for a relatively long time, the threshold voltage of the memory cell transistor becomes, for example, a negative level, and is selected even at the non-selected level of the word line. Cause Note that writing can be performed by utilizing a tunnel current as in the case of erasing.

【0022】読み出し動作においては、上記メモリセル
に対して弱い書込み、すなわち、フローティングゲート
5に対して不所望なキャリアの注入が行われないよう
に、ドレイン及びコントロールゲート7に印加される電
圧が比較的低い値に制限される。例えば、1V程度の低
電圧がドレインに印加されるとともに、コントロールゲ
ート7に5V程度の低電圧が印加される。これらの印加
電圧によってメモリセルトランジスタを流れるチャンネ
ル電流の大小を検出することにより、メモリセルに記憶
されている情報の論理値“0”、“1”を判定すること
ができる。
In the read operation, the voltages applied to the drain and the control gate 7 are compared so that weak writing to the memory cell, that is, undesired carrier injection to the floating gate 5 is not performed. Restricted to very low values. For example, a low voltage of about 1 V is applied to the drain and a low voltage of about 5 V is applied to the control gate 7. By detecting the magnitude of the channel current flowing through the memory cell transistor by these applied voltages, the logical values "0" and "1" of the information stored in the memory cell can be determined.

【0023】図32は前記メモリセルトランジスタを用
いたメモリセルアレイの構成原理を示す。同図には代表
的に4個のメモリセルトランジスタQ1乃至Q4が示さ
れる。X,Y方向にマトリクス配置されたメモリセルに
おいて、同じ行に配置されたメモリセルトランジスタQ
1,Q2(Q3,Q4)のコントロールゲート(メモリ
セルの選択ゲート)は、それぞれ対応するワード線WL
1(WL2)に接続され、同じ列に配置された記憶トラ
ンジスタQ1,Q3(Q2,Q4)のドレイン領域(メ
モリセルの入出力ノード)は、それぞれ対応するデータ
線DL1(DL2)に接続されている。上記記憶トラン
ジスタQ1,Q3(Q2,Q4)のソース領域は、ソー
ス線SL1(SL2)に結合される。
FIG. 32 shows the principle of construction of a memory cell array using the memory cell transistors. In the figure, four memory cell transistors Q1 to Q4 are shown as representatives. In the memory cells arranged in a matrix in the X and Y directions, the memory cell transistors Q arranged in the same row
1, Q2 (Q3, Q4) control gates (memory cell selection gates) are respectively associated with corresponding word lines WL.
1 (WL2), and the drain regions (memory cell input / output nodes) of the memory transistors Q1, Q3 (Q2, Q4) arranged in the same column are connected to the corresponding data lines DL1 (DL2), respectively. There is. The source regions of the storage transistors Q1, Q3 (Q2, Q4) are coupled to the source line SL1 (SL2).

【0024】図33にはメモリセルに対する消去動作並
びに書込み動作のための電圧条件の一例が示される。同
図においてメモリ素子はメモリセルトランジスタを意味
し、ゲートはメモリセルトランジスタの選択ゲートとし
てのコントロールゲートを意味する。同図において負電
圧方式の消去はコントロールゲートに例えば−10Vの
ような負電圧を印加することによって消去に必要な高電
界を形成する。同図に例示される電圧条件から明らかな
ように、正電圧方式の消去にあっては少なくともソース
が共通接続されたメモリセルに対して一括消去を行うこ
とができる。したがって図32の構成において、ソース
線SL1,SL2が接続されていれば、4個のメモリセ
ルQ1乃至Q4は一括消去可能にされる。この場合、同
一ソース線につながるメモリセルトランジスタの数を変
えることによりメモリブロックのサイズを任意に設定す
ることができる。ソース線分割方式には図32に代表的
に示されるようなデータ線を単位とする場合(共通ソー
ス線をデータ線方向に延在させる)の他にワード線を単
位とする場合(共通ソース線をワード線方向に延在させ
る)がある。一方、負電圧方式の消去にあっては、コン
トロールゲートが共通接続されたメモリセルに対して一
括消去を行うことができる。
FIG. 33 shows an example of voltage conditions for the erase operation and the write operation for the memory cell. In the figure, the memory element means a memory cell transistor, and the gate means a control gate as a selection gate of the memory cell transistor. In the figure, in the negative voltage type erasing, a high electric field necessary for erasing is formed by applying a negative voltage such as −10 V to the control gate. As is clear from the voltage conditions illustrated in the figure, in the case of erasing by the positive voltage method, it is possible to carry out batch erasing at least for the memory cells whose sources are commonly connected. Therefore, in the configuration of FIG. 32, if the source lines SL1 and SL2 are connected, the four memory cells Q1 to Q4 can be collectively erased. In this case, the size of the memory block can be arbitrarily set by changing the number of memory cell transistors connected to the same source line. In the source line division method, in addition to the case where the data line as shown in FIG. 32 is used as a unit (the common source line is extended in the data line direction), the case where the word line is used as a unit (the common source line) Is extended in the word line direction). On the other hand, in the erase of the negative voltage system, it is possible to collectively erase the memory cells to which the control gates are commonly connected.

【0025】〔2〕記憶容量を相違させた複数メモリブ
ロック化
[2] Forming a plurality of memory blocks with different storage capacities

【0026】図34には一括消去可能なメモリブロック
の記憶容量を相違させたフラッシュメモリの一例回路ブ
ロック図が示される。
FIG. 34 shows a circuit block diagram of an example of a flash memory in which the memory capacities of the memory blocks that can be erased collectively are different.

【0027】同図に示されるフラッシュメモリFMRY
1は、8ビットのデータ入出力端子D0〜D7を有し、
各データ入出力端子毎にメモリアレイARY0〜ARY
7を備える。メモリアレイARY0〜ARY7は、特に
制限されないが、相対的に記憶容量の大きなメモリブロ
ックLMBと相対的に記憶容量の小さなメモリブロック
SMBとに2分割されている。図には代表的にメモリア
レイARY0の詳細が示されているが、その他のメモリ
アレイARY1〜ARY7も同様に構成されている。
Flash memory FMRY shown in FIG.
1 has 8-bit data input / output terminals D0 to D7,
Memory arrays ARY0 to ARY for each data input / output terminal
7 is provided. Although not particularly limited, the memory arrays ARY0 to ARY7 are divided into two, a memory block LMB having a relatively large storage capacity and a memory block SMB having a relatively small storage capacity. Although the details of the memory array ARY0 are representatively shown in the drawing, the other memory arrays ARY1 to ARY7 are similarly configured.

【0028】夫々のメモリアレイARY0〜ARY7に
は前記図31で説明した2層ゲート構造の絶縁ゲート型
電界効果トランジスタによって構成されたメモリセルM
Cがマトリクス配置されている。同図においてWL0〜
WLnは全てのメモリアレイARY0〜ARY7に共通
のワード線である。同一行に配置されたメモリセルのコ
ントロールゲートは、それぞれ対応するワード線に接続
される。夫々のメモリアレイARY0〜ARY7におい
て、同一列に配置されたメモリセルMCのドレイン領域
は、それぞれ対応するデータ線DL0〜DL7に接続さ
れている。メモリブロックSMBを構成するメモリセル
MCのソース領域はソース線SL1に共通接続され、メ
モリブロックLMBを構成するメモリセルMCのソース
領域はソース線SL2に共通接続されている。
In each of the memory arrays ARY0 to ARY7, a memory cell M composed of the insulated gate field effect transistor having the two-layer gate structure described with reference to FIG.
Cs are arranged in a matrix. In the figure, WL0
WLn is a word line common to all the memory arrays ARY0 to ARY7. The control gates of the memory cells arranged in the same row are connected to the corresponding word lines. In each of the memory arrays ARY0 to ARY7, the drain regions of the memory cells MC arranged in the same column are connected to the corresponding data lines DL0 to DL7. The source regions of the memory cells MC forming the memory block SMB are commonly connected to the source line SL1, and the source regions of the memory cells MC forming the memory block LMB are commonly connected to the source line SL2.

【0029】前記ソース線SL1,SL2には電圧出力
回路VOUT1,VOUT2から消去に利用される高電
圧Vppが供給される。電圧出力回路VOUT1,VO
UT2の出力動作は、消去ブロック指定レジスタのビッ
トB1,B2の値によって選択される。例えば消去ブロ
ック指定レジスタのビットB1に”1”が設定されるこ
とによって各メモリアレイARY0〜ARY7の小メモ
リブロックSMBだけが一括消去可能にされる。消去ブ
ロック指定レジスタのビットB2に”1”が設定された
場合は、各メモリアレイARY0〜ARY7の大メモリ
ブロックLMBだけが一括消去可能にされる。双方のビ
ットB1,B2に”1”が設定されたときはフラッシュ
メモリ全体が一括消去可能にされる。
The source lines SL1 and SL2 are supplied with the high voltage Vpp used for erasing from the voltage output circuits VOUT1 and VOUT2. Voltage output circuit VOUT1, VO
The output operation of UT2 is selected by the values of bits B1 and B2 of the erase block designation register. For example, by setting "1" to the bit B1 of the erase block designating register, only the small memory blocks SMB of the memory arrays ARY0 to ARY7 can be collectively erased. When "1" is set to the bit B2 of the erase block designation register, only the large memory block LMB of each memory array ARY0 to ARY7 can be collectively erased. When "1" is set to both bits B1 and B2, the entire flash memory can be erased at once.

【0030】前記ワード線WL0〜WLnの選択は、X
アドレスバッファXABUFF及びXアドレスラッチX
ALATを介して取り込まれるXアドレス信号AXをX
アドレスデコーダXADECが解読することによって行
われる。ワードドライバWDRVはXアドレスデコーダ
XADECから出力される選択信号に基づいてワード線
を駆動する。データ読出し動作においてワードドライバ
WDRVは、電圧選択回路VSELから供給される5V
のような電圧Vccと0Vのような接地電位とを電源と
して動作され、選択されるべきワード線を電圧Vccに
よって選択レベルに駆動し、非選択とされるべきワード
線を接地電位のような非選択レベルに維持させる。デー
タの書き込み動作においてワードドライバWDRVは、
電圧選択回路VSELから供給される12Vのような電
圧Vppと0Vのような接地電位とを電源として動作さ
れ、選択されるべきワード線を12Vのような書き込み
用高電圧レベルに駆動する。データの消去動作において
ワードドライバWDRVの出力は0Vのような低い電圧
レベルにされる。
The word lines WL0 to WLn are selected by X
Address buffer XABUFF and X address latch X
X address signal AX taken in via ALAT
It is performed by decoding by the address decoder XADEC. The word driver WDRV drives the word line based on the selection signal output from the X address decoder XADEC. In the data read operation, the word driver WDRV is supplied with 5V supplied from the voltage selection circuit VSEL.
Is operated by using a voltage Vcc like this and a ground potential like 0V as a power source, a word line to be selected is driven to a selection level by the voltage Vcc, and a word line to be deselected is not connected to a ground potential such as ground potential. Maintain the selected level. In the data write operation, the word driver WDRV
It operates by using a voltage Vpp such as 12V supplied from the voltage selection circuit VSEL and a ground potential such as 0V as a power source, and drives a word line to be selected to a high voltage level for writing such as 12V. In the data erasing operation, the output of the word driver WDRV is set to a low voltage level such as 0V.

【0031】夫々のメモリアレイARY0〜ARY7に
おいて前記データ線DL0〜DL7はY選択スイッチY
S0〜YS7を介して共通データ線CDに共通接続され
る。Y選択スイッチYS0〜YS7のスイッチ制御は、
YアドレスバッファYABUFF及びYアドレスラッチ
YALATを介して取り込まれるYアドレス信号AYを
YアドレスデコーダYADECが解読することによって
行われる。YアドレスデコーダYADECの出力選択信
号は全てのメモリアレイARY0〜ARY7に共通に供
給される。したがって、YアドレスデコーダYADEC
の出力選択信号のうちの何れか一つが選択レベルにされ
ることにより、各メモリアレイARY0〜ARY7にお
いて共通データ線CDには1本のデータ線が接続され
る。
In each of the memory arrays ARY0 to ARY7, the data lines DL0 to DL7 have a Y selection switch Y.
It is commonly connected to the common data line CD via S0 to YS7. The switch control of the Y selection switches YS0 to YS7 is
This is performed by the Y address decoder YADEC decoding the Y address signal AY fetched through the Y address buffer YABUFF and the Y address latch YALAT. The output selection signal of the Y address decoder YADEC is commonly supplied to all the memory arrays ARY0 to ARY7. Therefore, the Y address decoder YADEC
By setting any one of the output selection signals of 1 to the selection level, one data line is connected to the common data line CD in each of the memory arrays ARY0 to ARY7.

【0032】メモリセルMCから共通データ線CDに読
出されたデータは選択スイッチRSを介してセンスアン
プSAに与えられ、ここで増幅されて、データ出力ラッ
チDOLを介してデータ出力バッファDOBから外部に
出力される。前記選択スイッチRSは読出し動作に同期
して選択レベルにされる。外部から供給される書き込み
データはデータ入力バッファDIBを介してデータ入力
ラッチDILに保持される。データ入力ラッチDILに
保持されたデータが”0”のとき、書き込み回路WRは
選択スイッチWSを介して共通データ線CDに書き込み
用の高電圧を供給する。この書き込み用高電圧はYアド
レス信号AYによって選択されたデータ線を通して、X
アドレス信号AXでコントロールゲートに高電圧が印加
されるメモリセルのドレインに供給され、これによって
当該メモリセルが書き込みされる。前記選択スイッチW
Sは書き込み動作に同期して選択レベルにされる。書き
込み消去の各種タイミングや電圧の選択制御は書き込み
消去制御回路WECONTが生成する。
The data read from the memory cell MC to the common data line CD is given to the sense amplifier SA via the selection switch RS, amplified there, and then outputted from the data output buffer DOB to the outside via the data output latch DOL. Is output. The selection switch RS is set to the selection level in synchronization with the read operation. The write data supplied from the outside is held in the data input latch DIL via the data input buffer DIB. When the data held in the data input latch DIL is "0", the write circuit WR supplies a high voltage for writing to the common data line CD via the selection switch WS. This high voltage for writing is applied to the X line through the data line selected by the Y address signal AY.
The address signal AX is supplied to the drain of the memory cell to which a high voltage is applied to the control gate, so that the memory cell is written. The selection switch W
S is set to the selection level in synchronization with the writing operation. The write / erase control circuit WECONT generates various timings of write / erase and selection control of voltage.

【0033】用途に応じてフラッシュメモリFMRY1
に格納すべき情報量がその情報の種類例えばプログラ
ム、データテーブル、制御データなどに応じて相違され
ることを考慮した場合、フラッシュメモリにおける一括
消去可能な単位として、相互に記憶容量の相違される複
数個のメモリブロックSMB,LMBを構成しておくこ
とにより、マイクロコンピュータを回路基板へ実装後、
当該マイクロコンピュータ内蔵フラッシュメモリの保持
情報の部分的若しくは一部の書換えに伴って、メモリブ
ロックを一括消去した後の書込み動作の無駄をなくし
て、書換え効率を向上させることができる。
A flash memory FMRY1 according to the application
Considering that the amount of information to be stored in the flash memory differs depending on the type of the information, such as a program, a data table, control data, etc., the storage capacities are mutually different as batch erasable units in the flash memory. By configuring a plurality of memory blocks SMB, LMB, after mounting the microcomputer on the circuit board,
It is possible to improve the rewriting efficiency by eliminating the waste of the writing operation after collectively erasing the memory blocks in accordance with the partial or partial rewriting of the held information in the microcomputer built-in flash memory.

【0034】〔3〕PROMライタによるコマンド方式
の情報書込み原理
[3] Command-based information writing principle by PROM writer

【0035】図1には前記のようなフラッシュメモリF
MRY2を内蔵した第1の実施例に係るマイクロコンピ
ュータMCU1においてその内蔵フラッシュメモリをP
ROMライタで書換え処理するときの機能ブロック図が
示される。
FIG. 1 shows the flash memory F as described above.
In the microcomputer MCU1 according to the first embodiment having the built-in MRY2, the built-in flash memory is
A functional block diagram of rewriting processing by the ROM writer is shown.

【0036】同図には内部バスBUSを共有する回路モ
ジュールとして、中央処理装置(以下単にCPUとも記
す)10、フラッシュメモリFMRY2、及び制御回路
20が代表的に示される。このマイクロコンピュータM
CU1はPROMライタ30による書込みモードを有す
る。例えば、図示しないソケットアダプタを介してマイ
クロコンピュータMCU1をPROMライタ30の所定
の端子に結合すると、マイクロコンピュータMCU1の
図示しないモード端子が強制的に所定レベルにされて、
マイクロコンピュータMCU1の動作モードがPROM
ライタ30による書込みモードに設定される。斯る動作
モードにおいて、CPU10は図示しないバススイッチ
を介して内部バスBUSから切り離される。制御回路2
0は前記PROMライタ30による書込み動作モードが
設定された状態においてPROMライタ30から書込み
可能にされるコマンドラッチ手段21と、これにラッチ
されたコマンドを解析するコマンド解析手段22と、解
析された内容に応じてフラッシュメモリの書換えのため
の手順制御を行うシーケンス制御手段23とを備える。
PROMライタ30は、イレーズ(消去)、イレーズベ
リファイ、プログラム(書込み)、プログラムベリファ
イなど所定のコマンドを供給し、これに引き続いて必要
なデータ情報やアドレス情報を供給する。PROMライ
タ30から供給されたコマンドは制御回路20で解釈さ
れ、それに従ってシーケンス制御手段23が、必要なデ
ータ情報やアドレス情報などを利用して書込みを行うた
めの制御信号をフラッシュメモリFMRY2に与える。
As a circuit module sharing the internal bus BUS, a central processing unit (hereinafter also simply referred to as a CPU) 10, a flash memory FMRY2, and a control circuit 20 are typically shown in FIG. This microcomputer M
The CU1 has a write mode by the PROM writer 30. For example, when the microcomputer MCU1 is coupled to a predetermined terminal of the PROM writer 30 via a socket adapter (not shown), the mode terminal (not shown) of the microcomputer MCU1 is forcibly set to a predetermined level,
The operation mode of the microcomputer MCU1 is PROM
The writing mode by the writer 30 is set. In such an operation mode, the CPU 10 is disconnected from the internal bus BUS via a bus switch (not shown). Control circuit 2
Reference numeral 0 indicates a command latch means 21 which is writable by the PROM writer 30 in a state where the write operation mode by the PROM writer 30 is set, a command analysis means 22 which analyzes a command latched by the command latch means 21, and analyzed contents. And sequence control means 23 for performing procedure control for rewriting the flash memory according to the above.
The PROM writer 30 supplies predetermined commands such as erase (erase), erase verify, program (write), and program verify, and subsequently supplies necessary data information and address information. The command supplied from the PROM writer 30 is interpreted by the control circuit 20, and the sequence control means 23 provides the flash memory FMRY2 with a control signal for writing using the necessary data information and address information.

【0037】PROMライタ30から与えられるコマン
ドに応じた書換えシーケンスを内蔵制御回路20で実現
することは、PROMライタ30にとってデータ情報と
アドレス情報を与える前に、データ情報を与えるのと同
様にしてマイクロコンピュータMCU1にコマンドを与
えればよく、汎用的に利用されるPROMライタ30に
ソケットアダプタを介してマイクロコンピュータMCU
1を結合することにより、当該マイクロコンピュータ内
蔵のフラッシュメモリFMRY2に対する情報書込みを
行うことができる。この構成において、PROMライタ
30による書込みモードが設定されたマイクロコンピュ
ータMCU1は、PROMライタ30にとって単体のフ
ラッシュメモリチップと同一視される。
The realization of the rewriting sequence in accordance with the command given from the PROM writer 30 by the built-in control circuit 20 is similar to the case of giving the data information before giving the data information and the address information to the PROM writer 30. It suffices to give a command to the computer MCU1, and the microcomputer MCU is connected to the PROM writer 30 used for general purpose via a socket adapter.
Information can be written in the flash memory FMRY2 incorporated in the microcomputer by combining 1s. In this configuration, the microcomputer MCU1 in which the write mode by the PROM writer 30 is set is regarded as the same flash memory chip by the PROM writer 30.

【0038】図2には前記フラッシュメモリFMRY2
を内蔵した第2の実施例に係るマイクロコンピュータM
CU2においてその内蔵フラッシュメモリMRY2をP
ROMライタ30で書換え処理するときの機能ブロック
図が示される。
FIG. 2 shows the flash memory FMRY2.
A microcomputer M according to a second embodiment having a built-in
In the CU2, the built-in flash memory MRY2 is set to P
A functional block diagram when the rewriting process is performed by the ROM writer 30 is shown.

【0039】同図に示されるマイクロコンピュータMC
U2は、前記制御回路20によるコマンド解析やシーケ
ンス制御を、内蔵CPU10に実行させることによっ
て、コマンド解析手段22やシーケンス制御手段23の
ような書換えのための専用回路を削減したものである。
前記図1において、PROMライタ30による書込み動
作モード時にCPU10が内部バスBUSから切り離さ
れていることからも明らかなように、PROMライタ3
0によるフラッシュメモリFMRY2の書換え中に内蔵
CPU10は、それとは別の処理を行わなければならな
い必然性はなく、実質的に休眠状態であっても差し支え
ない。図2ではそのような内蔵CPU10を有効利用す
るものである。
Microcomputer MC shown in FIG.
U2 reduces the dedicated circuit for rewriting such as the command analysis means 22 and the sequence control means 23 by causing the built-in CPU 10 to execute the command analysis and sequence control by the control circuit 20.
As is apparent from the fact that the CPU 10 is disconnected from the internal bus BUS in the write operation mode by the PROM writer 30 in FIG. 1, the PROM writer 3
During rewriting of the flash memory FMRY2 by 0, the built-in CPU 10 does not necessarily have to perform another process, and may be in a sleep state substantially. In FIG. 2, such a built-in CPU 10 is effectively used.

【0040】同図には内部バスBUSを共有する回路モ
ジュールとして、CPU10、フラッシュメモリFMR
Y2、及びコマンドラッチ手段21が代表的に示され
る。このマイクロコンピュータMCU2はPROMライ
タ30による書込みモードを有する。例えば、図示しな
いソケットアダプタを介してマイクロコンピュータMC
U2をPROMライタ30の所定の端子に結合すると、
マイクロコンピュータMCU2の図示しないモード端子
が強制的に所定レベルにされて、PROMライタ30に
よる書込みモードが設定される。斯る動作モードにおい
てPROMライタ30は、特に制限されないが、CPU
10による内部バスアクセスに競合しないように、内部
バスに直接データ情報やアドレス情報を供給しないよう
にされている。データ情報やアドレス情報は、コマンド
ラッチ手段21と同様の図示しないデータラッチ、アド
レスラッチに書き込まれる。CPU10は、前記PRO
Mライタ30による書込み動作モードが設定された状態
においてPROMライタ30から書込まれたコマンドを
解析するコマンド解析手段22と、解析された内容に応
じてフラッシュメモリFMRY2の書換えのための手順
制御を行うシーケンス制御手段23との機能を、そのた
めの動作プログラムと共に実現する。PROMライタ3
0は、イレーズ(消去)、イレーズベリファイ、プログ
ラム(書込み)、プログラムベリファイなど所定のコマ
ンドを供給し、これに引き続いて必要なデータ情報やア
ドレス情報を供給する。PROMライタ30から供給さ
れたコマンドはCPU10で解釈され、それに従ってC
PU10が、必要なデータ情報やアドレス情報などを利
用して書込みを行うための制御信号をフラッシュメモリ
FMRY2に与える。
In the figure, a CPU 10 and a flash memory FMR are provided as circuit modules sharing the internal bus BUS.
Y2 and the command latch means 21 are representatively shown. This microcomputer MCU2 has a writing mode by the PROM writer 30. For example, a microcomputer MC via a socket adapter (not shown)
If U2 is connected to a predetermined terminal of the PROM writer 30,
A mode terminal (not shown) of the microcomputer MCU2 is forcibly set to a predetermined level to set the write mode by the PROM writer 30. In such an operation mode, the PROM writer 30 is not particularly limited, but the CPU
In order not to compete with the internal bus access by 10, the internal bus is not directly supplied with data information or address information. The data information and address information are written in a data latch and address latch (not shown) similar to the command latch means 21. The CPU 10 uses the PRO
In the state where the write operation mode by the M writer 30 is set, the command analysis means 22 for analyzing the command written from the PROM writer 30 and the procedure control for rewriting the flash memory FMRY2 according to the analyzed contents are performed. The function of the sequence control means 23 is realized together with an operation program therefor. PROM writer 3
0 supplies a predetermined command such as erase (erase), erase verify, program (write), and program verify, and subsequently supplies necessary data information and address information. The command supplied from the PROM writer 30 is interpreted by the CPU 10, and C is read accordingly.
The PU 10 gives a control signal for writing to the flash memory FMRY2 by using necessary data information, address information and the like.

【0041】図3にはPROMライタ30によるコマン
ド書込みタイミングの一例が示される。同図においてコ
マンド書込みと記載されたサイクルがPROMライタ3
0によるマイクロコンピュータMCU2への書込みサイ
クルであり、最初にコマンドラッチ手段21にコマンド
を書込み、次いで図示しないデータラッチ及びアドレス
ラッチに必要に応じてデータ情報及びアドレス情報を書
込む。同図において、書込みサイクルと記載されたサイ
クルは、PROMライタ30によって書込まれた内容に
したがってCPU制御で行われるフラッシュメモリの情
報書込みサイクルである。
FIG. 3 shows an example of command writing timing by the PROM writer 30. In the figure, the cycle described as command writing is the PROM writer 3.
This is a write cycle of 0 to the microcomputer MCU2. First, a command is written in the command latch means 21, and then data information and address information are written in a data latch and an address latch (not shown) as needed. In the figure, the cycle described as a write cycle is an information write cycle of the flash memory which is controlled by the CPU according to the content written by the PROM writer 30.

【0042】図4にはCPU制御によるフラッシュメモ
リの情報書込みサイクルの一例タイミングが示される。
この書込みサイクルは、CPU10によるコマンド解析
のサイクル、コマンド解析結果に従って実際にフラッシ
ュメモリに対して行われる書込みサイクル、及び後処理
のサイクルとされる。
FIG. 4 shows an example of the timing of the information write cycle of the flash memory under the control of the CPU.
This write cycle is a command analysis cycle by the CPU 10, a write cycle that is actually performed on the flash memory according to the command analysis result, and a post-processing cycle.

【0043】本実施例のマイクロコンピュータMCU2
も上記実施例同様に汎用的に利用されるPROMライタ
30をソケットアダプタを介して結合することにより、
マイクロコンピュータ内蔵フラッシュメモリFMRY2
に対する情報書込みを行うことができる。更に、コマン
ドによって指示される書換えのためのシーケンスをCP
U10が制御するから、その制御のための専用回路を不
要若しくは削減し、マイクロコンピュータMCU2のチ
ップ面積低減を実現する。更に、書換えのための制御シ
ーケンスは、CPU10が実行すべきソフトウェアで変
更可能であるから、フラッシュメモリFMRY2を構成
するメモリセルトランジスタの特性に合わせて書き込み
時間などの条件設定を行うことができる。第1の実施例
と第2の実施例との効果の相違は図5にまとめて示され
ている。
Microcomputer MCU2 of this embodiment
Also, by connecting the PROM writer 30 which is used for general purpose in the same manner as in the above embodiment, through the socket adapter,
Microcomputer built-in flash memory FMRY2
Information can be written to. In addition, the rewriting sequence instructed by the command CP
Since U10 controls, a dedicated circuit for the control is unnecessary or eliminated, and the chip area of the microcomputer MCU2 is reduced. Furthermore, since the control sequence for rewriting can be changed by software to be executed by the CPU 10, it is possible to set conditions such as the write time according to the characteristics of the memory cell transistors forming the flash memory FMRY2. The difference in effect between the first embodiment and the second embodiment is shown collectively in FIG.

【0044】〔4〕マイクロコンピュータ[4] Microcomputer

【0045】図6には図2のマイクロコンピュータに対
応される更に詳細なマイクロコンピュータMCU3の実
施例ブロック図が示される。
FIG. 6 is a block diagram showing a more detailed embodiment of the microcomputer MCU3 corresponding to the microcomputer shown in FIG.

【0046】同図に示されるマイクロコンピュータMC
U3は、CPU10、フラッシュメモリFMRY2、シ
リアル・コミュニケーション・インタフェースSCI、
制御回路CONT、及びランダム・アクセス・メモリR
AM、16ビット・インテグレーテッド・タイマ・パル
スユニットIPU、ウォッチドッグタイマWDTMR、
ポートPORT1乃至PORT12、クロック発振器C
PG、割り込みコントローラIRCONT、アナログ・
ディジタル変換器ADC、及びウェートステートコント
ローラWSCONTを備え、それらの回路モジュール
は、特に制限されないが、公知の半導体集積回路製造技
術によって、シリコンのような1個の半導体基板に形成
されている。
Microcomputer MC shown in FIG.
U3 is a CPU 10, a flash memory FMRY2, a serial communication interface SCI,
Control circuit CONT and random access memory R
AM, 16-bit integrated timer pulse unit IPU, watchdog timer WDTMR,
Ports PORT1 to PORT12, clock oscillator C
PG, interrupt controller IRCONT, analog
The digital converter ADC and the weight state controller WSCONT are provided, and the circuit modules thereof are not particularly limited, but are formed on one semiconductor substrate such as silicon by a known semiconductor integrated circuit manufacturing technique.

【0047】前記CPU10、フラッシュメモリFMR
Y2、ランダム・アクセス・メモリRAM、及び16ビ
ット・インテグレーテッド・タイマ・パルスユニットI
PUは、アドレスバスABUS、下位データバスLDB
US(例えば8ビット)、及び上位データバスHDBU
S(例えば8ビット)に接続される。シリアル・コミュ
ニケーション・インタフェースSCI、ウォッチドッグ
タイマWDTMR、割り込みコントローラIRCON
T、アナログ・ディジタル変換器ADC、ウェートステ
ートコントローラWSCONT、及びポートPORT1
乃至PORT12は、アドレスバスABUS、及び上位
データバスHDBUSに接続される。
CPU 10, flash memory FMR
Y2, random access memory RAM, and 16-bit integrated timer pulse unit I
PU is an address bus ABUS and a lower data bus LDB
US (for example, 8 bits) and upper data bus HDBU
It is connected to S (for example, 8 bits). Serial communication interface SCI, watchdog timer WDTMR, interrupt controller IRCON
T, analog / digital converter ADC, weight state controller WSCONT, and port PORT1
The PORT 12 is connected to the address bus ABUS and the upper data bus HDBUS.

【0048】図6において、Vppはフラッシュメモリ
FMRY2の書換え用高電圧である。EXTAL及びX
TALはマイクロコンピュータMCU3のチップに外付
けされる図示しない振動子から前記クロック発振器CP
Gに与えられる信号である。φはクロック発振器CPG
から外部に出力される同期クロック信号である。RES
*(記号*はこれが付された信号がローイネーブル信号
であることを意味する)はリセット信号、STBY*は
スタンバイ信号であり、CPU10並びにその他の回路
ブロックに供給される。NMIはノン・マスカブル・イ
ンタラプト信号であり、マスク不可能な割り込みを前記
割り込みコントローラIRCONTに与える。図示しな
いその他の割り込み信号はポートPORT8,PORT
9を介して割り込みコントローラIRCONTに与えら
れる。AS*は外部に出力されるアドレス信号の有効性
を示すアドレスストローブ信号、RD*はリードサイク
ルであることを外部に通知するリード信号、HWR*は
上位8ビットのライトサイクルであることを外部に通知
するアッパーバイト・ライト信号、LWR*は下位8ビ
ットのライトサイクルであることを外部に通知するロア
ーバイト・ライト信号であり、それらはマイクロコンピ
ュータMCU3の外部に対するアクセス制御信号とされ
る。
In FIG. 6, Vpp is a high voltage for rewriting the flash memory FMRY2. EXTAL and X
TAL is an oscillator (not shown) externally attached to the chip of the microcomputer MCU3, and is the clock oscillator CP.
This is a signal given to G. φ is the clock oscillator CPG
Is a synchronous clock signal output from the outside. RES
* (Symbol * means that the signal with this is a low enable signal) is a reset signal, STBY * is a standby signal, and is supplied to the CPU 10 and other circuit blocks. NMI is a non-maskable interrupt signal and gives a non-maskable interrupt to the interrupt controller IRCONT. Other interrupt signals not shown are ports PORT8, PORT
It is given to the interrupt controller IRCONT via 9. AS * is an address strobe signal indicating the validity of the address signal output to the outside, RD * is a read signal notifying the outside that it is a read cycle, and HWR * is an outside indicating that it is a write cycle of the upper 8 bits. The upper byte write signal for notifying, LWR *, is a lower byte write signal for notifying externally that it is a write cycle of the lower 8 bits, and these are used as access control signals to the outside of the microcomputer MCU3.

【0049】MD0乃至MD2はマイクロコンピュータ
MCU3の動作モードを設定するために制御回路CON
Tに供給されるモード信号である。これによって設定さ
れる動作モードは、特に制限されないが、マクシマムモ
ードやミニマムモードというようなCPUが管理可能な
アドレス空間に関する動作モード、PROMライタ30
による内蔵フラッシュメモリFMRY2への情報書込み
を可能にする動作モード(以下単にPROMライタ書込
みモードとも記す)などとされる。斯るPROMライタ
書込みモードに対して、前記マクシマムモードやミニマ
ムモードは、CPU10がマイクロコンピュータMCU
3のオンボード状態で内蔵フラッシュメモリFMRY2
を書換え可能にする動作モードとして把握することがで
きる。
MD0 to MD2 are control circuits CON for setting the operation mode of the microcomputer MCU3.
This is a mode signal supplied to T. The operation mode set by this is not particularly limited, but an operation mode relating to an address space that can be managed by the CPU, such as a maximum mode or a minimum mode, a PROM writer 30
The operation mode (hereinafter also simply referred to as a PROM writer write mode) that enables the writing of information in the built-in flash memory FMRY2 by means of. In contrast to such a PROM writer write mode, in the maximum mode and the minimum mode, the CPU 10 is a microcomputer MCU.
Built-in flash memory FMRY2 in 3 on-board state
Can be understood as an operation mode that enables rewriting.

【0050】コマンド方式を以ってPROMライタ30
でフラッシュメモリFMRY2に情報書込みを行う動作
モード以外において、マイクロコンピュータMCU3が
外部をアクセスするためのデータBD0乃至BD15の
入出力には、特に制限されないが、前記ポートPORT
1,PORT2が割当てられる。このときのアドレス信
号BA0乃至BA19の出力には、特に制限されない
が、前記ポートPORT3乃至PORT5が割当てられ
る。
A PROM writer 30 using a command system
There is no particular limitation on the input / output of the data BD0 to BD15 for the microcomputer MCU3 to access the outside except the operation mode for writing information to the flash memory FMRY2.
1, PORT2 are assigned. Although not particularly limited, the ports PORT3 to PORT5 are assigned to the outputs of the address signals BA0 to BA19 at this time.

【0051】一方、マイクロコンピュータMCUに前記
PROMライタ書換えモードが設定されたとき、そのフ
ラッシュメモリFMRY2を書換え制御するPROMラ
イタ30との接続には、特に制限されないが、前記ポー
トPORT2乃至PORT5及びPORT8が割当てら
れる。すなわち、コマンド書込み、そして書込み並びに
ベリファイのためのデータED0乃至ED7の入出力に
は前記ポートPORT2が割当てられ、アドレス信号E
A0ないしEA16の入力並びにアクセス制御信号CE
*(チップイネーブル信号),OE*(アウトプットイ
ネーブル信号),WE*(ライトイネーブル信号)の入
力には前記ポートPORT3乃至PORT5及びPOR
T8が割当てられる。前記チップイネーブル信号CE*
はPROMライタ30からのチップ選択信号であり、ア
ウトプットイネーブル信号OE*はマイクロコンピュー
タMCU3に対する出力動作の指示信号であり、ライト
イネーブル信号WE*はマイクロコンピュータMCU3
に対する書込み動作の指示信号である。尚、アドレス信
号EA0ないしEA16のうちの1ビットEA9の入力
には前記信号NMIの入力端子が割当てられる。この様
にして割当てられたポートの外部端子、並びに高電圧V
ppの印加端子などのその他必要な外部端子は、ピン配
置変換用のソケットとしての図示しないソケットアダプ
タを介してPROMライタ30に接続される。上記PR
OMライタ書換えモードにおいてPROMライタ30と
の接続に割当てられるマイクロコンピュータMCU3の
外部端子群は、その他の動作モードでは他の機能が割当
てられることになる。
On the other hand, when the PROM writer rewriting mode is set in the microcomputer MCU, the connection with the PROM writer 30 for rewriting the flash memory FMRY2 is not particularly limited, but the ports PORT2 to PORT5 and PORT8 are not limited. Assigned. That is, the port PORT2 is assigned to the input / output of the data ED0 to ED7 for command writing and writing / verifying, and the address signal E
Input of A0 to EA16 and access control signal CE
Inputs of * (chip enable signal), OE * (output enable signal), and WE * (write enable signal) to the ports PORT3 to PORT5 and POR
T8 is assigned. The chip enable signal CE *
Is a chip selection signal from the PROM writer 30, the output enable signal OE * is an instruction signal of an output operation to the microcomputer MCU3, and the write enable signal WE * is a microcomputer MCU3.
Is a signal for instructing a write operation to the. The input terminal of the signal NMI is assigned to the input of the 1-bit EA9 of the address signals EA0 to EA16. The external terminals of the ports allocated in this way, and the high voltage V
Other necessary external terminals such as a pp application terminal are connected to the PROM writer 30 via a socket adapter (not shown) as a socket for pin arrangement conversion. PR above
The external terminal group of the microcomputer MCU3 assigned for connection with the PROM writer 30 in the OM writer rewriting mode is assigned another function in other operation modes.

【0052】図7には図6のマイクロコンピュータMC
U3を、例えば、樹脂によって封止することによって得
られた4辺部に外部端子を有するパッケージの上面を示
す。図7に示された信号は図6と共通である。信号名の
示されていない外部端子(ピン)は、ウェート信号の入
力ピン、バスリクエスト信号の入力ピン、バスアクノレ
ッジ信号の出力ピン、シリアル・コミュニケーション・
インタフェースSCIなどの周辺回路と外部との信号入
出力ピンなどに利用される。
FIG. 7 shows the microcomputer MC of FIG.
The upper surface of a package having external terminals on four sides obtained by sealing U3 with resin, for example, is shown. The signals shown in FIG. 7 are common to those in FIG. External terminals (pins) without signal names are input pins for wait signals, input pins for bus request signals, output pins for bus acknowledge signals, serial communication
It is used for peripheral circuit such as interface SCI and external signal input / output pin.

【0053】〔5〕内蔵フラッシュメモリ[5] Built-in flash memory

【0054】図8には図6のマイクロコンピュータMC
U3に内蔵されるフラッシュメモリFMRY2の全体的
なブロック図が示される。同図においてARYは前記図
31で説明した2層ゲート構造の絶縁ゲート型電界効果
トランジスタによって構成されたメモリセルをマトリク
ス配置したメモリアレイである。このメモリアレイAR
Yは図34で説明した構成と同様に、メモリセルのコン
トロールゲートはそれぞれ対応するワード線に接続さ
れ、メモリセルのドレイン領域はそれぞれ対応するデー
タ線に接続され、メモリセルのソース領域はメモリブロ
ック毎に共通のソース線に接続されているが、メモリブ
ロックの分割態様は図34とは相違される。例えば、図
9に示されるように、相対的にそれぞれの記憶容量が大
きな7個の大メモリブロック(大ブロック)LMB0乃
至LMB6と、相対的にそれぞれの記憶容量が小さな8
個の小メモリブロック(小ブロック)SMB0乃至SM
B7とに分割されている。大メモリブロックはプログラ
ム格納領域又は大容量データ格納領域などに利用され
る。小メモリブロックは小容量データ格納領域などに利
用される。
FIG. 8 shows the microcomputer MC of FIG.
An overall block diagram of the flash memory FMRY2 built into U3 is shown. In the same figure, ARY is a memory array in which memory cells constituted by the insulated gate field effect transistors of the two-layer gate structure described in FIG. 31 are arranged in a matrix. This memory array AR
As for Y, the control gates of the memory cells are connected to the corresponding word lines, the drain regions of the memory cells are connected to the corresponding data lines, and the source regions of the memory cells are the memory blocks. Each of them is connected to a common source line, but the division mode of the memory block is different from that in FIG. For example, as shown in FIG. 9, seven large memory blocks (large blocks) LMB0 to LMB6 with relatively large storage capacities and 8 with relatively small storage capacities respectively.
Small memory blocks (small blocks) SMB0 to SM
It is divided into B7. The large memory block is used as a program storage area or a large capacity data storage area. The small memory block is used as a small capacity data storage area.

【0055】図8において、AILはアドレス信号PA
B0乃至PAB15のラッチ回路である。アドレス信号
PAB0乃至PAB15は、CPU10の出力アドレス
信号に対応されると共に、前記PROMライタ書換えモ
ードではPROMライタ30の出力アドレス信号EA0
乃至EA15に対応される。XADECはアドレスラッ
チAILを介して取り込まれるXアドレス信号を解読す
るXアドレスデコーダである。尚、Xアドレスデコーダ
XADECから出力される選択信号に基づいてワード線
を駆動するワードドライバについては図示を省略してあ
る。データ読出し動作においてワードドライバは5Vの
ような電圧でワード線を駆動し、データの書き込み動作
では12Vのような高電圧でワード線を駆動する。デー
タの消去動作においてワードドライバの全ての出力は0
Vのような低い電圧レベルにされる。YADECはアド
レスラッチAILを介して取り込まれるYアドレス信号
を解読するYアドレスデコーダである。YSELはYア
ドレスデコーダYADECの出力選択信号に従ってデー
タ線を選択するYセレクタである。SAはデータ読出し
動作においてYセレクタYSELで選択されたデータ線
からの読出し信号を増幅するセンスアンプである。DO
LはセンスアンプSAの出力を保持するデータ出力ラッ
チである。DOBはデータ出力ラッチDOLが保持する
データを外部に出力するためのデータ出力バッファであ
る。図においてPDB0乃至PDB7は下位8ビット
(1バイト)データであり、PDB8乃至PDB15は
上位8ビット(1バイト)データである。この例に従え
ば出力データは最大2バイトとされる。DIBは外部か
ら供給される書き込みデータを取り込むためのデータ入
力バッファである。データ入力バッファDIBから取り
込まれたデータはデータ入力ラッチDILに保持され
る。データ入力ラッチDILに保持されたデータが”
0”のとき、書き込み回路WRはYセレクタYSELで
選択されたデータ線に書き込み用高電圧を供給する。こ
の書き込み用高電圧はXアドレス信号に従ってコントロ
ールゲートに高電圧が印加されるメモリセルのドレイン
に供給され、これによって当該メモリセルが書き込みさ
れる。ECは指定されたメモリブロックのソース線に消
去用高電圧を供給してメモリブロックの一括消去を行う
ための消去回路である。消去回路ECに対する消去ブロ
ックの指定は、消去ブロック指定レジスタMBREGが
行う。このレジスタMBREGに対するデータの書込み
はCPU10が行う。
In FIG. 8, AIL is an address signal PA.
It is a latch circuit of B0 to PAB15. The address signals PAB0 to PAB15 correspond to the output address signal of the CPU 10 and, in the PROM writer rewriting mode, the output address signal EA0 of the PROM writer 30.
To EA15. XADEC is an X address decoder which decodes an X address signal fetched through the address latch AIL. The word driver that drives the word line based on the selection signal output from the X address decoder XADEC is not shown. In the data read operation, the word driver drives the word line with a voltage such as 5V, and in the data write operation, drives the word line with a high voltage such as 12V. All the outputs of the word driver are 0 in the data erasing operation.
It is brought to a low voltage level such as V. YADEC is a Y address decoder that decodes a Y address signal fetched through the address latch AIL. YSEL is a Y selector that selects a data line according to the output selection signal of the Y address decoder YADEC. SA is a sense amplifier that amplifies a read signal from the data line selected by the Y selector YSEL in the data read operation. DO
L is a data output latch that holds the output of the sense amplifier SA. DOB is a data output buffer for outputting the data held by the data output latch DOL to the outside. In the figure, PDB0 to PDB7 are lower 8-bit (1 byte) data, and PDB8 to PDB15 are higher 8-bit (1 byte) data. According to this example, the maximum output data is 2 bytes. The DIB is a data input buffer for fetching write data supplied from the outside. The data input from the data input buffer DIB is held in the data input latch DIL. The data held in the data input latch DIL is "
When it is "0", the write circuit WR supplies a high voltage for writing to the data line selected by the Y selector YSEL. This high voltage for writing is the drain of the memory cell to which the high voltage is applied to the control gate according to the X address signal. Then, the memory cell is written by this, and EC is an erase circuit for supplying a high erase voltage to the source line of the specified memory block to erase the memory blocks in batch. The erase block is designated by the erase block designation register MBREG, and the CPU 10 writes data to the register MBREG.

【0056】FCONTは、フラッシュメモリFMRY
2におけるデータ読出し動作のタイミング制御、及び書
き込み消去のための各種タイミングや電圧の選択制御な
どを行う制御回路である。この制御回路FCONTは、
コントロールレジスタCREGの内容を参照して処理を
行う。
FCONT is a flash memory FMRY.
2 is a control circuit for performing timing control of data read operation in 2 and selection control of various timings and voltages for writing and erasing. This control circuit FCONT is
The processing is performed by referring to the contents of the control register CREG.

【0057】図10には前記コントロールレジスタCR
EGと消去ブロック指定レジスタMBREGの一例が示
される。この消去ブロック指定レジスタMBREGは2
本のレジスタMBREG1およびMBREG2によって
構成され、夫々のレジスタCREG,MBREG1,M
BREG2は8ビットのレジスタとされる。コントロー
ルレジスタCREGにおいて、Vppは書換え用高電圧
印加に応じて”1”にされる高電圧印加フラグである。
Eビットは消去動作を指示するビットとされ、EVビッ
トは消去におけるベリファイ動作の指示ビットとされ
る。Pビットは書込み動作(プログラム動作)の指示ビ
ットとされ、PVビットは書込みにおけるベリファイ動
作の指示ビットとされる。消去ブロック指定レジスタM
BREG1およびMBREG2は、それぞれ7分割され
た大ブロックと8分割された小ブロックに含まれる何れ
のメモリブロックを消去するかを指定するレジスタであ
り、その第0ビットから第7ビットは各メモリブロック
の指定用ビットとされ、例えばビット”1”は対応メモ
リブロックの選択を意味し、ビット”0”は対応メモリ
ブロックの非選択を意味する。例えば、消去ブロック指
定レジスタMBREG2の第7ビットが”1”のとき
は、小メモリブロックSMB7の消去が指定される。
FIG. 10 shows the control register CR.
An example of EG and erase block designation register MBREG is shown. This erase block designation register MBREG is 2
It is composed of book registers MBREG1 and MBREG2, and each register CREG, MBREG1, M
BREG2 is an 8-bit register. In the control register CREG, Vpp is a high voltage application flag that is set to "1" in response to the application of the high voltage for rewriting.
The E bit is a bit instructing an erase operation, and the EV bit is an instruction bit for a verify operation in erase. The P bit is an instruction bit for a write operation (program operation), and the PV bit is an instruction bit for a verify operation in writing. Erase block designation register M
BREG1 and MBREG2 are registers for designating which memory block contained in a large block divided into 7 and a small block divided into 8 is to be erased. For example, bit "1" means selection of the corresponding memory block, and bit "0" means non-selection of the corresponding memory block. For example, when the seventh bit of the erase block designating register MBREG2 is "1", erasing of the small memory block SMB7 is designated.

【0058】上記レジスタCREG,MBREG1,M
BREG2はCPU10によってリード・ライト可能に
されている。制御回路FCONTは、そのレジスタCR
EG,MBREG1,MBREG2の設定内容を参照
し、それにしたがって消去・書込みなどを行う。CPU
10は、そのレジスタCREG,MBREG1,MBR
EG2の内容を書換えることによって、消去・書込み動
作などを制御することができる。例えば、前記PROM
ライタ書換えモードが設定されているとき、CPU10
は、PROMライタ30によってコマンドラッチに書込
まれたコマンドの内容に従って、当該レジスタCRE
G,MBREG1,MBREG2を設定することにな
る。
The registers CREG, MBREG1, M
The BREG 2 is readable and writable by the CPU 10. The control circuit FCONT has its register CR
The setting contents of EG, MBREG1 and MBREG2 are referred to, and erasing / writing is performed according to them. CPU
10 is the register CREG, MBREG1, MBR
By rewriting the contents of EG2, the erase / write operation can be controlled. For example, the PROM
When the writer rewrite mode is set, the CPU 10
According to the contents of the command written in the command latch by the PROM writer 30.
G, MBREG1, and MBREG2 will be set.

【0059】図8において、制御回路FCONTには、
制御信号としてFLM,MS−FLN,MS−MIS
N,M2RDN,M2WRN,MRDN,MWRN,I
OWORDN,RST,VPPH,A9H,SECS
N,SECN,DSCN,及びXMONが供給される。
In FIG. 8, the control circuit FCONT includes
FLM, MS-FLN, MS-MIS as control signal
N, M2RDN, M2WRN, MRDN, MWRN, I
OWORDN, RST, VPPH, A9H, SECS
N, SECN, DSCN, and XMON are provided.

【0060】制御信号FLMは、フラッシュメモリFM
RY2の動作モードを指定する信号であり、マイクロコ
ンピュータMCU3がPROMライタ30に結合されて
書換え可能にされるときには論理値”1”にされ、それ
いがいのときには論理値”0”にされる。この信号FL
Mは、例えば前記モード信号MD0乃至MD2に基づい
て形成される。制御信号MS−FLNは、フラッシュメ
モリFMRY2の選択信号である。制御信号MS−MI
SNはレジスタCREG,MBREG1,MBREG2
の選択信号である。レジスタCREG,MBREG1,
MBREG2の何れを選択するかはCPU10が出力す
るアドレス信号の下位2ビットで決定される。M2RD
Nはメモリリードストローブ信号、M2WRNはメモリ
ライトストローブ信号、MRDNはコントロールレジス
タCREGのリード信号、MWRNはコントロールレジ
スタCREGのライト信号である。メモリライトストロ
ーブ信号M2WRNは、メモリセルに書込むべきデータ
をデータ入力ラッチDILに書込むためのストローブ信
号とみなされる。メモリセルへの実際の書込みは前記コ
ントロールレジスタCREGのPビットをセットするこ
とによって開始される。制御信号IOWORDNはフラ
ッシュメモリFMRY2に対する8ビットリードアクセ
スと16ビットリードアクセスとの切換え信号とされ
る。制御信号RSTはフラッシュメモリFMRY2のリ
セット信号である。この信号RSTによってフラッシュ
メモリFMRY2がリセットされることにより、或は前
記コントロールレジスタCREGのVppフラグが”
0”にされることにより、当該レジスタCREGにおけ
るEV,PV,E,Pの各モード設定ビットがクリアさ
れる。VPPHはVpp=12Vの検出信号である。
尚、その他の信号A9H、SECN、DSCN、XMO
Nの各信号は、セキュリティービットのイネーブル信号
やテストイネーブル信号であり、本発明とは直接関係無
いのでその詳細な説明は省略する。
The control signal FLM is the flash memory FM.
The signal is a signal designating the operation mode of RY2, and is set to a logical value "1" when the microcomputer MCU3 is coupled to the PROM writer 30 to be rewritable, and is set to a logical value "0" when it is yes. This signal FL
M is formed based on the mode signals MD0 to MD2, for example. The control signal MS-FLN is a selection signal for the flash memory FMRY2. Control signal MS-MI
SN is register CREG, MBREG1, MBREG2
Selection signal. Register CREG, MBREG1,
Which of the MBREG2 is selected is determined by the lower 2 bits of the address signal output from the CPU 10. M2RD
N is a memory read strobe signal, M2WRN is a memory write strobe signal, MRDN is a read signal of the control register CREG, and MWRN is a write signal of the control register CREG. Memory write strobe signal M2WRN is regarded as a strobe signal for writing data to be written in the memory cell into data input latch DIL. The actual writing to the memory cell is started by setting the P bit in the control register CREG. The control signal IOWORDN is a signal for switching between 8-bit read access and 16-bit read access to the flash memory FMRY2. The control signal RST is a reset signal for the flash memory FMRY2. The flash memory FMRY2 is reset by this signal RST, or the Vpp flag of the control register CREG is set to "".
When set to 0 ", the EV, PV, E, and P mode setting bits in the register CREG are cleared. VPPH is a detection signal of Vpp = 12V.
Other signals A9H, SECN, DSCN, XMO
Each of the N signals is a security bit enable signal or a test enable signal and is not directly related to the present invention, and therefore its detailed description is omitted.

【0061】〔6〕コマンド方式対応ハードウェア[6] Command system compatible hardware

【0062】図11には図6のマイクロコンピュータに
おいてコマンド方式によるPROMライタ書換えモード
に対応するためのハードウェアの詳細な一例が示されて
いる。
FIG. 11 shows a detailed example of hardware for coping with the PROM writer rewriting mode by the command system in the microcomputer of FIG.

【0063】PROMライタ30から供給されるコマン
ド及びアドレスはCPU10とは非同期に入力されてく
るので、コマンドを受けるためのコマンドラッチCL、
アドレスを受けるためのアドレスラッチALが設けられ
ている。PROMライタ30と接続されるポートPOR
Tは図示しないソケットアダプタを介して一義的に決定
される。ポートPORTがレジスタを持っている場合に
は、そのレジスタを前記アドレスラッチALやコマンド
ラッチCLとすることができ、新たにそれらを設けなく
てもよい。さらにコマンドラッチCLにコマンドが書込
まれたことをCPU10が認識できるようにコマンドラ
ッチCLの所定ビットにはコマンドフラグCFが割り当
てられる。コマンドフラグCFが立った場合にCPU1
0はコマンドラッチCLにコマンドが入力されたことを
知り、コマンドを読みに行くという動作を行う。PRO
Mライタ30からの書込みは、先ず最初にコマンドの書
込みとされ、次いで必要に応じてPROMライタ30か
らアドレス、データが書き込まれる。このとき、コマン
ド入力からデータ入力までの時間が最小で20nsと少
ない為、CPU10がコマンドを読みに行くより早くデ
ータがコマンドラッチCLに入力されてしまうことが考
えられる。そこで、コマンドとデータの衝突を避けるた
め、コマンドラッチCL以外にもう一つデータを受ける
ためのデータラッチDLを設ける。更に、データラッチ
DLにデータが入力されたことを示すデータフラグDF
をコマンドラッチの所定ビットに割り当てる。CPU1
0は初めにCF=1(既にコマンドが入力されている)
もしくはDF=1(コマンドが入力され、さらにデータ
も入力されている)の場合、コマンドを読みに行き、コ
マンド認識後DF=1の場合にデータを読みに行くとい
う動作を行う。
Since the command and address supplied from the PROM writer 30 are input asynchronously with the CPU 10, the command latch CL for receiving the command,
An address latch AL for receiving an address is provided. Port POR connected to PROM writer 30
T is uniquely determined via a socket adapter (not shown). When the port PORT has a register, the register can be used as the address latch AL or the command latch CL, and it is not necessary to newly provide them. Further, a command flag CF is assigned to a predetermined bit of the command latch CL so that the CPU 10 can recognize that the command has been written in the command latch CL. CPU 1 when command flag CF is set
0 knows that a command has been input to the command latch CL, and performs an operation of reading the command. PRO
The writing from the M writer 30 is first a command writing, and then the address and data are written from the PROM writer 30 as needed. At this time, since the time from the command input to the data input is as short as 20 ns, the data may be input to the command latch CL earlier than the CPU 10 goes to read the command. Therefore, in order to avoid a command-data collision, another data latch DL for receiving data is provided in addition to the command latch CL. Further, a data flag DF indicating that data is input to the data latch DL
Is assigned to a predetermined bit of the command latch. CPU1
0 is CF = 1 at the beginning (command has already been input)
Alternatively, when DF = 1 (a command is input and data is also input), the command is read, and when DF = 1 after command recognition, the data is read.

【0064】ここでコマンドラッチCLとデータラッチ
DLの二つのラッチがデータ入出力用のポートPORT
を共有しているため、PROMライタ30から入力され
るコマンドとデータを識別することが必要になる。そこ
でPROMライタ30からの入力データはCF=0かつ
DF=0のときはコマンドラッチCLにラッチされ、C
F=1かつDF=0のときデータラッチDLにラッチさ
れるようになっている。すなわち、図11に概念的に示
されているように、PROMライタ30からの書込み信
号WE、コマンドフラグCF、データフラグDFの夫々
の論理値に応じた信号を受けてラッチ制御信号を生成す
るアンドゲートANDが設けられている。更に、図12
にも示されるように、コマンドラッチCLにラッチされ
たコマンドの種類をコマンドデコーダDECでデコード
して、それが所定のコマンドであるときにコマンドフラ
グCFをセットし、また、データラッチDLにデータが
ラッチされたときにデータフラグDFをセットし且つコ
マンドフラグCFをクリアする論理が採用されている。
これによって上記コマンドラッチCLとデータラッチD
Lの使い分けが実現される。本実施例に従えば、前記コ
マンドラッチCLは8ビットのレジスタとされ、下位側
2ビットがデータフラグDF,コマンドフラグCFとさ
れ、上位側4ビットがコマンド保持用ビットとされる。
尚、図11において、AIBはアドレス入力バッファ、
MPXはアドレスマルチププレクサである。
Here, two latches, a command latch CL and a data latch DL, are used for data input / output port PORT.
Since it is shared, it is necessary to identify the command and data input from the PROM writer 30. Therefore, the input data from the PROM writer 30 is latched in the command latch CL when CF = 0 and DF = 0, and C
The data latch DL is latched when F = 1 and DF = 0. That is, as conceptually shown in FIG. 11, a latch control signal is generated by receiving signals corresponding to respective logical values of the write signal WE, the command flag CF, and the data flag DF from the PROM writer 30. A gate AND is provided. Furthermore, FIG.
, The command decoder DEC decodes the type of command latched in the command latch CL, sets the command flag CF when the command is a predetermined command, and the data latch DL stores data. The logic is employed to set the data flag DF and clear the command flag CF when latched.
As a result, the command latch CL and the data latch D
The proper use of L is realized. According to this embodiment, the command latch CL is an 8-bit register, the lower 2 bits are the data flag DF and the command flag CF, and the upper 4 bits are the command holding bit.
In FIG. 11, AIB is an address input buffer,
MPX is an address multiplexer.

【0065】前述したようにコマンドラッチCLにラッ
チされたコマンドをコマンドデコーダDECでデコード
してコマンドフラグCFのセットを行うようにした。仮
にこの処理をCPU10に委ねるならば、CPU10は
バスサイクルを起動して常にコマンドラッチCLの内容
をモニタしなければならず、動作上無駄を生ずることに
なるからである。また、コマンドデコーダDECで制御
されるコマンドフラグCFのセット状態に応じてコマン
ドラッチCLのコマンドを全てCPU10が解析してい
たのではそのコマンドで指示される動作がタイミング上
間に合わないものがある。例えば、フラッシュメモリF
MRY2からデータを読出すようなリード系コマンドで
ある。これに対処するため、図11及び図12に示され
るように、コマンドラッチCL、データラッチDL、及
びアドレスラッチALがフラッシュメモリFMRY2と
CPU10に接続される状態と、前記コマンドラッチC
L、データラッチDL、及びアドレスラッチALがフラ
ッシュメモリFMRY2に接続されCPU10には非接
続とされる状態とを選択可能なバススイッチBSWを、
内部バスABUS,DBUSに設け、そのバススイッチ
BSWを、コマンドデコーダDECによるリード系コマ
ンドのデコード結果から得られる信号によって制御する
ようにする。斯るバススイッチBSWが開いた状態にお
いて、フラッシュメモリFMRY2はマイクロコンピュ
ータMCU3の外部から、換言すればPROMライタ3
0から、直接リードアクセス可能にされる。
As described above, the command latched in the command latch CL is decoded by the command decoder DEC to set the command flag CF. If this processing is entrusted to the CPU 10, the CPU 10 has to start a bus cycle and constantly monitor the content of the command latch CL, which causes a waste of operation. Further, if the CPU 10 analyzes all the commands of the command latch CL according to the set state of the command flag CF controlled by the command decoder DEC, the operation instructed by the command may not be in time. For example, flash memory F
It is a read type command for reading data from MRY2. In order to deal with this, as shown in FIGS. 11 and 12, a state in which the command latch CL, the data latch DL, and the address latch AL are connected to the flash memory FMRY2 and the CPU 10, and the command latch C is used.
A bus switch BSW capable of selecting a state in which L, the data latch DL, and the address latch AL are connected to the flash memory FMRY2 and are not connected to the CPU 10,
The internal bus ABUS and DBUS are provided, and the bus switch BSW thereof is controlled by a signal obtained from the decoding result of the read system command by the command decoder DEC. When the bus switch BSW is opened, the flash memory FMRY2 is supplied from the outside of the microcomputer MCU3, in other words, the PROM writer 3
Direct read access is enabled from 0.

【0066】〔7〕PROMライタによる情報書込みな
どのコマンド仕様
[7] Command specifications for information writing by PROM writer

【0067】図13にはPROMライタ30から供給可
能なコマンドの仕様例が示される。同図に示されるコマ
ンドは、特に制限されないが、8種類とされ、各コマン
ドに対応してPROMライタ30が起動すべきサイクル
の内容が図示されている。コマンドのコードは、同図に
示される第1サイクルのデータに対応される。このコー
ドは16進数で示され、該コードの最後に付されている
Hは16進数であることを意味している。リードコマン
ド(Read)はフラッシュメモリFMRY2からデー
タ読み出しのためのコマンドである。当該コマンドの第
2サイクルにおけるRAはリードアドレスを意味する。
リードIDコマンド(Read ID)は製品識別コー
ドアドレス(IA)から製品識別コード(ID)を読出
すためのコマンドである。消去コマンド(Erase)
はフラッシュメモリのデータを消去するコマンドであ
る。消去に際しては、過消去(消去を行い過ぎるとメモ
リのVthが負になり、正常な読み出しができなくなる
現象)を避けるため、消去前に書込みレベルを均一化す
るためのプレライトを実施したり、ベリファイを行いな
がら少しずつ消去を行うという消去手順が採用されてい
る。消去ベリファイコマンド(E Verify)は消
去状態を確認するためのコマンドである。EAは消去ベ
リファイのためのメモリアドレスである。EVDは消去
ベリファイ出力データである。自動消去モード(A E
rase)は自動的に消去並びに消去ベリファイを行う
ためのコマンドであり、自動消去開始後、ステータスポ
ーリングにより自動消去動作終了の確認が可能にされ
る。ステータスポーリングフラグSPFは図11におけ
るデータラッチDLの上位側ビットに割当てられてい
る。書込みコマンド(Program)は書込みを指示
するためのコマンドであり、PAは書込みアドレス、P
Dは書込みデータである。プログラムベリファイコマン
ド(P Verify)は直前に書込んだデータが正し
く書込まれているかを確認するためのコマンドであり、
PVDはプログラムベリファイ出力データである。リセ
ットコマンド(Reset)はコマンドを間違えた場合
にそのコマンドをリセットするためのコマンドである。
FIG. 13 shows an example of specifications of commands that can be supplied from the PROM writer 30. The command shown in the figure is not particularly limited, but there are eight types, and the contents of the cycle in which the PROM writer 30 should be activated are shown corresponding to each command. The command code corresponds to the first cycle data shown in FIG. This code is shown by a hexadecimal number, and H added at the end of the code means that it is a hexadecimal number. The read command (Read) is a command for reading data from the flash memory FMRY2. RA in the second cycle of the command means a read address.
The read ID command (Read ID) is a command for reading the product identification code (ID) from the product identification code address (IA). Erase command (Erase)
Is a command to erase the data in the flash memory. At the time of erasing, in order to avoid over-erasing (a phenomenon in which Vth of the memory becomes negative when over-erasing is performed and normal reading cannot be performed), pre-writing for equalizing the write level before erasing is performed, An erasing procedure of erasing little by little while verifying is adopted. The erase verify command (E Verify) is a command for confirming the erased state. EA is a memory address for erase verification. EVD is erase verify output data. Automatic erase mode (AE
(rase) is a command for automatically performing erase and erase verify. After completion of automatic erase, status polling can confirm the end of automatic erase operation. The status polling flag SPF is assigned to the upper bit of the data latch DL in FIG. The write command (Program) is a command for instructing writing, and PA is a write address and P is a write address.
D is write data. The program verify command (P Verify) is a command for confirming whether the data written immediately before is correctly written,
PVD is program verify output data. The reset command (Reset) is a command for resetting the command when the command is mistaken.

【0068】上記コマンド仕様は、特に制限されない
が、平成3年9月に発行の「日立ICメモリデータブッ
ク1」の第868頁から第881頁に記載のHN28F
101シリーズのフラッシュメモリ単体LSI(1Mビ
ットフラッシュメモリ)のコマンド仕様と互換性を有し
ている。
The command specifications are not particularly limited, but the HN28F described in pages 868 to 881 of "Hitachi IC Memory Data Book 1" issued in September 1991.
It is compatible with the command specifications of a 101 series flash memory LSI (1M bit flash memory).

【0069】〔8〕オンボードでの情報書込み動作[8] On-board information writing operation

【0070】オンボード状態での情報書込みなどの指示
とその手順は全てCPU10とその動作プログラムによ
って制御され、コントロールレジスタCREGの各ビッ
トをソフトウェアによりセット/クリアすることにより
情報書込みなどの処理を制御する。このときの書き換え
用プログラムが例えばフラッシュメモリFMRY2上に
置かれているときは、情報書込み動作時或はシステムリ
セット時に予め当該書換え用プログラムはRAMへ転送
され、RAM上の該プログラムをCPU10が実行して
情報書換えなどを行う。このときの書換え処理手順の一
例を以下この項目で説明していく。
All instructions and procedures for writing information in the on-board state are controlled by the CPU 10 and its operation program, and information writing processing is controlled by setting / clearing each bit of the control register CREG by software. . When the rewriting program at this time is placed in the flash memory FMRY2, the rewriting program is transferred to the RAM in advance at the time of the information writing operation or the system reset, and the CPU 10 executes the program on the RAM. And rewrite information. An example of the rewriting processing procedure at this time will be described below in this item.

【0071】フラッシュメモリに対する情報の書込み
は、基本的に消去状態のメモリセルに対して行われる。
マイクロコンピュータがシステムに実装された状態でフ
ラッシュメモリの書換えを行うとき、CPU10が実行
すべき書換え制御プログラムは、消去用プログラムと、
書込み用プログラムを含み、その情報書込みの指示に従
って、最初に消去の処理ルーチンを実行し、ひき続いて
自動的に書込みの処理ルーチンを実行するように書換え
制御プログラムを構成することができる。或は消去と書
込みを分けて別々に動作を指示するようにしてもよい。
Writing of information to the flash memory is basically performed to the memory cell in the erased state.
When the flash memory is rewritten with the microcomputer installed in the system, the rewrite control program to be executed by the CPU 10 is the erasing program,
The rewrite control program may be configured to include a program for writing, and to execute the erasing processing routine first and then automatically execute the writing processing routine in accordance with the information writing instruction. Alternatively, erasing and writing may be divided and the operation may be instructed separately.

【0072】図14及び図15には書込み制御手順の詳
細な一例が示される。同図に示される手順の制御主体は
CPU10である。
14 and 15 show detailed examples of the write control procedure. The control subject of the procedure shown in the figure is the CPU 10.

【0073】バイト単位でのデータ書込みの最初のステ
ップでは、CPU10はその内蔵カウンタnに1をセッ
トする(ステップS1)。次に、CPU10は、フラッ
シュメモリFMRY2に書込むべきデータを図11のデ
ータ入力ラッチDILにセットするとともに、書込みア
ドレスをアドレスラッチAILにセットする(ステップ
S2)。そしてCPU10は、コントロールレジスタC
REGに対するライトサイクルを発行して、プログラム
ビットPをセットする(ステップ3)。これにより制御
回路FCONTは、前記ステップS2でセットされたデ
ータ及びアドレスに基づいて、そのアドレスで指定され
るメモリセルのコントロールゲートとドレインとに高圧
を印加して書込みを行う。このフラッシュメモリ側での
書込み処理時間としてCPU10は(x)μsec待ち
(ステップS4)、次いでプログラムビットPをクリア
する(ステップS5)。ここで(x)μsecの時間は
メモリセルの特性に合わせて決定され、例えば、10μ
secのような時間とされる。
In the first step of writing data in byte units, the CPU 10 sets 1 in its built-in counter n (step S1). Next, the CPU 10 sets the data to be written in the flash memory FMRY2 in the data input latch DIL of FIG. 11 and sets the write address in the address latch AIL (step S2). The CPU 10 then controls the control register C
A write cycle is issued to REG to set program bit P (step 3). As a result, the control circuit FCONT performs writing by applying a high voltage to the control gate and drain of the memory cell designated by the address based on the data and address set in step S2. As the write processing time on the flash memory side, the CPU 10 waits for (x) μsec (step S4), and then clears the program bit P (step S5). Here, the time of (x) μsec is determined according to the characteristics of the memory cell, and is, for example, 10 μm.
The time is set to sec.

【0074】その後、CPU10は書込み状態を確認す
るために、コントロールレジスタCREGに対するライ
トサイクルを発行して、プログラムベリファイビットP
Vをセットする(ステップ6)。これにより制御回路F
CONTは、前記ステップS2でセットされたアドレス
を利用して、そのアドレスで選択されるべきワード線に
ベリファイ用電圧を印加して、前記書込みを行ったメモ
リセルのデータを読出す。読出しのために(y)μse
c待つ(ステップS7)。ここで前記ベリファイ用電圧
は、充分な書込みレベルを保証するため、例えば5Vの
ような電源電圧Vccよりもレベルの高い7Vのような
電圧レベルとされる。(y)secはそのようなベリフ
ァイ用電源の立上がり特性によって決まり、例えば2μ
sec以下とされる。CPU10はそれによって読出さ
れたデータと書込みに利用したデータとの一致を確かめ
る(ステップS8)。CPU10は、ベリファイによっ
て一致を確認すると、プログラムベリファイビットPV
をクリアし(ステップS9)、これにより当該1バイト
データの書込みが完了される。
Thereafter, the CPU 10 issues a write cycle to the control register CREG to confirm the write state, and the program verify bit P
V is set (step 6). As a result, the control circuit F
The CONT uses the address set in step S2, applies a verify voltage to the word line to be selected by the address, and reads the data in the written memory cell. (Y) μse for reading
Wait c (step S7). Here, the verify voltage is set to a voltage level such as 7V which is higher than the power supply voltage Vcc such as 5V in order to ensure a sufficient write level. (Y) sec is determined by the rising characteristics of the verifying power supply, and is, for example, 2 μm.
It is set to sec or less. The CPU 10 confirms that the data read thereby matches the data used for writing (step S8). When the CPU 10 confirms the match by the verify, the program verify bit PV
Is cleared (step S9), whereby the writing of the 1-byte data is completed.

【0075】一方、CPU10は、ステップS8のベリ
ファイによって不一致を確認すると、ステップS10で
プログラムベリファイビットPVをクリアした後、前記
カウンタnの値が、書込みリトライ上限回数Nに到達し
ているかの判定を行う(ステップS11)。この結果、
書込みリトライ上限回数Nに到達している場合には書込
み不良として処理が終了される。書込みリトライ上限回
数Nに到達していない場合には、CPU10は、カウン
タnの値を1だけインクリメントして(ステップS1
2)、前記ステップS3から処理を繰返していく。
On the other hand, when the CPU 10 confirms the mismatch by the verify in step S8, it clears the program verify bit PV in step S10 and then determines whether the value of the counter n has reached the write retry upper limit number N or not. Perform (step S11). As a result,
When the write retry upper limit number N has been reached, the process ends as a write failure. When the write retry upper limit number N has not been reached, the CPU 10 increments the value of the counter n by 1 (step S1).
2) The process is repeated from step S3.

【0076】図16及び図17には消去制御手順の詳細
な一例が示される。同図に示される手順の制御主体はC
PU10である。
16 and 17 show a detailed example of the erase control procedure. The control subject of the procedure shown in the figure is C
It is PU10.

【0077】CPU10は、消去を行うに当たりその内
蔵カウンタnに1をセットする(ステップS21)。次
にCPU10は、消去対象領域のメモリセルに対してプ
レライトを行う(ステップS22)。すなわち、消去対
象アドレスのメモリセルに対してデータ”0”を書込
む。このプレライトの制御手順は前記図14及び図15
で説明した書込み制御手順を流用することができる。こ
のプレライトの処理は、消去前のフローティングゲート
内の電荷量を全ビット均一にして、消去状態を均一化す
るために行われる。
When erasing, the CPU 10 sets 1 in its built-in counter n (step S21). Next, the CPU 10 prewrites the memory cell in the erase target area (step S22). That is, data "0" is written in the memory cell of the erase target address. This pre-write control procedure is shown in FIG. 14 and FIG.
The write control procedure described in 1. can be applied. This pre-write process is performed in order to make the amount of charge in the floating gate before erasing uniform for all bits and make the erased state uniform.

【0078】次に、CPU10は、消去ブロック指定レ
ジスタMBREGに対するライトサイクルを発行して、
一括消去対象メモリブロックを指定する(ステップS2
3)。すなわち、消去ブロック指定レジスタMBREG
1およびMBREG2に消去対象メモリブロック番号を
指定する。消去対象メモリブロックを指定した後、CP
U10は、コントロールレジスタCREGに対するライ
トサイクルを発行して、イレーズビットEをセットする
(ステップ24)。これにより制御回路FCONTは、
前記ステップS23で指定されたメモリブロックのソー
ス線に高電圧を印加させて、当該メモリブロックを一括
消去する。このフラッシュメモリ側での一括消去の処理
時間としてCPU10は例えば(x)msec待つ(ス
テップS25)。ここで(x)msecはメモリセルト
ランジスタの特性に合わせて決定され、例えば10ms
ecとされる。この(x)msecという時間は、1回
で消去動作を完結することができる時間に比べて短い時
間とされている。そして、次いでイレーズビットEをク
リアする(ステップS26)。
Next, the CPU 10 issues a write cycle to the erase block designating register MBREG,
A memory block to be erased collectively is designated (step S2
3). That is, the erase block designation register MBREG
The memory block number to be erased is designated in 1 and MBREG2. After specifying the memory block to be erased,
The U10 issues a write cycle to the control register CREG to set the erase bit E (step 24). This causes the control circuit FCONT to
A high voltage is applied to the source line of the memory block designated in step S23 to erase the memory block at once. The CPU 10 waits, for example, (x) msec as the processing time for batch erasing on the flash memory side (step S25). Here, (x) msec is determined according to the characteristics of the memory cell transistor, and is, for example, 10 ms.
ec. This time (x) msec is shorter than the time required to complete the erase operation once. Then, the erase bit E is cleared (step S26).

【0079】その後、CPU10は消去状態を確認する
ために、先ず一括消去対象メモリブロックの先頭アドレ
スをベリファイすべきアドレスとして内部にセットし
(ステップS27)、次いで、ベリファイアドレスにダ
ミーライトを行う(ステップS28)。すなわち、ベリ
ファイすべきアドレスに対してメモリライトサイクルを
発行する。これにより、ベリファイすべきメモリアドレ
スがアドレスラッチAILに保持される。その後CPU
10は、コントロールレジスタCREGに対するライト
サイクルを発行して、イレーズベリファイビットEVを
セットする(ステップ29)。これにより制御回路FC
ONTは、前記ステップS28でセットされたアドレス
を利用して、そのアドレスで選択されるべきワード線に
消去ベリファイ用電圧を印加して、前記消去されたメモ
リセルのデータを読出す。読出すために(y)μsec
待つ(ステップS30)。ここで前記消去ベリファイ用
電圧は、充分な消去レベルを保証するため、例えば5V
のような電源電圧Vccよりもレベルの低い3.5Vの
ような電圧レベルとされる。前記(y)μsecはその
ようなベリファイ用電源の立上がり特性によって決ま
り、例えば2μsec以下の時間とされる。CPU10
はそれによって読出されたデータが消去完結状態のデー
タに一致するかをベリファイする(ステップS31)。
CPU10は、ベリファイによって一致を確認すると、
イレーズベリファイビットEVをクリアし(ステップS
32)、次いで今回のベリファイアドレスが消去したメ
モリブロックの最終アドレスか否かを判定し(ステップ
S33)、最終アドレスであれば一連の消去動作を終了
する。最終アドレスに至っていないと判定されたとき
は、ベリファイアドレスを1だけインクリメントして
(ステップS34)、再びステップS28からの処理を
繰返していく。
Thereafter, in order to confirm the erased state, the CPU 10 first sets the start address of the batch erase target memory block as the address to be verified internally (step S27), and then performs a dummy write to the verify address (step S27). S28). That is, the memory write cycle is issued to the address to be verified. As a result, the memory address to be verified is held in the address latch AIL. Then CPU
10 issues a write cycle to the control register CREG to set the erase verify bit EV (step 29). As a result, the control circuit FC
The ONT uses the address set in step S28 to apply an erase verify voltage to the word line to be selected by the address, and reads the data in the erased memory cell. (Y) μsec to read
Wait (step S30). Here, the erase verify voltage is, for example, 5 V in order to guarantee a sufficient erase level.
The voltage level is 3.5V, which is lower than the power supply voltage Vcc. The (y) μsec is determined by such a rising characteristic of the verifying power supply, and is set to 2 μsec or less, for example. CPU10
Verifies whether the data read thereby matches the data in the erase completed state (step S31).
When the CPU 10 confirms the match by verifying,
Erase verify bit EV is cleared (step S
32) Next, it is judged whether or not the verify address of this time is the final address of the erased memory block (step S33), and if it is the final address, a series of erasing operations are ended. If it is determined that the final address has not been reached, the verify address is incremented by 1 (step S34), and the processing from step S28 is repeated.

【0080】一方、CPU10は、ステップS31のベ
リファイによって不一致を確認すると、ステップS35
でイレーズベリファイビットEVをクリアした後、前記
カウンタnの値が、漸次消去上限回数Nに到達している
かの判定を行う(ステップS36)。この結果、漸次消
去上限回数Nに到達している場合には消去不良として処
理が終了される。漸次消去上限回数Nに到達していない
場合には、CPU10は、カウンタnの値を1だけイン
クリメントして(ステップS37)、前記ステップS2
4から処理を繰返していく。実際には、消去し過ぎによ
ってメモリセルのしきい値電圧が負の値になってしまう
ような過消去を防止するために、1回毎にベリファイを
行いながら10msecというような短時間づつ徐々に
消去がくり返し行われていく。
On the other hand, when the CPU 10 confirms the disagreement by the verification in step S31, the CPU 10 proceeds to step S35.
After clearing the erase verify bit EV at, it is determined whether the value of the counter n has reached the upper limit number of times N of erasure (step S36). As a result, if the erasure upper limit number N has been reached gradually, the process ends as an erasing failure. When the erasure upper limit number N has not been reached, the CPU 10 increments the value of the counter n by 1 (step S37), and then the step S2.
The process is repeated from 4. In practice, in order to prevent over-erase in which the threshold voltage of the memory cell becomes a negative value due to over-erasing, verify is performed every time and gradually a short time such as 10 msec. Erasing is repeated.

【0081】[0081]

〔9〕コマンド方式による情報書込み動作
(コマンド対応)
[9] Information writing operation by command method (command compatible)

【0082】モード信号MD0〜MD2を介してマイク
ロコンピュータMCU3にPROMライタによる情報書
込みモードが設定されると、フラッシュメモリFMRY
2はPROMライタ30によってコマンド方式と呼ばれ
る方式で情報に書込みなどが行われる。ここで、コマン
ド方式とは、フラッシュメモリに対する情報書込みなど
の指示が、PROMライタ30のような外部装置からコ
マンドによって与えられることをいう。コマンドに従っ
た処理はCPU10が制御する。そのための制御プログ
ラムは、フラッシュメモリFMRY2が有し、PROM
ライタ30による情報書込みモードの設定に呼応してそ
のプログラムがRAMに転送され、RAMに転送された
制御プログラムをCPU10が実行する。この動作プロ
グラムは、前記オンボード状態で内蔵フラッシュメモリ
の情報書込みを制御するためのプログラムと部分的に共
通化しても、また全く別であってもよい。コマンド仕様
は図13に従って前述した通りであり、以下コマンド毎
にその動作を説明する。
When the information writing mode by the PROM writer is set in the microcomputer MCU3 via the mode signals MD0 to MD2, the flash memory FMRY
The PROM writer 30 is used for writing information 2 in a method called a command method. Here, the command method means that an instruction such as information writing to the flash memory is given by a command from an external device such as the PROM writer 30. The processing according to the command is controlled by the CPU 10. The control program for that purpose is included in the flash memory FMRY2 and is stored in the PROM.
The program is transferred to the RAM in response to the setting of the information writing mode by the writer 30, and the CPU 10 executes the control program transferred to the RAM. This operation program may be partially shared with the program for controlling the writing of information in the built-in flash memory in the on-board state, or may be completely separate. The command specifications are as described above with reference to FIG. 13, and the operation will be described below for each command.

【0083】(1)書込みコマンド PROMライタ30はCPU10とは非同期で、図13
のコマンド仕様に従って、コマンド、データ、及びアド
レスを書込む。CPU10は初めにコマンドフラグCF
=1(既にコマンドが入力されている)もしくはデータ
フラグDF=1(コマンドが入力され、さらにデータも
入力されている)の場合にコマンドを読みに行き、コマ
ンド認識後データフラグDF=1の場合にデータやアド
レスを読みに行くという動作を行う。PROMライタ3
0から供給されるコマンドは、コマンドフラグCF=0
かつデータフラグDF=0に従ってコマンドラッチCL
にラッチされる。メモリセルに書込まれるべきデータ
は、コマンドフラグCF=1かつデータフラグDF=0
に従ってデータラッチDLにラッチされる。CPU10
は、読み込んだコマンドが「書込みコマンド」であると
認識すると、その動作プログラムに従ってアドレスラッ
チAL、データラッチDLからアドレス、データを読ん
で、フラッシュメモリFMRY2内部のアドレス入力ラ
ッチAIL、データ入力ラッチDILにアドレス、デー
タを転送する。そしてCPU10は、コントロールレジ
スタCREGの書込みビット(Pビット)をセットする
ことで実際にフラッシュメモリFMRY2のメモリセル
に書込みを行う。メモリセルに対する実際の書込み処理
手順は、図14で説明した内容と実質的に同じである。
書込みが行われた後PビットをクリアしCF、DFを0
にもどす。書込み動作時のフラグCF,DFの状態とC
PU10の動作をまとめたものは図18に示される。
(1) Write command The PROM writer 30 is asynchronous with the CPU 10, and
Write commands, data, and addresses according to the command specifications of. The CPU 10 first sets the command flag CF.
= 1 (command already input) or data flag DF = 1 (command input and data input), read command, and after command recognition data flag DF = 1 The operation to go to read data and address is performed. PROM writer 3
The command supplied from 0 is the command flag CF = 0.
And the command latch CL according to the data flag DF = 0
Latched on. The data to be written in the memory cell is the command flag CF = 1 and the data flag DF = 0.
Is latched by the data latch DL. CPU10
When recognizing that the read command is a "write command", the address and data are read from the address latch AL and the data latch DL in accordance with the operation program, and the address input data AIL and the data input latch DIL in the flash memory FMRY2 are read. Transfer address and data. Then, the CPU 10 actually writes in the memory cell of the flash memory FMRY2 by setting the write bit (P bit) of the control register CREG. The actual write processing procedure for the memory cell is substantially the same as the content described with reference to FIG.
After writing, clear P bit and clear CF and DF to 0
Return to. State of flags CF and DF and C during write operation
A summary of the operation of the PU 10 is shown in FIG.

【0084】(2)書込みベリファイコマンド 書込みにはその動作の終了に伴って書き込みベリファイ
モードが必ず実行される。書込みベリファイは直前に書
き込んだデータが書き込まれているかを確認する動作で
ある。本コマンドの場合もコマンドの解析までの動作は
前記書込みコマンドと同様に行われる。CPU10はコ
マンドが書込みベリファイコマンドである事を認識する
と、以下の手順で制御を行う。まずコントロールレジス
タCREGのPVビット(プログラムベリファイビッ
ト)を”1”にセットする。この時フラッシュメモリF
MRY2内のアドレスラッチAILには直前の書込みを
行ったときのアドレスがラッチされているのでこのアド
レスで選択されるワード線にベリファイ用の電圧(たと
えば7v)が印加される。次にCPU10はフラッシュ
メモリFMRY2のリードを行う。この場合もアドレス
としてはラッチされているアドレスが用いられるので、
結局先に書込みを行ったメモリセルに対してゲート電圧
としてベリファイ用の電圧を印加した状態でリードが行
われることになる。CPU10はこのリードしたデータ
をポートPORTのデータラッチDLに書き込み、PV
ビットをクリアすることによって動作を終了する。PR
OMライタ30はデータラッチDLの値をリードするこ
とによってベリファイを行う。書込みベリファイ時のフ
ラグの状態とCPU10の動作については図19にまと
めて示されている。
(2) Write Verify Command In writing, the write verify mode is always executed at the end of the operation. The write verify is an operation for confirming whether the data written immediately before is written. In the case of this command, the operation up to the analysis of the command is performed in the same manner as the write command. When the CPU 10 recognizes that the command is the write verify command, the CPU 10 performs control according to the following procedure. First, the PV bit (program verify bit) of the control register CREG is set to "1". Flash memory F at this time
Since the address at the time of the immediately preceding write is latched in the address latch AIL in MRY2, the verify voltage (for example, 7v) is applied to the word line selected by this address. Next, the CPU 10 reads the flash memory FMRY2. In this case also, since the latched address is used as the address,
Eventually, the reading is performed in the state where the verify voltage is applied as the gate voltage to the memory cell in which the writing is performed first. The CPU 10 writes the read data in the data latch DL of the port PORT, and PV
The operation ends by clearing the bit. PR
The OM writer 30 performs verification by reading the value of the data latch DL. The state of the flags and the operation of the CPU 10 at the time of write verify are shown together in FIG.

【0085】(3)消去コマンド 本実施例のマイクロコンピュータMCU3に従えば、内
蔵フラッシュメモリFMRY2の消去は前記フラッシュ
メモリ単体LSIとしての1Mフラッシュメモリ(HN
28F101)とコンパチブルにするため、ブロック消
去はサポートせずマット一括消去のみとされる。図13
のコマンド仕様から明らかなように、消去コマンドが2
回書き込まれると消去が始まる。消去の場合もコマンド
解析までの動作は書込みの場合と同じである。消去は消
去ブロック指定レジスタMBREGを全ビット選択状態
にセットした後、コントロールレジスタCREGのEビ
ット(イレースビット)を”1”にセットすることによ
りスタートする。Eビットをセットすることによりメモ
リマットのソース線に高電圧が印加され消去が行われ
る。一定時間Eビットを”1”にした後クリアして消去
を終了する。メモリセルに対する消去の制御手順は、図
2Aで説明した制御内容と実質的に同じである。
(3) Erase Command According to the microcomputer MCU3 of the present embodiment, the internal flash memory FMRY2 is erased by the 1M flash memory (HN) as the flash memory single LSI.
28F101), the block erase is not supported and only the matte batch erase is performed. FIG.
As is clear from the command specifications of
When data is written twice, erasing starts. In the case of erasing, the operation up to command analysis is the same as in writing. The erasing is started by setting the erasing block designating register MBREG to the all bit selection state and then setting the E bit (erase bit) of the control register CREG to "1". By setting the E bit, a high voltage is applied to the source line of the memory mat to erase it. After the E bit is set to "1" for a certain period of time, it is cleared and the erasing is completed. The erase control procedure for the memory cell is substantially the same as the control content described in FIG. 2A.

【0086】(4)消去ベリファイコマンド 消去後実行されるベリファイは書込みベリファイと類似
した動作となる。コマンド解析後、CPU10はポート
のアドレスラッチALからベリファイを行うアドレスを
読み込み、フラッシュメモリFMRY2にライトする。
次にCPU10がコントロールレジスタCREGのEV
ビットをセットすることにより、先にラッチされたアド
レスで選択されたワード線にベリファイ用の電圧(例え
ば3.5v)が印加される。この状態でCPU10はフ
ラッシュメモリFMRY2をリードし、リードしたデー
タをポートのデータラッチDLにライトする。その後E
Vビットをクリアし、動作を終了する。
(4) Erase Verify The verify executed after erasing the command is similar to the write verify. After the command analysis, the CPU 10 reads the address to be verified from the port address latch AL and writes it in the flash memory FMRY2.
Next, the CPU 10 makes the EV of the control register CREG
By setting the bit, a verify voltage (for example, 3.5v) is applied to the word line selected by the previously latched address. In this state, the CPU 10 reads the flash memory FMRY2 and writes the read data in the data latch DL of the port. Then E
The V bit is cleared and the operation ends.

【0087】(5)自動消去コマンド 自動消去コマンド認識後、図16及び図17に示した消
去フローをCPU10自体が全て行うものである。自動
消去ではフラッシュメモリFMRY2は消去開始と同時
にステータスポーリング信号を出力、消去終了で信号を
反転させる仕様となっている。ステータスポーリングの
出力はI/O7なのでデータラッチDLの第7ビットを
ステータスポーリング信号を格納するビットとする。C
PU10は消去開始と同時にデータラッチDLの第7ビ
ットをクリアし、消去終了でセットする。
(5) Automatic erasing command After recognizing the automatic erasing command, the CPU 10 itself performs all the erasing flows shown in FIGS. 16 and 17. In automatic erasing, the flash memory FMRY2 is designed to output a status polling signal at the start of erasing and invert the signal at the end of erasing. Since the status polling output is I / O7, the 7th bit of the data latch DL is used as a bit for storing the status polling signal. C
The PU 10 clears the 7th bit of the data latch DL at the start of erasing and sets it at the end of erasing.

【0088】(6)読み出しコマンド 読み出しのコマンド(リード系コマンド)が発行される
とフラッシュメモリFMRY2はPROMライタ30か
ら自由にリードできる状態にされる必要がある。前述し
た方式ではCPU10でコマンドの解析を行うため、コ
マンドが入力されてからリード可能な状態になるまでの
時間が長くなり前記1Mフラッシュメモリの仕様に合わ
せることができない。そこで読み出しモードの際は前記
バススイッチBSWでCPU10を切り離し、外部から
内蔵フラッシュメモリFMRY2を直接アクセスできる
ようにされる。CPU10はバス権開放を要求するBR
EQ(バスリクエスト)信号を外部から入力できるよう
になっているが、CPU10がバスを開放するまで時間
がかかるため、バススイッチBSWで物理的にバスを切
り離すようになっている。CPU10を介すると全てに
おいて時間がかかるため、読み出し系コマンドであるこ
とがデコーダDECで認識されると、即座にバスを切り
離す。この際CPU10へはコマンドが入力されたこと
を認識させないようにする為、読み出し系コマンドの場
合はコマンドフラグCF=0のままとし、その他のコマ
ンドの場合のみコマンドフラグCF=0からコマンドフ
ラグCF=1へフラグが変化される。
(6) Read Command When a read command (read command) is issued, the flash memory FMRY2 needs to be ready to be read by the PROM writer 30. In the method described above, since the CPU 10 analyzes the command, it takes a long time from when the command is input to when the command is ready to be read, and the specification of the 1M flash memory cannot be met. Therefore, in the read mode, the CPU 10 is disconnected by the bus switch BSW so that the built-in flash memory FMRY2 can be directly accessed from the outside. The CPU 10 requests the bus right release BR
Although an EQ (bus request) signal can be input from the outside, it takes time until the CPU 10 releases the bus, so the bus switch BSW physically disconnects the bus. Since it takes time in all cases via the CPU 10, when the decoder DEC recognizes that the command is a read system command, it immediately disconnects the bus. At this time, in order to prevent the CPU 10 from recognizing that a command has been input, the command flag CF = 0 is kept in the case of a read command, and the command flag CF = 0 to the command flag CF = only in the case of other commands. The flag is changed to 1.

【0089】(7)リセットコマンド コマンドのセットアップを間違えた場合の為にリセット
コマンドが用意されている。図13のコマンド仕様から
も明らかなように、このリセットコマンドを2回書き込
むことでリセットが完了する仕様となっている。本実施
例のマイクロコンピュータMCU3では、1回目に何等
かのコマンドが入力された後またコマンドを入力すると
そのコマンドはデータラッチDLに入力さてしまう為、
最初に書込まれたリセットコマンドはデータFFHと認
識されてしまう可能性がある。しかしフラッシュメモリ
は浮遊ゲートから電子が引き抜かれた消去状態を”1”
とみなす為、書込みコマンドが先に入力されていたとし
てもFFHは何も書き込まないことと等しいことになり
全く問題ない。そして、2回目に書込まれたリセットコ
マンドがコマンドデコーダDECでデコードされると、
そのまま読み出しモードと同様読み出し状態にされて動
作を終了する。斯るリセット時のフラグの状態とCPU
10の動作については図20と図21にまとめて示され
ている。
(7) Reset command A reset command is prepared in case the command setup is mistaken. As is clear from the command specifications of FIG. 13, the specification is such that the reset is completed by writing this reset command twice. In the microcomputer MCU3 of this embodiment, if a command is input again after the first input of some command, the command is input to the data latch DL.
The reset command written first may be recognized as the data FFH. However, in the flash memory, the erased state in which electrons are extracted from the floating gate is "1".
Therefore, even if the write command is input first, FFH is equivalent to not writing anything and there is no problem. Then, when the reset command written the second time is decoded by the command decoder DEC,
The read state is left as it is in the read mode, and the operation ends. State of flag at reset and CPU
The operation of 10 is collectively shown in FIGS. 20 and 21.

【0090】〔10〕コマンド方式による情報書込み時
のPROMライタ30の動作
[10] Operation of PROM writer 30 when writing information by command method

【0091】図22及び図23には情報書込みに際して
のPROMライタ30の動作フローチャートが示され
る。先ず端子Vppに12Vのような書込みに必要な高
電圧を出力し(ステップS40)、内蔵アドレスカウン
タを0に初期化する(ステップS41)と共に、カウン
タnを0に設定する(ステップS42)。次いでカウン
タnを1インクリメントし(ステップS43)、その後
にプログラムコマンドの書込みサイクルを起動して書込
みコマンド(40H)をコマンドラッチに書込む(ステ
ップS44)。その次に、書込みデータ(PD)及び書
込みアドレス(PA)をデータラッチDL及びアドレス
ラッチALに書込む(ステップS45)。その後例えば
25μsec待つ(ステップS46)。この間にマイク
ロコンピュータのCPU10はコマンドを解釈してフラ
ッシュメモリFMRY2にデータを書込む。そして今度
は、書込みベリファイコマンドの書込みサイクルを起動
し(ステップS47)、例えば6μsec待つ(ステッ
プS48)。この間にマイクロコンピュータMCU3の
CPU10はそのコマンドを解釈して書込みアドレスの
データをデータラッチDLに読出す。PROMライタ3
0はその読出しデータを取り込んで、正常に書込みでき
たかを判定する(ステップS49)。正常と判定したと
きは、最終書込みアドレスかの判定を行い(ステップS
50)、最後でなければ書込みアドレスをインクリメン
トし(ステップS51)、その後ステップS42に戻
り、最終アドレスまで書込みを行った後は端子Vppに
5Vのような電圧Vccを印可して(ステップS5
2)、書込みを終了する。ステップS49において書込
み異常が判定されたときは、カウンタnの値が最大限2
0に到達するまで再度ステップS43に戻って書込みを
くり返し、20回繰り返しても依然書込み異常が解消さ
れない場合にはそのアドレスが不良ビットであることを
以って処理を終了する。
22 and 23 show operation flowcharts of the PROM writer 30 at the time of writing information. First, a high voltage such as 12 V required for writing is output to the terminal Vpp (step S40), the built-in address counter is initialized to 0 (step S41), and the counter n is set to 0 (step S42). Then, the counter n is incremented by 1 (step S43), and then the write cycle of the program command is activated to write the write command (40H) in the command latch (step S44). Then, the write data (PD) and the write address (PA) are written in the data latch DL and the address latch AL (step S45). Then, for example, wait for 25 μsec (step S46). During this time, the CPU 10 of the microcomputer interprets the command and writes the data in the flash memory FMRY2. Then, this time, the write cycle of the write verify command is activated (step S47), and waits, for example, 6 μsec (step S48). During this time, the CPU 10 of the microcomputer MCU3 interprets the command and reads the data of the write address into the data latch DL. PROM writer 3
For 0, the read data is taken in and it is judged whether or not the data could be written normally (step S49). When it is determined to be normal, it is determined whether it is the final write address (step S
50) If it is not the last, the write address is incremented (step S51), then the process returns to step S42, and after writing to the final address, a voltage Vcc such as 5V is applied to the terminal Vpp (step S5).
2), writing is completed. If it is determined in step S49 that the writing is abnormal, the value of the counter n is 2 at the maximum.
The process returns to step S43 again until 0 is reached, and the writing is repeated. If the writing abnormality is still not solved even after repeating 20 times, the processing is terminated because the address is a defective bit.

【0092】図24及び図25には消去に際してのPR
OMライタ30の動作フローチャートが示される。先ず
フラッシュメモリの消去対象全ビットに論理値0のデー
タを書込む。書込みの処理は図22及び図23に従う。
次に消去領域の先頭アドレスをアドレスカウンタにセッ
トし(ステップS61)、カウンタnを0に設定する
(ステップS62)。次いでカウンタnを1インクリメ
ントし(ステップS63)、その後に、消去コマンドの
書込みサイクルを起動して消去コマンド(20H)をコ
マンドラッチに書込む(ステップS64)。その後例え
ば10msec待つ(ステップS65)。この間にマイ
クロコンピュータMCU3のCPU10はコマンドを解
釈してフラッシュメモリFMRY2の消去を行う。そし
て今度は、消去ベリファイコマンドの書込みサイクルを
起動し(ステップS66)、例えば6μsec待つ(ス
テップS67)。この間にマイクロコンピュータMCU
3のCPU10はそのコマンドを解釈して消去ベリファ
イアドレス(EA)のデータを読出してデータラッチD
Lに転送する。PROMライタ30はその読出しデータ
を取り込んで、正常に消去できたかを判定する(ステッ
プS68)。正常と判定したときは、最終消去アドレス
かの判定を行い(ステップS69)、最後でなければ消
去ベリファイアドレスをインクリメントし(ステップS
70)し、その後でステップS66に戻り、最終アドレ
スまで消去ベリファイを行って処理を終了する。ステッ
プS68において消去異常が判定されたときは、カウン
タnの値が最大限3000に到達するまで再度ステップ
S63に戻って消去を繰返し、3000回繰り返しても
依然消去異常が解消されない場合にはそのアドレスが不
良ビットであることを以って処理を終了する。
24 and 25, PR for erasing
An operation flowchart of the OM writer 30 is shown. First, data having a logical value of 0 is written in all bits to be erased in the flash memory. The writing process complies with FIG. 22 and FIG.
Next, the start address of the erase area is set in the address counter (step S61), and the counter n is set to 0 (step S62). Next, the counter n is incremented by 1 (step S63), and then the erase command write cycle is activated to write the erase command (20H) to the command latch (step S64). Then, for example, wait 10 msec (step S65). During this time, the CPU 10 of the microcomputer MCU3 interprets the command and erases the flash memory FMRY2. Then, this time, the write cycle of the erase verify command is activated (step S66) and waits, for example, 6 μsec (step S67). During this period, the microcomputer MCU
The CPU 10 of No. 3 interprets the command, reads the data of the erase verify address (EA), and outputs the data latch D.
Transfer to L. The PROM writer 30 takes in the read data and determines whether the data can be erased normally (step S68). If it is determined to be normal, it is determined whether it is the final erase address (step S69), and if it is not the last one, the erase verify address is incremented (step S69).
70), and thereafter, the process returns to step S66, erase verification is performed up to the final address, and the process ends. If the erase abnormality is determined in step S68, the process returns to step S63 again to repeat the erase until the value of the counter n reaches 3000 at the maximum, and if the erase abnormality is still not solved even after repeating 3000 times, the address is deleted. Is a defective bit and the process is terminated.

【0093】〔11〕コマンド方式による情報書き込み
時のCPUの動作
[11] Operation of CPU when writing information by command system

【0094】図26にはCPU10による前記各種コマ
ンドに対する処理のメインフローチャートが示される。
CPU10は前記コマンドフラグCF及びデータフラグ
DFをサンプリングしており、それのセット状態を検出
すると、コマンドラッチCLの上位4ビットを読み込ん
でコマンドを解析する。それがA0Hであるときは消去
ベリファイ(Erase Verify)、C0Hであ
るときは書込みベリファイ(Program Veri
fy)、40Hのときは書込み(Program)、2
0Hのときは消去(Erase)、30Hのときは自動
消去書(Auto Erase)、の各処理に処理ルー
チンを分岐する。尚、図13で説明したその他のコマン
ドについては説明を省略する。
FIG. 26 shows a main flowchart of the processing for the various commands by the CPU 10.
The CPU 10 samples the command flag CF and the data flag DF, and when detecting the set state thereof, reads the upper 4 bits of the command latch CL and analyzes the command. When it is A0H, erase verify (Erase Verify), and when it is C0H, write verify (Program Veri).
fy), write when 40H (Program), 2
The processing routine branches to each processing of erasing (Erase) when 0H and automatic erasing (Auto Erase) when 30H. The description of the other commands described in FIG. 13 will be omitted.

【0095】消去(Erase)の処理ルーチンでは、
図27に示されるようにフラッシュメモリの消去に必要
なシーケンスを制御した後、コマンドフラグCFをクリ
アして処理を終了する。図27に示される消去ベリファ
イ(Erase Verify)の処理ルーチンでは、
アドレスラッチALから消去ベリファイアドレスを取込
んでコントロールレジスタCREGに消去ベリファイモ
ードを設定して、そのアドレスのデータをリードしてデ
ータラッチDLに転送する。自動消去(Auto Er
ase)の処理ルーチンでは、図28に示されるよう
に、内蔵フラッシュメモリFMRY2の全アドレスに対
するプレライト実施の制御を行った後、消去の制御を行
い、次いで消去ベリファイを実行させる。消去及び消去
ベリファイの制御は全アドレスの消去完了まで行われ、
また、消去状態の判定で消去異常が度重なって消去時間
の上限を越えた場合には不良ビットの存在を以って処理
が終了される。書込み(Program)の処理ルーチ
ンでは、図29に示されるように、データフラグDFの
セット状態を判定すると、アドレスラッチALから書込
みアドレスを取り込み、且つ、データラッチDLから書
込みデータを取り込んで、フラッシュメモリFMRY2
に書込みを行い、その後データフラグDFをクリアして
処理を終了する。書込みベリファイ(Program
Verify)の処理ルーチンでは、図29に示される
ように、コントロールレジスタCREGに書込みベリフ
ァイモードを設定し、直前の書込みアドレスからデータ
を読出し、これをデータラッチDLに転送し、更にコマ
ンドフラグCFをクリアして処理を終了する。
In the erase (Erase) processing routine,
As shown in FIG. 27, after controlling the sequence necessary for erasing the flash memory, the command flag CF is cleared and the process ends. In the erase verify (erase verify) processing routine shown in FIG.
The erase verify address is fetched from the address latch AL, the erase verify mode is set in the control register CREG, the data at the address is read and transferred to the data latch DL. Auto Erase (Auto Er
In the processing routine of (ase), as shown in FIG. 28, after performing pre-write execution control for all addresses of the built-in flash memory FMRY2, erase control is performed, and then erase verify is performed. Erase and erase verify control are performed until all addresses are erased.
If the erase state is repeatedly judged by the erase state and the upper limit of the erase time is exceeded, the process ends with the presence of a defective bit. In the write (Program) processing routine, as shown in FIG. 29, when the set state of the data flag DF is determined, the write address is fetched from the address latch AL and the write data is fetched from the data latch DL, and the flash memory is fetched. FMRY2
The data flag DF is cleared, and the process ends. Write verify (Program
In the (Verify) processing routine, as shown in FIG. 29, the write verify mode is set in the control register CREG, the data is read from the immediately preceding write address, this is transferred to the data latch DL, and the command flag CF is cleared. Then, the process ends.

【0096】〔12〕PROMライタにとっての単体フ
ラッシュメモリLSIとの互換性
[12] Compatibility of a PROM writer with a single flash memory LSI

【0097】PROMライタ30を利用してコマンド方
式で内蔵フラッシュメモリFMRY2に情報書込みを行
うときの仕様と、前記単体フラッシュメモリLSI(H
N28F101)をPROMライタ30をつかって情報
書込みするときの仕様との、コンパチビリティーについ
て本発明者は確認した。これによれば、PROMライタ
30による情報書込みを前記1Mフラッシュメモリ単体
LSI(HN28F1013)と同じ仕様にするには、
各種タイミングをその1Mフラッシュメモリと合わせる
ことが必要である。そこで実際に制御プログラムを作成
し、タイミングを合わせることができるか検討した。こ
の検討結果は図30に示される。この結果から例えば動
作周波数16MHz時においてはコンパチブルであるこ
とを確認できた。
Specifications for writing information in the built-in flash memory FMRY2 by the command method using the PROM writer 30, and the single flash memory LSI (H
The present inventor has confirmed the compatibility with N28F101) specifications for writing information using the PROM writer 30. According to this, in order to make the information writing by the PROM writer 30 the same specification as the 1M flash memory single LSI (HN28F1013),
It is necessary to match various timings with the 1M flash memory. Therefore, we actually created a control program and examined whether the timing could be adjusted. The result of this examination is shown in FIG. From these results, it was confirmed that they were compatible at an operating frequency of 16 MHz, for example.

【0098】上記実施例によれば以下の作用効果があ
る。
According to the above embodiment, the following operational effects can be obtained.

【0099】(1)PROMライタ30から非同期で与
えられるコマンドに応じた書換えシーケンスをマイクロ
コンピュータの内蔵回路で実現するから、PROMライ
タ30にとってデータ情報とアドレス情報を与える前
に、データ情報を与えるのと同様にしてコマンドをコマ
ンドラッチに書込めばよく、汎用的に利用されるPRO
Mライタ30にソケットアダプタを介して結合すること
によって、マイクロコンピュータ内蔵のフラッシュメモ
リに対する情報書込みを行うことができる。
(1) Since the rewriting sequence corresponding to the command asynchronously given from the PROM writer 30 is realized by the built-in circuit of the microcomputer, the data information is given to the PROM writer 30 before giving the data information and the address information. Write the command to the command latch in the same way as in
By connecting to the M writer 30 via a socket adapter, information can be written in the flash memory built in the microcomputer.

【0100】(2)コマンドによって指示される書換え
のためのシーケンスを内蔵CPU10に制御させること
により、その制御のための専用回路を不要若しくは削減
でき、マイクロコンピュータのチップ面積低減を実現す
る。更に、書換えのための制御シーケンスは、CPU1
0が実行すべきソフトウェアで変更可能であるから、フ
ラッシュメモリを構成する記憶素子の特性に合わせて書
き込み時間などの条件設定を簡単に行うことができる。
(2) By causing the built-in CPU 10 to control the rewriting sequence instructed by the command, a dedicated circuit for the control can be eliminated or reduced, and the chip area of the microcomputer can be reduced. Further, the control sequence for rewriting is the CPU1
Since 0 can be changed by software to be executed, it is possible to easily set the conditions such as the write time according to the characteristics of the storage element forming the flash memory.

【0101】(3)汎用的に利用されるPROMライタ
30は、少なくとも、不揮発性記憶素子に対する書換え
用高電圧を印加し、書換えのためのアドレスやデータを
書込み信号などに従ってフラッシュメモリを含む対象半
導体装置(LSI)に供給するようになっている。この
ようなPROMライタ30は、コマンド、データ、及び
アドレスを、マイクロコンピュータ内蔵CPU10とは
非同期で供給してくる。このとき、前記コマンドラッチ
CLにコマンドが書き込まれたことを示すコマンドフラ
グCFと、このコマンドフラッグCFがコマンドラッチ
状態を示すときに、前記コマンドラッチCLに代えて外
部から書込み可能にされるデータラッチDLとを備える
ことにより、PROMライタ30から相互に別サイクル
で書き込まれるコマンドとデータ情報とのラッチ手段上
での衝突を防止することができる。
(3) The PROM writer 30 used for general purpose applies at least a high voltage for rewriting to the non-volatile memory element, and writes the address and data for rewriting according to the write signal or the like to the target semiconductor including the flash memory. It is supplied to a device (LSI). Such a PROM writer 30 supplies commands, data, and addresses asynchronously with the microcomputer built-in CPU 10. At this time, a command flag CF indicating that a command has been written to the command latch CL, and a data latch that is externally writable in place of the command latch CL when the command flag CF indicates a command latch state. By including the DL, it is possible to prevent a command and data information written from the PROM writer 30 in mutually different cycles from colliding on the latch means.

【0102】(4)CPU10は、コマンドフラグCF
のコマンドラッチ状態に基づいてコマンドラッチCLの
コマンドをリードするが、このとき、コマンドラッチC
Lのラッチ内容をデコードしてコマンドフラグCFをコ
マンドラッチ状態にセットするコマンドデコーダDEC
を設けることにより、コマンドフラグに対するセット処
理の迅速化を図ることができる。仮に、コマンドフラグ
に対する制御もCPU11に委ねるならば、CPU11
はバスサイクルを起動して常にコマンドラッチCLの内
容をモニタしなければならず、動作上無駄を生じ、フラ
グ処理も遅くなってしまう。
(4) The CPU 10 sends the command flag CF
The command of the command latch CL is read based on the command latch state of
Command decoder DEC that decodes the latch contents of L and sets the command flag CF to the command latch state
By providing the, it is possible to speed up the setting process for the command flag. If the control of the command flag is also entrusted to the CPU 11, the CPU 11
Must start the bus cycle and constantly monitor the content of the command latch CL, which causes waste in operation and delays flag processing.

【0103】(5)コマンドデコーダDECによるリー
ド系コマンドのデコード結果に従ってCPU11をフラ
ッシュメモリから切り離すバススイッチBSWを設ける
ことにより、コマンドラッチにラッチした全てのコマン
ドをCPU10が解析していたのではそのコマンドで指
示される動作のタイミングが間に合わないリード系コマ
ンドに対して容易に対処できる。このことは、マイクロ
コンピュータ内蔵フラッシュメモリに対して、PROM
ライタ30にとっての単体フラッシュメモリLSIに対
する書込み処理との互換性を実現可能にする。
(5) The command decoder DEC is provided with the bus switch BSW for disconnecting the CPU 11 from the flash memory according to the result of decoding of the read command, so that the CPU 10 analyzes all the commands latched in the command latch. It is possible to easily deal with a read-type command that is not in time for the operation instructed by. This means that PROM is
This makes it possible for the writer 30 to achieve compatibility with the writing process for the single flash memory LSI.

【0104】(6)前記CPU10が実行すべきフラッ
シュメモリ書換えのための手順制御用プログラムを、フ
ラッシュメモリに格納しておき、PROMライタ30に
よる書換え動作モードの設定に呼応してそのプログラム
をRAMに転送し、そのRAMに転送された前記プログ
ラムをCPU10に実行させるようにすることにより、
書換え用プログラムの修正が簡単に行える。
(6) The procedure control program for rewriting the flash memory to be executed by the CPU 10 is stored in the flash memory, and the program is stored in the RAM in response to the setting of the rewriting operation mode by the PROM writer 30. By transferring and causing the CPU 10 to execute the program transferred to the RAM,
The rewriting program can be easily modified.

【0105】(7)用途に応じてフラッシュメモリに格
納すべき情報量がその情報の種類例えばプログラム、デ
ータテーブル、制御データなどに応じて相違されること
を考慮した場合、前記フラッシュメモリにおける一括消
去可能な単位として、相互に記憶容量の相違される複数
個のメモリブロックを設けておくことにより、システム
実装後内蔵フラッシュメモリの保持情報の部分的若しく
は一部の書換えに伴って、メモリブロックを一括消去し
た後の書込み動作の無駄をなくして、書換え効率を向上
させることができる。
(7) Considering that the amount of information to be stored in the flash memory differs depending on the type of the information, such as a program, a data table, control data, etc., depending on the application, batch erasing in the flash memory By providing a plurality of memory blocks with mutually different storage capacities as a possible unit, the memory blocks can be grouped together when the information stored in the internal flash memory is partially or partially rewritten after system installation. It is possible to improve the rewriting efficiency by eliminating the waste of the writing operation after erasing.

【0106】以上本発明者によってなされた発明を実施
例に基づいて具体的に説明したが、本発明はそれに限定
されるものではなく、その要旨を逸脱しない範囲におい
て種々変更可能であることは言うまでもない。
Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited to the embodiments and various modifications can be made without departing from the scope of the invention. Yes.

【0107】例えば、マイクロコンピュータに内蔵され
る周辺回路は上記実施例に限定されず適宜変更すること
ができる。フラッシュメモリのメモリセルトランジスタ
は上記実施例のスタックドゲート構造のMOSトランジ
スタに限定されず、書込み動作にもトンネル現象を用い
たFLOTOX型のメモリセルトランジスタを用いるこ
とも可能である。また、一括消去の単位はソース線を共
通にするメモリブロックのほか、消去においてワード線
を共通化できるメモリブロックとすることもできるが、
その何れを選択するかは、消去電圧の極性をどうする
か、或は、一括消去単位の記憶容量を極力小さくしよう
とする場合に単一のワード線に接続するメモリセルの数
と単一のデータ線に接続されるメモリセルの数との何れ
の方が少ないかなどの事情を考慮して決定することがで
きる。メモリブロックのサイズについては上記実施例の
ようなサイズ固定に限定されない。例えば、コントロー
ルレジスタの設定又はモード信号の指示にしたがってそ
のサイズを可変にすることができる。例えば、ワード線
を最小単位として一括消去電圧を印加する場合には、ワ
ード線を消去電圧で駆動するドライバの動作をそのコン
トロールレジスタの設定又はモード信号の指示にしたが
って選択させればよい。更にメモリブロックの分割態様
としては、全体を複数個の大ブロックに分割し、更にそ
の各大ブロックの中を複数個の小ブロックに分けて、大
ブロック単位又は小ブロック単位で一括消去できるよう
にすることも可能である。また、CPUの制御に基づい
てフラッシュメモリを書換える方式においては、書換え
条件などをセルフチューニングするソフトウェアを採用
することも可能である。また、フラッシュメモリのメモ
リセルトランジスタにおいて、そのソース及びドレイン
は、印加される電圧によって定まる相対的なものとして
把握されるものもある。
For example, the peripheral circuit built in the microcomputer is not limited to the above-mentioned embodiment, but can be changed as appropriate. The memory cell transistor of the flash memory is not limited to the stacked gate structure MOS transistor of the above embodiment, and it is also possible to use a FLOTOX type memory cell transistor using the tunnel phenomenon for the write operation. In addition, the unit of collective erasure can be a memory block in which the source lines are shared, or a memory block in which word lines can be shared during erasure.
Which one is selected depends on the polarity of the erase voltage or the number of memory cells connected to a single word line and a single data line when the storage capacity of the batch erase unit is to be minimized. It can be determined in consideration of circumstances such as which one is smaller than the number of memory cells connected to the line. The size of the memory block is not limited to the fixed size as in the above embodiment. For example, the size can be made variable according to the setting of the control register or the instruction of the mode signal. For example, when a batch erase voltage is applied with the word line as the minimum unit, the operation of the driver for driving the word line with the erase voltage may be selected according to the setting of the control register or the instruction of the mode signal. Further, as a division mode of the memory block, the whole is divided into a plurality of large blocks, and each of the large blocks is divided into a plurality of small blocks so that they can be collectively erased in a large block unit or a small block unit. It is also possible to do so. Further, in the method of rewriting the flash memory under the control of the CPU, it is also possible to employ software for self-tuning the rewriting conditions and the like. In addition, in a memory cell transistor of a flash memory, its source and drain may be understood as a relative one determined by an applied voltage.

【0108】本発明は、少なくとも単一の半導体チップ
上に中央処理装置と電気的に書換え可能な不揮発性のフ
ラッシュメモリとを備えた条件のデータ処理装置に広く
適用することができる。
The present invention can be widely applied to a data processing device provided with a central processing unit and an electrically rewritable nonvolatile flash memory on at least a single semiconductor chip.

【0109】[0109]

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

【0110】外部装置から非同期で与えられるコマンド
に応じた書換えシーケンスを内蔵回路で実現することに
より、外部装置にとってデータ情報とアドレス情報を与
える前に、データ情報を与えるのと同様にしてコマンド
をデータ処理装置に与えればよく、汎用的に利用される
PROMライタのような外部装置にソケットアダプタを
介して結合することによって、データ処理装置内蔵のフ
ラッシュメモリに対する情報書込みを容易に行うことが
できるという効果がある。
By implementing the rewriting sequence according to the command asynchronously given from the external device by the built-in circuit, before the data information and the address information are given to the external device, the command is transmitted in the same manner as the data information is given. It suffices to provide it to the processing device, and by connecting it to an external device such as a PROM writer used for general purpose through a socket adapter, it is possible to easily write information to the flash memory built in the data processing device. There is.

【0111】コマンドによって指示される書換えのため
のシーケンスを内蔵中央処理装置が制御することによ
り、その制御のための専用回路を不要若しくは削減し、
データ処理装置のチップ面積低減を実現する。更に、書
換えのための制御シーケンスを中央処理装置が実行する
ソフトウェアで変更可能であり、これにより、フラッシ
ュメモリを構成する記憶素子の特性に合わせて書き込み
時間などの条件設定を容易に行えるという効果がある。
By controlling the rewriting sequence instructed by the command by the built-in central processing unit, a dedicated circuit for the control is unnecessary or eliminated,
The chip area of the data processing device is reduced. Furthermore, the control sequence for rewriting can be changed by software executed by the central processing unit, which has the effect of easily setting the conditions such as the write time according to the characteristics of the storage elements forming the flash memory. is there.

【0112】コマンドラッチ手段にコマンドが書き込ま
れたことを示すフラグ手段と、このフラグ手段が前記コ
マンドラッチ状態を示すときに、前記コマンドラッチ手
段に代えて外部から書込み可能にされるデータラッチ手
段とを備えることにより、PROMライタのような外部
装置から相互に別サイクルで書き込まれるコマンドとデ
ータ情報とのラッチ手段上での衝突を防止することがで
きる。
Flag means for indicating that a command has been written in the command latch means, and data latch means that is externally writable in place of the command latch means when the flag means indicates the command latch state. By including the above, it is possible to prevent the command and the data information, which are written in different cycles from an external device such as a PROM writer, from colliding on the latch means.

【0113】前記コマンドラッチ手段のラッチ内容をデ
コードし、前記所定のコマンドをデコードすることによ
って前記フラグ手段をコマンドラッチ状態にセットする
コマンドデコーダを採用することにより、フラグ手段に
対する処理の迅速化を図ることができる。
By adopting a command decoder which decodes the latch contents of the command latch means and decodes the predetermined command to set the flag means to the command latch state, the processing for the flag means is speeded up. be able to.

【0114】コマンドデコーダによるリード系コマンド
のデコード結果に従って中央処理装置をフラッシュメモ
リから切り離すゲート手段を設けることにより、コマン
ドラッチ手段にラッチした全てのコマンドを中央処理装
置が解析していたのではそのコマンドで指示される動作
のタイミングが間に合わないようなリード系コマンドに
対して容易に対処できる。このことは、データ処理装置
内蔵フラッシュメモリに対して、PROMライタのよう
な外部装置にとっての単体フラッシュメモリLSIに対
する書込み処理との互換性を実現可能にする。
By providing the gate means for disconnecting the central processing unit from the flash memory according to the decoding result of the read command by the command decoder, the central processing unit may have analyzed all the commands latched in the command latch means. It is possible to easily deal with a read command in which the timing of the operation instructed by is not in time. This makes it possible to realize the compatibility of the flash memory with the built-in data processing device with the writing process to the single flash memory LSI for an external device such as a PROM writer.

【0115】用途に応じてフラッシュメモリに格納すべ
き情報量がその情報の種類例えばプログラム、データテ
ーブル、制御データなどに応じて相違されることを考慮
した場合、前記フラッシュメモリにおける一括消去可能
な単位として、相互に記憶容量の相違される複数個のメ
モリブロックを設けることにより、システム実装後内蔵
フラッシュメモリの保持情報の部分的若しくは一部の書
換えに伴って、メモリブロックを一括消去した後の書込
み動作の無駄をなくして、書換え効率を向上させること
ができる。
Considering that the amount of information to be stored in the flash memory differs depending on the type of the information, such as a program, a data table, control data, etc., depending on the application, a batch erasable unit in the flash memory. As a result, by providing a plurality of memory blocks having mutually different storage capacities, writing after erasing all the memory blocks collectively with the partial or partial rewriting of the retained information in the internal flash memory after the system is mounted. Rewriting efficiency can be improved by eliminating waste of operation.

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

【図1】フラッシュメモリを内蔵した第1の実施例に係
るマイクロコンピュータにおいてその内蔵フラッシュメ
モリをPROMライタで書換え処理するときの機能ブロ
ック図である。
FIG. 1 is a functional block diagram when a PROM writer rewrites a built-in flash memory in a microcomputer according to a first embodiment having a built-in flash memory.

【図2】フラッシュメモリを内蔵した第2の実施例に係
るマイクロコンピュータにおいてその内蔵フラッシュメ
モリをPROMライタで書換え処理するときの機能ブロ
ック図である。
FIG. 2 is a functional block diagram when rewriting processing of the built-in flash memory by a PROM writer in the microcomputer according to the second embodiment having the built-in flash memory.

【図3】PROMライタによるコマンド書込みの一例タ
イミングチャートである。
FIG. 3 is a timing chart of an example of command writing by a PROM writer.

【図4】CPU制御によるフラッシュメモリの情報書込
みサイクルの一例タイミングチャートである。
FIG. 4 is a timing chart of an example of an information write cycle of a flash memory under CPU control.

【図5】図1の第1の実施例と図2の第2の実施例との
効果の相違を示す説明図である。
5 is an explanatory diagram showing a difference in effect between the first embodiment of FIG. 1 and the second embodiment of FIG.

【図6】図2のマイクロコンピュータに対応される更に
詳細なマイクロコンピュータの実施例ブロック図であ
る。
FIG. 6 is a block diagram of a more detailed embodiment of a microcomputer corresponding to the microcomputer of FIG.

【図7】図6のマイクロコンピュータをパッケージん具
下状態で示す平面図である。
FIG. 7 is a plan view showing the microcomputer of FIG. 6 under a packaging tool.

【図8】図6のマイクロコンピュータに内蔵されるフラ
ッシュメモリの全体的なブロック図である。
8 is an overall block diagram of a flash memory incorporated in the microcomputer of FIG.

【図9】メモリブロックの分割態様の一例を示す説明図
である。
FIG. 9 is an explanatory diagram showing an example of a division mode of a memory block.

【図10】コントロールレジスタと消去ブロック指定レ
ジスタの一例説明図である。
FIG. 10 is an explanatory diagram of an example of a control register and an erase block designation register.

【図11】図6のマイクロコンピュータにおいてコマン
ド方式によるPROMライタ書換えモードに対応するた
めのハードウェアの詳細を示すブロック図である。
11 is a block diagram showing details of hardware for supporting a PROM writer rewriting mode by a command method in the microcomputer of FIG. 6;

【図12】コマンドフラグ及びデータフラグ並びにバス
スイッチの制御形式を示す説明図である。
FIG. 12 is an explanatory diagram showing command flags, data flags, and bus switch control formats.

【図13】PROMライタから供給可能なコマンドの一
例仕様説明図である。
FIG. 13 is an explanatory diagram of an example of commands that can be supplied from a PROM writer.

【図14】オンボード状態での書込み制御手順の前半を
示す詳細な一例フローチャートである。
FIG. 14 is a detailed example flowchart showing the first half of the write control procedure in the on-board state.

【図15】オンボード状態での書込み制御手順の後半を
示す詳細な一例フローチャートである。
FIG. 15 is a detailed example flowchart showing the latter half of the write control procedure in the on-board state.

【図16】オンボード状態での消去制御手順の前半を示
す詳細な一例フローチャートである。
FIG. 16 is a detailed example flowchart showing the first half of the erase control procedure in the on-board state.

【図17】オンボード状態での消去制御手順の後半を示
す詳細な一例フローチャートである。
FIG. 17 is a detailed example flowchart showing the latter half of the erase control procedure in the on-board state.

【図18】PROMライタによる書込み動作時のフラグ
CF,DFの状態とCPUの動作をまとめた説明図であ
る。
FIG. 18 is an explanatory diagram summarizing the states of flags CF and DF and the operation of the CPU during the write operation by the PROM writer.

【図19】PROMライタによる書込みベリファイ時の
フラグの状態とCPUの動作についてまとめた説明図で
ある。
FIG. 19 is an explanatory diagram summarizing the states of flags and the operation of the CPU at the time of write verification by the PROM writer.

【図20】PROMライタによるリセット時のフラグの
状態とCPUの動作についてまとめた第1の説明図であ
る。
FIG. 20 is a first explanatory diagram summarizing the states of flags at the time of resetting by the PROM writer and the operation of the CPU.

【図21】PROMライタによるリセット時のフラグの
状態とCPUの動作についてまとめた第2の説明図であ
る。
FIG. 21 is a second explanatory diagram summarizing the states of flags at the time of resetting by the PROM writer and the operation of the CPU.

【図22】コマンド方式による情報書込みに際してのP
ROMライタの動作の前半を示す一例フローチャートで
ある。
[Fig. 22] P for writing information by the command method
6 is an example flowchart showing the first half of the operation of the ROM writer.

【図23】コマンド方式による情報書込みに際してのP
ROMライタの動作の後半を示す一例フローチャートで
ある。
[FIG. 23] P for writing information by a command method
7 is an example flowchart showing the latter half of the operation of the ROM writer.

【図24】コマンド方式による消去に際してのPROM
ライタの動作の前半を示す一例フローチャートが示され
る。
FIG. 24 is a PROM when erasing by the command method.
An example flow chart showing the first half of the operation of the writer is shown.

【図25】コマンド方式による消去に際してのPROM
ライタの動作の後半を示す一例フローチャートが示され
る。
FIG. 25 is a PROM when erasing by the command method.
An example flow chart showing the latter half of the operation of the writer is shown.

【図26】PROMライタから与えられるコマンドに対
するCPUの処理のメインフローチャートである。
FIG. 26 is a main flowchart of the processing of the CPU with respect to the command given from the PROM writer.

【図27】図26に示される消去(Erase)の処理
ルーチンと消去ベリファイ(Erase Verif
y)の処理ルーチンを示すフローチャートである。
FIG. 27 is a processing routine of erase (Erase) and erase verify (Erase Verif) shown in FIG. 26;
It is a flow chart which shows a processing routine of y).

【図28】図26に示される自動消去書(Auto E
rase)の処理ルーチンを示すフローチャートであ
る。
FIG. 28 is an automatic erasure document (Auto E shown in FIG.
(rase) processing routine.

【図29】図26に示される書込み(Program)
の処理ルーチンと書込みベリファイ(Program
Verify)の処理ルーチンを示すフローチャートで
ある。
FIG. 29 is a diagram showing the writing (Program) shown in FIG. 26;
Processing routine and write verify (Program
It is a flowchart which shows the processing routine of (Verify).

【図30】PROMライタによる書込み仕様の検討結果
を示す説明図である。
FIG. 30 is an explanatory diagram showing a result of examining a writing specification by a PROM writer.

【図31】フラッシュメモリの原理説明図である。FIG. 31 is a diagram illustrating the principle of a flash memory.

【図32】フラッシュメモリのメモリセルアレイにたい
する構成原理説明図である。
FIG. 32 is an explanatory diagram of a configuration principle for a memory cell array of a flash memory.

【図33】フラッシュメモリに対する消去動作並びに書
込み動作のための電圧条件の一例説明図である。
FIG. 33 is an explanatory diagram showing an example of voltage conditions for an erase operation and a write operation for a flash memory.

【図34】一括消去可能なメモリブロックの記憶容量を
相違させたフラッシュメモリの一例回路ブロック図であ
る。
FIG. 34 is a circuit block diagram of an example of a flash memory in which the memory capacities of batch-erasable memory blocks are different.

【符号の説明】[Explanation of symbols]

MCU1 マイクロコンピュータ MCU2 マイクロコンピュータ MCU3 マイクロコンピュータ 10 CPU FMRY2 フラッシュメモリ 21 コマンドラッチ手段 22 コマンド解析手段 23 シーケンス制御手段 30 PROMライタ CREG コントロールレジスタ MBREG 消去ブロック指定レジスタ SMB0〜SMB7 小メモリブロック LMB0〜LMB6 大メモリブロック CL コマンドレジスタ CF コマンドフラグ DF データフラグ DL データレジスタ AL アドレスレジスタ DEC コマンドデコーダ BSW バススイッチ Q1〜Q4 メモリセルトランジスタ SL1,SL2 ソース線 DL1,DL2 データ線 WL1,WL2 ワード線 MCU1 microcomputer MCU2 microcomputer MCU3 microcomputer 10 CPU FMRY2 flash memory 21 Command Latch Means 22 Command analysis means 23 Sequence control means 30 PROM writer CREG control register MBREG erase block specification register SMB0 to SMB7 Small memory block LMB0 to LMB6 Large memory block CL command register CF command flag DF data flag DL data register AL address register DEC command decoder BSW bus switch Q1 to Q4 memory cell transistors SL1, SL2 source line DL1, DL2 data line WL1, WL2 word line

───────────────────────────────────────────────────── フロントページの続き (72)発明者 向井 浩文 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所武蔵工場内 (72)発明者 石川 栄一 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所武蔵工場内 Fターム(参考) 5B062 CC03 EE09    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Hirofumi Mukai             5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Stock             Ceremony company Hitachi Ltd. Musashi factory (72) Inventor Eiichi Ishikawa             5-20-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Stock             Ceremony company Hitachi Ltd. Musashi factory F-term (reference) 5B062 CC03 EE09

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置と電気的に書換え可能なフ
ラッシュメモリとが一つの半導体基板上に形成され、外
部装置から入力されるコマンドに従って動作する第1動
作モードを有するマイクロコンピュータにおいて、 外部端子と、前記中央処理装置、前記フラッシュメモリ
及び前記外部端子に接続されるバスとを具備し、 前記第1動作モードにおいて、前記外部装置から前記フ
ラッシュメモリに記憶される情報を読み出すための読出
しコマンドが前記マイクロコンピュータに入力された場
合に、前記中央処理装置を前記バスから切り離すことを
特徴とするマイクロコンピュータ。
1. A microcomputer having a first operation mode in which a central processing unit and an electrically rewritable flash memory are formed on one semiconductor substrate and which operates in accordance with a command input from an external device. And a bus connected to the central processing unit, the flash memory and the external terminal, and a read command for reading information stored in the flash memory from the external device in the first operation mode. A microcomputer characterized by disconnecting the central processing unit from the bus when input to the microcomputer.
【請求項2】 請求項1において、 前記マイクロコンピュータは、前記外部装置から入力さ
れるコマンドが書き込まれるコマンドラッチ手段と、前
記コマンドラッチ手段にラッチされたコマンドを解析す
るコマンド解析手段と、解析された内容に応じて前記フ
ラッシュメモリの書換えのための手順制御を行う制御手
段とを更に具備することを特徴とするマイクロコンピュ
ータ。
2. The microcomputer according to claim 1, further comprising a command latch unit for writing a command input from the external device, a command analysis unit for analyzing the command latched in the command latch unit, and an analysis unit. The microcomputer further comprising: a control unit that controls a procedure for rewriting the flash memory according to the contents.
【請求項3】 請求項2において、 前記解析手段及び制御手段は、前記中央処理装置である
ことを特徴とするマイクロコンピュータ。
3. The microcomputer according to claim 2, wherein the analysis unit and the control unit are the central processing unit.
【請求項4】 請求項2又は3において、 前記コマンドラッチ手段にコマンドが書き込まれたこと
を示すフラグ手段を更に具備し、 前記外部装置から入力されるコマンドが前記フラッシュ
メモリに情報を書き込むことを示すものである場合に、
前記フラグ手段にコマンドが書き込まれたことを示す情
報を書き込み、前記外部装置から入力されたコマンドが
前記読出しコマンドの場合には、前記フラグ手段にコマ
ンドが書き込まれたことを示す情報を書き込まないこと
を特徴とするマイクロコンピュータ。
4. The flash memory according to claim 2, further comprising flag means indicating that a command has been written in the command latch means, wherein a command input from the external device writes information in the flash memory. If it is
Write information indicating that a command has been written to the flag means, and do not write information indicating that a command has been written to the flag means when the command input from the external device is the read command. Microcomputer characterized by.
【請求項5】 外部装置から内蔵するフラッシュメモリ
の情報を読み出す場合に、中央処理装置をバスから切り
離すことを特徴としたマイクロコンピュータ。
5. A microcomputer characterized by disconnecting a central processing unit from a bus when reading information in a built-in flash memory from an external device.
JP2003023225A 2003-01-31 2003-01-31 Microcomputer Expired - Lifetime JP3810745B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003023225A JP3810745B2 (en) 2003-01-31 2003-01-31 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003023225A JP3810745B2 (en) 2003-01-31 2003-01-31 Microcomputer

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP23431092A Division JP3765585B2 (en) 1992-03-17 1992-08-10 Data processing device

Publications (2)

Publication Number Publication Date
JP2003203064A true JP2003203064A (en) 2003-07-18
JP3810745B2 JP3810745B2 (en) 2006-08-16

Family

ID=27656155

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003023225A Expired - Lifetime JP3810745B2 (en) 2003-01-31 2003-01-31 Microcomputer

Country Status (1)

Country Link
JP (1) JP3810745B2 (en)

Also Published As

Publication number Publication date
JP3810745B2 (en) 2006-08-16

Similar Documents

Publication Publication Date Title
US5844843A (en) Single chip data processing apparatus having a flash memory which is rewritable under the control of built-in CPU in the external write mode
US8854885B2 (en) Apparatus and method for reduced peak power consumption during common operation of multi-nand flash memory devices
US7002853B2 (en) Memory card having a buffer memory for storing testing instruction
US9324434B2 (en) Determining memory page status
US10359944B2 (en) Memory devices having distributed controller systems
US7916557B2 (en) NAND interface
US7057937B1 (en) Data processing apparatus having a flash memory built-in which is rewritable by use of external device
EP0617377A2 (en) Microcomputer with flash memory
JP3765585B2 (en) Data processing device
JPH113594A (en) Non-volatile memory, data writing and read method
JP3810745B2 (en) Microcomputer
JPH11185485A (en) Semiconductor storage and data processor
JP4127562B2 (en) Microcomputer
JP4018402B2 (en) Manufacturing method of semiconductor system
JP2003076672A (en) Microcomputer
JP2004246923A (en) Microcomputer
JP2008004258A (en) Manufacturing method of semiconductor system
JP2008276938A (en) Microcomputer
JPH11316753A (en) Micro computer

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060424

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: 20060523

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060524

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

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100602

Year of fee payment: 4

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110602

Year of fee payment: 5

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110602

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110602

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120602

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120602

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130602

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130602

Year of fee payment: 7