JPH09251447A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH09251447A
JPH09251447A JP8057706A JP5770696A JPH09251447A JP H09251447 A JPH09251447 A JP H09251447A JP 8057706 A JP8057706 A JP 8057706A JP 5770696 A JP5770696 A JP 5770696A JP H09251447 A JPH09251447 A JP H09251447A
Authority
JP
Japan
Prior art keywords
data
volatile memory
address area
cpu
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8057706A
Other languages
Japanese (ja)
Inventor
Toru Watanabe
徹 渡辺
Susumu Yamada
進 山田
Nobuhiro Arai
信宏 荒井
Toshikazu Abe
俊和 安倍
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP8057706A priority Critical patent/JPH09251447A/en
Priority to US08/811,572 priority patent/US5950222A/en
Priority to KR1019970008548A priority patent/KR100299542B1/en
Publication of JPH09251447A publication Critical patent/JPH09251447A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To speedily correspond to the change of a data rewrite method and to reduce a chip area by allocating the specified address area of a non-volatile memory to a program area for rewriting data on a remaining address area in the non-volatile memory. SOLUTION: The address area A of EEPROM (flash memory) 1 being the non-volatile memory where data can repetitively be written/read and written data can electrically be deleted is allocated to a program area for data rewriting in the remaining address area B and the address area B is allocated to a data area for the operation control of a one chip microcomputer. In such a case, the program of the address area A of EEPROM 1 can easily be changed by supplying data to EEPROM 1 from an external PROM writer and it can speedily correspond to the program change.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、フラッシュメモリ
(EEPROM)を内蔵するマイクロコンピュータに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microcomputer incorporating a flash memory (EEPROM).

【0002】[0002]

【従来の技術】1チップマイクロコンピュータとは、プ
ログラムメモリ(不揮発性メモリ)を同一チップ上に集
積化したものである。前記プログラムメモリには、マス
クROM、EPROM、EEPROM等が使用される。 (1)マスクROM内蔵の場合 複数枚のマスクを1度製造してしまえば、量産効率を向
上でき且つチップ面積を小さくできる利点がある。しか
し、プログラム変更が要求されると、複数枚のマスクを
再度製造する必要があり、多くの製造時間を要して前記
要求に迅速に対応できない欠点がある。 (2)EPROM内蔵の場合 現データを紫外線消去した後に新データを書き込むこと
で、プログラム変更に迅速に対応できる利点がある。し
かし、現データが全て紫外線消去されてしまい、消去不
要であった同一データを再度書き込まなければならない
欠点がある。 (3)EEPROM内蔵の場合 現データを電気的消去した後に新データを書き込むこと
で、プログラム変更に迅速に対応できる利点がある。ま
た、現データを部分的に消去できるので、消去不要のデ
ータをそのまま残すことができる。
2. Description of the Related Art A one-chip microcomputer is a program memory (nonvolatile memory) integrated on the same chip. A mask ROM, EPROM, EEPROM or the like is used as the program memory. (1) Built-in mask ROM If a plurality of masks are manufactured once, there is an advantage that mass production efficiency can be improved and a chip area can be reduced. However, when a program change is required, it is necessary to manufacture a plurality of masks again, which requires a lot of manufacturing time and cannot meet the request promptly. (2) Built-in EPROM There is an advantage that the program change can be promptly dealt with by writing the new data after erasing the current data with ultraviolet rays. However, all of the current data is erased by ultraviolet rays, and the same data that did not need to be erased must be rewritten. (3) Built-in EEPROM By electrically erasing the current data and then writing new data, there is an advantage that the program can be promptly changed. Moreover, since the current data can be partially erased, the data that does not need to be erased can be left as it is.

【0003】さて、最近の1チップマイクロコンピュー
タは、前記各不揮発性メモリの利点を利用し、EEPR
OM及びマスクROMを内蔵している。前記EEPRO
Mは、1チップマイクロコンピュータの動作制御の為の
プログラムメモリとして使用され、前記マスクROM
は、前記EEPROMのデータ書き換えの為のプログラ
ムメモリとして使用される。
Now, the recent one-chip microcomputer utilizes the advantages of the above-mentioned non-volatile memories and uses the EEPR.
It contains OM and mask ROM. The EEPRO
M is used as a program memory for controlling the operation of the one-chip microcomputer, and is the mask ROM.
Is used as a program memory for rewriting the data in the EEPROM.

【0004】これより、前記1チップマイクロコンピュ
ータは、前記EEPROMのデータ書き換えを自分自身
で実行でき、汎用性が向上したことになる。
As a result, the one-chip microcomputer can rewrite the data in the EEPROM by itself, and the versatility is improved.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、前記E
EPROMのデータ書き換え方法を変更したい場合、前
記マスクROMの為のマスクを新たに製造し直す必要が
あり、これより、前記マスクROMのプログラム変更に
迅速に対応できない問題があった。また、1チップ上に
前記EEPROM及び前記マスクROMを配線を介して
独立に配置しなければならない為、チップ面積が大きく
なる問題があった。
However, the above E
When it is desired to change the data rewriting method of the EPROM, it is necessary to remanufacture a mask for the mask ROM, which causes a problem that the program change of the mask ROM cannot be promptly dealt with. Further, since the EEPROM and the mask ROM must be independently arranged on one chip via wiring, there is a problem that the chip area becomes large.

【0006】そこで、本発明は、データを繰り返し書き
込み及び読み出しできると共に書き込み済データを電気
的に消去できる不揮発性メモリを内蔵したマイクロコン
ピュータにおいて、前記不揮発性メモリのデータ書き換
え方法の変更に迅速に対応でき、且つ、チップ面積を小
さくできるマイクロコンピュータを提供することを目的
とする。
Therefore, the present invention, in a microcomputer having a built-in non-volatile memory capable of repeatedly writing and reading data and electrically erasing written data, quickly responds to a change in the data rewriting method of the non-volatile memory. An object of the present invention is to provide a microcomputer that can be manufactured and can reduce the chip area.

【0007】[0007]

【課題を解決するための手段】本発明は、前記問題点を
解決する為に成されたものであり、データを繰り返し書
き込み及び読み出しできると共に書き込み済のデータを
電気的に消去できる不揮発性メモリを内蔵したマイクロ
コンピュータにおいて、前記不揮発性メモリの特定のア
ドレス領域を、前記不揮発性メモリの残余のアドレス領
域のデータを書き換える為のプログラム領域に割り当て
た。
The present invention has been made to solve the above problems, and provides a nonvolatile memory capable of repeatedly writing and reading data and electrically erasing written data. In the built-in microcomputer, a specific address area of the non-volatile memory is assigned to a program area for rewriting data in the remaining address area of the non-volatile memory.

【0008】また、データを繰り返し書き込み及び読み
出しできると共に書き込み済のデータを電気的に消去で
きるメモリであって、特定のアドレス領域を、残余のア
ドレス領域のデータを書き換える為のプログラム領域に
割り当てた不揮発性メモリと、前記不揮発性メモリの特
定のアドレス領域から読み出された命令に基づき、前記
不揮発性メモリの残余のアドレス領域の書き換え処理を
行うCPUと、前記不揮発性メモリの残余のアドレス領
域の書き換え処理を行っている期間、前記不揮発性メモ
リの特定のアドレス領域から次命令が読み出されるのを
禁止する禁止手段と、を備えた。
Further, it is a memory capable of repeatedly writing and reading data and electrically erasing the written data, wherein a specific address area is assigned to a program area for rewriting data in the remaining address area. Memory and a CPU that performs rewriting processing of the remaining address area of the non-volatile memory based on an instruction read from a specific address area of the non-volatile memory, and rewriting of the remaining address area of the non-volatile memory. And a prohibition unit that prohibits the next instruction from being read from a specific address area of the non-volatile memory while the processing is being performed.

【0009】更に、データを繰り返し書き込み及び読み
出しできると共に書き込み済のデータを電気的に消去で
きるメモリであって、特定のアドレス領域を、残余のア
ドレス領域のデータを書き換える為のプログラム領域に
割り当てた不揮発性メモリと、プログラムカウンタを含
み、前記不揮発性メモリの特定のアドレス領域から読み
出されたプログラム命令に基づいて動作するCPUと、
前記CPUから前記不揮発性メモリの書き換えすべきア
ドレスデータが供給され且つ保持するアドレス保持回路
と、前記CPUから前記不揮発性メモリの書き換えデー
タが供給され且つ保持するデータ保持回路と、前記不揮
発性メモリの特定のアドレス領域から、残余のアドレス
領域のデータの書き換えを開始するプログラム命令が読
み出された時、データ書き換えに要する時間だけ、前記
不揮発性メモリを書き込みモードに設定し、且つ、前記
プログラムカウンタの出力を無効として前記アドレス保
持回路による前記不揮発性メモリの指定アドレスに前記
データ保持回路のデータを書き込ませるメモリ制御回路
と、前記不揮発性メモリが書き込みモードに設定されて
いる時、前記CPUが前記不揮発性メモリの不定状態に
ある読み出し出力の影響を受けるのを禁止するCPU制
御回路と、を備えた。
Furthermore, it is a memory that can repeatedly write and read data and can electrically erase the written data, and a specific address area is assigned to a program area for rewriting data in the remaining address area. Memory and a program counter, and a CPU that operates based on a program instruction read from a specific address area of the nonvolatile memory,
An address holding circuit for supplying and holding address data to be rewritten in the non-volatile memory from the CPU, a data holding circuit for supplying and holding rewriting data in the non-volatile memory from the CPU, and a non-volatile memory When a program command to start rewriting data in the remaining address area is read from a specific address area, the nonvolatile memory is set to the write mode for the time required for data rewriting, and the program counter A memory control circuit that invalidates the output and writes the data of the data holding circuit to a specified address of the non-volatile memory by the address holding circuit; and the non-volatile memory when the non-volatile memory is set to the write mode. Output of static memory in indefinite state A CPU control circuit for prohibiting the affected, with a.

【0010】[0010]

【発明の実施の形態】本発明の詳細を図面に従って具体
的に説明する。図1は本発明のマイクロコンピュータを
示す回路ブロック図であり、1チップ上に集積化され
る。図2は図1の動作を説明する為のタイムチャートで
ある。図1において、(1)はEEPROMである。E
EPROM(1)は、データを繰り返し書き込み及び読
み出しできると共に書き込み済データを電気的に消去で
きる不揮発性メモリである。EEPROM(1)のアド
レス領域Aは、残余のアドレス領域Bのデータ書き換え
用のプログラム領域に割り当てられ、アドレス領域B
は、1チップマイクロコンピュータの動作制御等の為の
データ領域に割り当てられる。EEPROM(1)は、
アドレスデータが印加される端子AD、書き込みデータ
が印加される端子DIN、読み出しデータが出力される
端子DOUT、書き込みモード設定信号が印加される端
子WEを有している。尚、EEPROM(1)のアドレ
ス領域Aのプログラムは、外部PROMライタ(図示せ
ず)からEEPROM(1)にデータを供給することに
より容易に変更でき、プログラム変更に迅速に対応でき
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The details of the present invention will be specifically described with reference to the drawings. FIG. 1 is a circuit block diagram showing a microcomputer of the present invention, which is integrated on one chip. FIG. 2 is a time chart for explaining the operation of FIG. In FIG. 1, (1) is an EEPROM. E
The EPROM (1) is a non-volatile memory capable of repeatedly writing and reading data and electrically erasing written data. The address area A of the EEPROM (1) is allocated to the program area for data rewriting of the remaining address area B, and the address area B
Is assigned to a data area for controlling operation of the one-chip microcomputer. EEPROM (1) is
It has a terminal AD to which address data is applied, a terminal DIN to which write data is applied, a terminal DOUT to which read data is output, and a terminal WE to which a write mode setting signal is applied. The program in the address area A of the EEPROM (1) can be easily changed by supplying data from the external PROM writer (not shown) to the EEPROM (1), and the program can be quickly changed.

【0011】(2)はCPUであり、EEPROM
(1)の端子DOUTからの読み出しデータに基づいて
動作するものである。CPU(2)は、プログラムカウ
ンタ(3)、インストラクションレジスタ、インストラ
クションデコーダ、演算論理ユニット等、論理動作を実
行するのに必要な構成を含むものとする。(4)はラッ
チ回路(請求項3に言うアドレス保持回路)であり、E
EPROM(1)のアドレスデータのビット数mと等し
い個数だけ設けられる。ラッチ回路(4)のL端子はア
ドレスバス(5)m本を介してCPU(2)のアドレス
端子と並列接続され、C端子はCPU(2)のクロック
端子と共通接続される。即ち、ラッチ回路(4)は、ク
ロックCK0に同期してアドレスデータをラッチする。
(2) is a CPU, which is an EEPROM
It operates based on the read data from the terminal DOUT in (1). The CPU (2) is assumed to include a program counter (3), an instruction register, an instruction decoder, an arithmetic logic unit, and the like, which are necessary for executing a logical operation. (4) is a latch circuit (address holding circuit according to claim 3),
A number equal to the bit number m of the address data of the EPROM (1) is provided. The L terminal of the latch circuit (4) is connected in parallel to the address terminal of the CPU (2) via the m address buses (5), and the C terminal is commonly connected to the clock terminal of the CPU (2). That is, the latch circuit (4) latches the address data in synchronization with the clock CK0.

【0012】(6)はラッチ回路(請求項3に言うデー
タ保持回路)であり、EEPROM(1)の1バイトの
ビット数nと等しい個数だけ設けられる。ラッチ回路
(6)のL端子はデータバス(7)n本を介してCPU
(2)のデータ端子と並列接続され、C端子はCPU
(2)の他のクロック端子と共通接続され、Q端子はE
EPROM(1)の端子DINと接続される。即ち、ラ
ッチ回路(6)は、クロックCK1に同期して書き込み
データをラッチすると共にEEPROM(1)に供給す
る。
Reference numeral (6) is a latch circuit (a data holding circuit according to claim 3), which is provided in the same number as the bit number n of 1 byte of the EEPROM (1). The L terminal of the latch circuit (6) is connected to the CPU via the data bus (7) n
It is connected in parallel with the data terminal of (2), and the C terminal is the CPU
Commonly connected to the other clock terminals of (2), and the Q terminal is E
It is connected to the terminal DIN of the EPROM (1). That is, the latch circuit (6) latches the write data in synchronization with the clock CK1 and supplies the write data to the EEPROM (1).

【0013】ANDゲート(8)(9)及びORゲート
(10)は切換回路を構成する。該切換回路は、ラッチ
回路(4)と等しい個数mだけ設けられる。ANDゲー
ト(8)の一方の入力端子はプログラムカウンタ(3)
の出力端子と接続され、ANDゲート(9)の一方の入
力端子はラッチ回路(4)のQ端子と接続され、ORゲ
ート(10)の出力端子はEEPROM(1)の端子A
Dと接続される。即ち、切換回路は、後述する選択信号
SELECTに応じて、プログラムカウンタ(3)又は
ラッチ回路(4)の何れか一方のアドレスデータをEE
PROM(1)に供給する。
The AND gates (8) and (9) and the OR gate (10) form a switching circuit. The switching circuits are provided by the same number m as the latch circuits (4). One input terminal of the AND gate (8) is a program counter (3)
Of the AND gate (9), one input terminal of the AND gate (9) is connected to the Q terminal of the latch circuit (4), and the output terminal of the OR gate (10) is the terminal A of the EEPROM (1).
Connected with D. That is, the switching circuit EE sets the address data of either the program counter (3) or the latch circuit (4) according to the selection signal SELECT which will be described later.
Supply to PROM (1).

【0014】(11)はメモリ制御回路である。EEP
ROM(1)からアドレス領域Bのデータ書き換えを開
始するプログラム命令が読み出された時、CPU(2)
は該プログラム命令を解読してスタートパルスSTAR
Tを出力する。メモリ制御回路(11)は、スタートパ
ルスSTARTの立ち下がりを検出し、ここから時間T
0だけ経過した後に時間T1だけローレベルとなるモー
ド制御信号MODEを出力し、EEPROM(1)の端
子WEに供給する。従って、EEPROM(1)は、モ
ード制御信号MODEがローレベルとなる期間T1の
み、書き込みモードに設定される。尚、期間T1は、E
EPROM(1)が指定されたアドレスにデータを書き
込む為に必要十分な時間に設定されている。メモリ制御
回路(11)は、モード制御信号MODEの立ち上がり
を検出し、エンドパルスENDを出力する。メモリ制御
回路(11)は、スタートパルスSTARTの立ち下が
りからエンドパルスENDの立ち下がりまでの期間の
み、ローレベルとなる選択信号SELECTを出力す
る。従って、前記切換回路は、選択信号SELECTが
ローレベルとなる期間のみ、プログラムカウンタ(3)
の出力を遮断し、ラッチ回路(4)の出力をEEPRO
M(1)の端子ADに供給する。
(11) is a memory control circuit. EEP
When the program instruction for starting the data rewriting of the address area B is read from the ROM (1), the CPU (2)
Decodes the program command to start pulse STAR
Output T. The memory control circuit (11) detects the trailing edge of the start pulse START, and the time T
A mode control signal MODE that becomes low level for a time T1 after 0 has passed is output and supplied to the terminal WE of the EEPROM (1). Therefore, the EEPROM (1) is set to the write mode only during the period T1 when the mode control signal MODE is at the low level. The period T1 is E
The EPROM (1) is set to a time necessary and sufficient for writing data to the specified address. The memory control circuit (11) detects the rising edge of the mode control signal MODE and outputs an end pulse END. The memory control circuit (11) outputs the selection signal SELECT that becomes a low level only during the period from the fall of the start pulse START to the fall of the end pulse END. Therefore, the switching circuit has the program counter (3) only while the selection signal SELECT is at a low level.
The output of the latch circuit (4) and the output of the latch circuit (4) is EEPRO.
It is supplied to the terminal AD of M (1).

【0015】(12)はCPU制御回路である。EEP
ROM(1)の1命令の実行時間はμsec単位である
が、EEPROM(1)のデータ書き込み時間はmse
c単位と非常に長い。そこで、EEPROM(1)が書
き込みモードとなる期間T1は、CPU(2)がEEP
ROM(1)の端子DOUTの不定出力の影響を受ける
のを禁止し、プログラムカウンタ(3)の値を現状のま
ま停止させる必要がある。CPU制御回路(12)は、
スタートパルスSTARTの立ち下がりからエンドパル
スENDの立ち下がりまでの期間のみ、禁止信号INH
を出力する。CPU(2)は、禁止信号INHを検出
し、前記禁止動作を行う。
(12) is a CPU control circuit. EEP
The execution time of one instruction of the ROM (1) is a unit of μsec, but the data writing time of the EEPROM (1) is mse.
Very long with c units. Therefore, during the period T1 when the EEPROM (1) is in the write mode, the CPU (2) is in the EEP.
It is necessary to prohibit the influence of the indefinite output of the terminal DOUT of the ROM (1) and stop the value of the program counter (3) as it is. The CPU control circuit (12)
Only during the period from the fall of the start pulse START to the fall of the end pulse END, the inhibit signal INH
Is output. The CPU (2) detects the prohibition signal INH and performs the prohibition operation.

【0016】以下、図1の動作を図2のタイムチャート
を基に説明する。尚、初期状態では、モード制御信号M
ODE及び選択信号SELECTはハイレベルであり、
EEPROM(1)は、プログラムカウンタ(3)でア
ドレス指定される読み出しモードに設定されているもの
とする。また、プログラム命令Xはアドレスデータをラ
ッチ回路(4)にラッチさせる命令、プログラム命令X
+1は書き込みデータをラッチ回路(6)にラッチさせ
る命令、プログラム命令X+2はEEPROM(1)に
データを書き込ませる命令である。
The operation of FIG. 1 will be described below with reference to the time chart of FIG. In the initial state, the mode control signal M
ODE and the selection signal SELECT are high level,
It is assumed that the EEPROM (1) is set to the read mode addressed by the program counter (3). The program command X is a command for causing the latch circuit (4) to latch the address data, and the program command X.
+1 is an instruction to latch the write data in the latch circuit (6), and program instruction X + 2 is an instruction to write the data in the EEPROM (1).

【0017】EEPROM(1)の端子DOUTからプ
ログラム命令Xが読み出されると、該プログラム命令X
がCPU(2)で解読され、アドレスデータがクロック
CK0に同期してラッチ回路(4)にラッチされる。プ
ログラムカウンタ(3)が+1インクリメントされ、E
EPROM(1)の端子DOUTからプログラム命令X
+1が読み出されると、該プログラム命令X+1がCP
U(2)で解読され、書き込みデータがクロックCK1
に同期してラッチ回路(6)にラッチされる。
When the program command X is read from the terminal DOUT of the EEPROM (1), the program command X
Is decoded by the CPU (2), and the address data is latched in the latch circuit (4) in synchronization with the clock CK0. The program counter (3) is incremented by +1 and E
Program command X from terminal DOUT of EPROM (1)
When +1 is read, the program instruction X + 1 is CP
It is decoded by U (2) and the write data is clocked by CK1.
It is latched by the latch circuit (6) in synchronization with.

【0018】プログラムカウンタ(3)が+1インクリ
メントされ、EEPROM(1)の端子DOUTからプ
ログラム命令X+2が読み出されると、該プログラム命
令X+2はCPU(2)で解読される。すると、スター
トパルスSTARTが発生する。選択信号SELECT
はスタートパルスSTARTの立ち下がりを受けてロー
レベルに変化する。モード選択信号MODEは、スター
トパルスSTARTの立ち下がりから時間T0が経過し
た後に時間T1だけローレベルに変化し、その後、ハイ
レベルに復帰する。エンドパルスENDはモード制御信
号MODEのハイレベルへの復帰を受けて発生する。前
記選択信号SELECTはエンドパルスENDの立ち下
がりを受けてハイレベルに変化する。
When the program counter (3) is incremented by +1 and the program command X + 2 is read from the terminal DOUT of the EEPROM (1), the program command X + 2 is decoded by the CPU (2). Then, the start pulse START is generated. Select signal SELECT
Changes to low level in response to the fall of the start pulse START. The mode selection signal MODE changes to the low level for the time T1 after the time T0 has elapsed from the fall of the start pulse START, and then returns to the high level. The end pulse END is generated in response to the return of the mode control signal MODE to the high level. The selection signal SELECT changes to high level in response to the fall of the end pulse END.

【0019】従って、EEPROM(1)のアドレス領
域Bのデータを書き換える期間は禁止信号INHが発生
し、これより、CPU(2)は、EEPROM(1)の
端子DOUTの不定出力の影響を無視でき、且つ、プロ
グラムカウンタ(3)の値をスタートパルスSTART
が発生した時のまま保持できる。この結果、EEPRO
M(1)のデータ書き換え時におけるCPU(2)の誤
動作を防止できる。
Therefore, the inhibit signal INH is generated during the period in which the data in the address area B of the EEPROM (1) is rewritten, so that the CPU (2) can ignore the influence of the undefined output of the terminal DOUT of the EEPROM (1). , And the value of the program counter (3) to the start pulse START
Can be retained as is. As a result, EEPRO
The malfunction of the CPU (2) at the time of rewriting the data of M (1) can be prevented.

【0020】EEPROM(1)のアドレス領域Bのデ
ータ書き換え時における、CPU(2)の誤動作防止対
策として、CPU(2)をスタンバイ状態(HALT)
とする手段、CPU(2)のシステムクロックを停止さ
せる手段、ジャンプ命令を利用してプログラムカウンタ
(3)の値をスタートパルスSTARTが発生した時の
状態に戻す手段、等が考えられる。
As a measure for preventing malfunction of the CPU (2) when rewriting data in the address area B of the EEPROM (1), the CPU (2) is in a standby state (HALT).
Means for stopping the system clock of the CPU (2), a means for returning the value of the program counter (3) to the state when the start pulse START is generated by using a jump instruction, and the like.

【0021】図3はCPU(2)のシステムクロックを
停止させる一具体例を示す回路ブロック図であり、CP
U(2)に内蔵される。図3において、(13)はラッ
チ回路であり、L端子には選択信号SELECTと同一
波形の禁止信号INHが印加され、C端子にはクロック
ジェネレータ(14)から発生するシステムクロックが
インバータ(15)を介して印加される。即ち、ラッチ
回路(13)は、前記システムクロックの立ち下がりに
同期して禁止信号INHをラッチする。ANDゲート
(16)は、ラッチ回路(13)のQ端子出力と前記シ
ステムクロックとの論理積を演算するものである。従っ
て、EEPROM(1)がデータ書き込みを行っている
時は、前記システムクロックを停止させ、CPU(2)
の動作を停止させて前記誤動作を防止できる。
FIG. 3 is a circuit block diagram showing a concrete example of stopping the system clock of the CPU (2).
Built into U (2). In FIG. 3, reference numeral (13) is a latch circuit, an inhibition signal INH having the same waveform as the selection signal SELECT is applied to the L terminal, and a system clock generated from the clock generator (14) is applied to the inverter C (15) at the C terminal. Is applied via. That is, the latch circuit (13) latches the inhibit signal INH in synchronization with the fall of the system clock. The AND gate (16) calculates the logical product of the Q terminal output of the latch circuit (13) and the system clock. Therefore, when the EEPROM (1) is writing data, the system clock is stopped and the CPU (2)
The operation can be stopped to prevent the malfunction.

【0022】図4はジャンプ命令を利用してプログラム
カウンタ(3)の値をスタートパルスSTART発生時
の状態に戻す一具体例を示すブロック図であり、CPU
(2)に内蔵される。図4において、(17)はD型フ
リップフロップであり、D端子には禁止信号INHが印
加され、C端子にはCPU(2)の1命令単位毎に発生
するクロックCK2が印加される。尚、クロックCK
0、CK1、CK2はクロックジェネレータ(14)の
システムクロックを基に発生するものである。従って、
D型フリップフロップ(17)は、禁止信号INHをC
PU(2)の動作タイミングに同期させる。(18)は
選択回路であり、CPU(2)内部で論理回路を用いて
固定的に発生するジャンプ命令データと、EEPROM
(1)の端子DOUTから読み出される命令データと
を、D型フリップフロップ(17)のQ端子出力で選択
出力するものである。選択回路(18)は、D型フリッ
プフロップ(17)のQ端子出力がローレベルの時、ジ
ャンプ命令データを選択出力する。(19)はインスト
ラクションデコーダであり、ジャンプ命令データを解読
することにより、プログラムカウンタ(3)の値をスタ
ートパルスSTART発生時の状態に戻す。従って、E
EPROM(1)がデータ書き換えを行っている時、E
EPROM(1)の端子DOUTの読み出しデータを無
視でき、プログラムカウンタ(3)の値をスタートパル
スSTART発生時の値に常に保持できる。よって、E
EPROM(1)が書き込みモードから読み出しモード
に復帰した時、スタートパルスSTART発生時のアド
レスから読み出し動作を実行できる。
FIG. 4 is a block diagram showing a specific example of returning the value of the program counter (3) to the state when the start pulse START is generated by using the jump instruction.
Built in (2). In FIG. 4, (17) is a D-type flip-flop, the inhibit signal INH is applied to the D terminal, and the clock CK2 generated for each instruction unit of the CPU (2) is applied to the C terminal. The clock CK
0, CK1 and CK2 are generated based on the system clock of the clock generator (14). Therefore,
The D-type flip-flop (17) outputs the inhibition signal INH to C
It is synchronized with the operation timing of PU (2). Reference numeral (18) is a selection circuit, and jump instruction data fixedly generated by using a logic circuit inside the CPU (2) and an EEPROM.
The command data read from the terminal DOUT of (1) is selectively output by the Q terminal output of the D-type flip-flop (17). The selection circuit (18) selectively outputs jump instruction data when the Q terminal output of the D-type flip-flop (17) is at low level. Reference numeral (19) is an instruction decoder which returns the value of the program counter (3) to the state when the start pulse START was generated by decoding the jump instruction data. Therefore, E
When EPROM (1) is rewriting data, E
The read data from the terminal DOUT of the EPROM (1) can be ignored, and the value of the program counter (3) can always be held at the value when the start pulse START was generated. Therefore, E
When the EPROM (1) returns from the write mode to the read mode, the read operation can be executed from the address when the start pulse START is generated.

【0023】以上より、EEPROM(1)のアドレス
領域Aを、残余のアドレス領域Bのデータを書き換える
為のプログラム領域に割り当てたことにより、従来の1
チップ上にEEPROM及びマスクROMを集積化した
場合に比べて、チップ面積を小さくできる。また、EE
PROM(1)のアドレス領域Bのデータ書き換え時に
おける、CPU(2)の誤動作を確実に防止できる。
From the above, by assigning the address area A of the EEPROM (1) to the program area for rewriting the data of the remaining address area B, the conventional 1
The chip area can be reduced as compared with the case where the EEPROM and the mask ROM are integrated on the chip. Also, EE
It is possible to reliably prevent malfunction of the CPU (2) when rewriting data in the address area B of the PROM (1).

【0024】[0024]

【発明の効果】本発明によれば、データを繰り返し書き
込み及び読み出しできると共に書き込み済のデータを電
気的に消去できる不揮発性メモリを内蔵したマイクロコ
ンピュータにおいて、前記不揮発性メモリの特定のアド
レス領域を、前記不揮発性メモリの残余のアドレス領域
のデータを書き換える為のプログラム領域に割り当てた
為、チップ面積を小さくできる。また、前記不揮発性メ
モリの残余のアドレス領域のデータ書き換え時における
CPUの誤動作を確実に防止できる利点が得られる。
According to the present invention, in a microcomputer having a built-in nonvolatile memory capable of repeatedly writing and reading data and electrically erasing written data, a specific address area of the nonvolatile memory is Since the data in the remaining address area of the non-volatile memory is allocated to the program area for rewriting, the chip area can be reduced. Further, there is an advantage that the malfunction of the CPU can be surely prevented when the data in the remaining address area of the nonvolatile memory is rewritten.

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

【図1】本発明のマイクロコンピュータを示す回路ブロ
ック図である。
FIG. 1 is a circuit block diagram showing a microcomputer of the present invention.

【図2】図1の動作を説明する為のタイムチャートであ
る。
FIG. 2 is a time chart for explaining the operation of FIG.

【図3】本発明の禁止手段の一実施例を示す図である。FIG. 3 is a diagram showing an embodiment of a prohibition unit of the present invention.

【図4】本発明の禁止手段の他の実施例を示す図であ
る。
FIG. 4 is a diagram showing another embodiment of the prohibition means of the present invention.

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

(1) EEPROM (2) CPU (3) プログラムカウンタ (4)(6) ラッチ回路 (11) メモリ制御回路 (12) CPU制御回路 (1) EEPROM (2) CPU (3) Program counter (4) (6) Latch circuit (11) Memory control circuit (12) CPU control circuit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 安倍 俊和 大阪府守口市京阪本通2丁目5番5号 三 洋電機株式会社内 ─────────────────────────────────────────────────── ─── Continued Front Page (72) Inventor Toshikazu Abe 2-5-5 Keihan Hondori, Moriguchi City, Osaka Sanyo Electric Co., Ltd.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 データを繰り返し書き込み及び読み出し
できると共に書き込み済のデータを電気的に消去できる
不揮発性メモリを内蔵したマイクロコンピュータにおい
て、 前記不揮発性メモリの特定のアドレス領域を、前記不揮
発性メモリの残余のアドレス領域のデータを書き換える
為のプログラム領域に割り当てたことを特徴とするマイ
クロコンピュータ。
1. A microcomputer including a non-volatile memory capable of repeatedly writing and reading data and electrically erasing written data, wherein a specific address area of the non-volatile memory is the remaining portion of the non-volatile memory. A microcomputer characterized by being assigned to a program area for rewriting the data in the address area of.
【請求項2】 データを繰り返し書き込み及び読み出し
できると共に書き込み済のデータを電気的に消去できる
メモリであって、特定のアドレス領域を、残余のアドレ
ス領域のデータを書き換える為のプログラム領域に割り
当てた不揮発性メモリと、 前記不揮発性メモリの特定のアドレス領域から読み出さ
れた命令に基づき、前記不揮発性メモリの残余のアドレ
ス領域の書き換え処理を行うCPUと、 前記不揮発性メモリの残余のアドレス領域の書き換え処
理を行っている期間、前記不揮発性メモリの特定のアド
レス領域から次命令が読み出されるのを禁止する禁止手
段と、 を備えたことを特徴とするマイクロコンピュータ。
2. A memory capable of repeatedly writing and reading data and electrically erasing written data, wherein a specific address area is allocated to a program area for rewriting data in the remaining address area. Memory, a CPU that performs rewriting processing of the remaining address area of the non-volatile memory based on an instruction read from a specific address area of the non-volatile memory, and rewriting of the remaining address area of the non-volatile memory A microcomputer comprising: a prohibition unit that prohibits a next instruction from being read from a specific address area of the nonvolatile memory while processing is being performed.
【請求項3】 データを繰り返し書き込み及び読み出し
できると共に書き込み済のデータを電気的に消去できる
メモリであって、特定のアドレス領域を、残余のアドレ
ス領域のデータを書き換える為のプログラム領域に割り
当てた不揮発性メモリと、 プログラムカウンタを含み、前記不揮発性メモリの特定
のアドレス領域から読み出されたプログラム命令に基づ
いて動作するCPUと、 前記CPUから前記不揮発性メモリの書き換えすべきア
ドレスデータが供給され且つ保持するアドレス保持回路
と、 前記CPUから前記不揮発性メモリの書き換えデータが
供給され且つ保持するデータ保持回路と、 前記不揮発性メモリの特定のアドレス領域から、残余の
アドレス領域のデータの書き換えを開始するプログラム
命令が読み出された時、データ書き換えに要する時間だ
け、前記不揮発性メモリを書き込みモードに設定し、且
つ、前記プログラムカウンタの出力を無効として前記ア
ドレス保持回路による前記不揮発性メモリの指定アドレ
スに前記データ保持回路のデータを書き込ませるメモリ
制御回路と、 前記不揮発性メモリが書き込みモードに設定されている
時、前記CPUが前記不揮発性メモリの不定状態にある
読み出し出力の影響を受けるのを禁止するCPU制御回
路と、 を備えたことを特徴とするマイクロコンピュータ。
3. A non-volatile memory, which is capable of repeatedly writing and reading data and electrically erasing written data, wherein a specific address area is assigned to a program area for rewriting data in the remaining address area. A non-volatile memory and a program counter, which operates based on a program command read from a specific address area of the non-volatile memory, and the CPU supplies address data to be rewritten to the non-volatile memory. An address holding circuit for holding, a data holding circuit for supplying and holding rewriting data of the non-volatile memory from the CPU, and starting rewriting of data in the remaining address area from a specific address area of the non-volatile memory When the program instruction is read, A memory that sets the non-volatile memory to a write mode only for the time required for rewriting, and disables the output of the program counter to write the data of the data holding circuit to a specified address of the non-volatile memory by the address holding circuit. A control circuit, and a CPU control circuit that inhibits the CPU from being affected by a read output in an indefinite state of the nonvolatile memory when the nonvolatile memory is set to a write mode. Characteristic microcomputer.
【請求項4】 前記CPU制御回路は、前記CPUをス
タンバイ状態とすることを特徴とする請求項3記載のマ
イクロコンピュータ。
4. The microcomputer according to claim 3, wherein the CPU control circuit puts the CPU in a standby state.
【請求項5】 前記CPU制御回路は、前記CPUの動
作クロックを停止させることを特徴とする請求項3記載
のマイクロコンピュータ。
5. The microcomputer according to claim 3, wherein the CPU control circuit stops an operation clock of the CPU.
【請求項6】 前記CPU制御回路は、前記プログラム
カウンタの値を、前記不揮発性メモリが書き込みモード
に設定された時のアドレスとするジャンプ命令を繰り返
すことを特徴とする請求項3記載のマイクロコンピュー
タ。
6. The microcomputer according to claim 3, wherein the CPU control circuit repeats a jump instruction in which the value of the program counter is used as an address when the nonvolatile memory is set to the write mode. .
JP8057706A 1996-03-14 1996-03-14 Microcomputer Pending JPH09251447A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP8057706A JPH09251447A (en) 1996-03-14 1996-03-14 Microcomputer
US08/811,572 US5950222A (en) 1996-03-14 1997-03-05 Microcomputer using a non-volatile memory
KR1019970008548A KR100299542B1 (en) 1996-03-14 1997-03-13 Microcomputer using nonvolatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8057706A JPH09251447A (en) 1996-03-14 1996-03-14 Microcomputer

Publications (1)

Publication Number Publication Date
JPH09251447A true JPH09251447A (en) 1997-09-22

Family

ID=13063397

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8057706A Pending JPH09251447A (en) 1996-03-14 1996-03-14 Microcomputer

Country Status (1)

Country Link
JP (1) JPH09251447A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020036717A (en) * 2000-11-10 2002-05-16 다카노 야스아키 Microcomputer and method for controlling the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020036717A (en) * 2000-11-10 2002-05-16 다카노 야스아키 Microcomputer and method for controlling the same

Similar Documents

Publication Publication Date Title
KR100375217B1 (en) Microcontroller incorporating an electrically rewritable non-volatile memory
KR101146059B1 (en) Nonvolatile memory system, and data read/write method for nonvolatile memory system
KR100299542B1 (en) Microcomputer using nonvolatile memory
JP2003187593A (en) Semiconductor device and nonvolatile semiconductor memory
KR100249329B1 (en) Microcomputer for preventing error-writing in nonvolatile memory
TWI242774B (en) Semiconductor memory device and electronic information device using the same
KR950010304B1 (en) Semiconductor integrated circuit device with non-volatile memory device
JP2002230983A (en) Non-volatile semiconductor memory, and its automatic erasing method and automatic write-in method
JPH11213680A (en) Semiconductor storage
JPH09251447A (en) Microcomputer
JP3439018B2 (en) Microcomputer
US20210373645A1 (en) Semiconductor storing apparatus and flash memory operation method
JP3679496B2 (en) Microcomputer
JPH09282302A (en) Microcomputer
US6798708B2 (en) Memory controller and serial memory
JPH09282181A (en) Microcomputer
JP2005234957A (en) Method and program for controlling data access for flash memory
JPH09293063A (en) Microcomputer
TWI736248B (en) Semiconductor storing apparatus and flash memory operation method
JPH09282304A (en) Microcomputer
JP2005107608A (en) Electronic device, nonvolatile memory, and method for rewriting data of nonvolatile memory
CN113724767B (en) Semiconductor memory device and flash memory operation method
CN113724766B (en) Semiconductor memory device and flash memory operation method
JPH11272472A (en) Microcomputer
EP0714060B1 (en) One chip microcomputer with built-in non-volatile memory