JP2000222380A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JP2000222380A
JP2000222380A JP2585899A JP2585899A JP2000222380A JP 2000222380 A JP2000222380 A JP 2000222380A JP 2585899 A JP2585899 A JP 2585899A JP 2585899 A JP2585899 A JP 2585899A JP 2000222380 A JP2000222380 A JP 2000222380A
Authority
JP
Japan
Prior art keywords
memory
cpu
address
microcomputer
space
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
JP2585899A
Other languages
Japanese (ja)
Inventor
Yoshiaki Suenaga
良明 末永
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.)
Rohm Co Ltd
Original Assignee
Rohm 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 Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP2585899A priority Critical patent/JP2000222380A/en
Publication of JP2000222380A publication Critical patent/JP2000222380A/en
Pending legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)
  • Read Only Memory (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a simple circuit system for controlling writing and deletion for a non-volatile memory in a microcomputer in which a non-volatile memory capable of electric writing and deletion is incorporated. SOLUTION: A program for controlling writing and deletion for a non-volatile memory 30 is arranged in an I/O space by using a CPU 3 having an I/O space which is not mapped in the same address space as a memory space. In a writing and deletion mode, this control program is allowed to run after reset release, and the writing and deletion is operated to the non-volatile memory 30.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】 本発明は電気的にデータの
書き換え可能な不揮発性メモリを内蔵したマイクロコン
ピュータに関する。
The present invention relates to a microcomputer having a built-in electrically rewritable nonvolatile memory.

【0002】[0002]

【従来の技術】 小量多品種の民生機器あるいは産業機
器に使用する部品として従来より電気的にデータの書き
換え可能な不揮発性メモリとしてEEPROMあるいは
フラッシュメモリをCPUとともに同一半導体チップ内
に内蔵したマイクロコンピュータが製造されて来た。今
日では、更に低電圧でデータを書き換えられる強誘電体
メモリを内蔵したマイクロコンピュータも製品化されて
いる。
2. Description of the Related Art Microcomputers in which an EEPROM or flash memory as a non-volatile memory capable of electrically rewriting data as a component used in small-quantity and many kinds of consumer equipment or industrial equipment has been built in the same semiconductor chip together with a CPU as a CPU. Has been manufactured. Nowadays, microcomputers incorporating a ferroelectric memory capable of rewriting data at a lower voltage have also been commercialized.

【0003】電気的にデータの書き換え可能な不揮発性
メモリを内蔵したマイクロコンピュータの利点は、製造
完成したマイクロコンピュータにマイクロコンピュータ
の実行手順を現したプログラムを後から書き込めること
に有る。これに対し、不揮発性メモリの代わりに、マス
クROMを内蔵したマイクロコンピュータは製造途中で
しかプログラムを書き込むことができない。概して、マ
スクROMを内蔵したマイクロコンピュータは機器に必
要とされる数量以上が製造されるので、小量多品種の機
器には向かない面が有る。また、小量多品種の機器には
部品提供の迅速性が強く要求される場合が多い。電気的
にデータの書き換え可能な不揮発性メモリを内蔵したマ
イクロコンピュータは必要とされる数量を迅速に提供す
ることが出来るので、小量多品種の機器用に多く使用さ
れる。
An advantage of a microcomputer having an electrically rewritable non-volatile memory is that a program representing an execution procedure of the microcomputer can be later written in a microcomputer having been manufactured. On the other hand, a microcomputer having a built-in mask ROM instead of a nonvolatile memory can write a program only during manufacturing. In general, microcomputers with built-in mask ROMs are manufactured in a quantity larger than the quantity required for the equipment, and thus are not suitable for small-quantity multi-type equipment. In addition, in the case of small-quantity, high-mix devices, quick provision of parts is often required. Microcomputers with built-in electrically rewritable non-volatile memories can quickly provide the required quantity, and are therefore often used for small-volume, multi-product devices.

【0004】電気的にデータの書き換え可能な不揮発性
メモリを内蔵したマイクロコンピュータの従来の一例を
図4に示す。ブート端子21は通常接地レベルである
が、不揮発性メモリのデータ書き換えを行う場合は、電
源電圧レベルに設定される。ブート端子21が電源電圧
レベルならば、書き込み消去(E/W)コントロールブ
ロック54はCPU53にホールト信号50を送り、ア
ドレスバス10及びデータバス12をCPU53から電
気的に切り離す。従って、CPU53は不揮発性メモリ
のデータ書き換えにおいては使用されない。
FIG. 4 shows a conventional example of a microcomputer having a built-in electrically rewritable nonvolatile memory. The boot terminal 21 is normally at the ground level, but is set to the power supply voltage level when rewriting data in the nonvolatile memory. If the boot terminal 21 is at the power supply voltage level, the write / erase (E / W) control block 54 sends a halt signal 50 to the CPU 53 to electrically disconnect the address bus 10 and the data bus 12 from the CPU 53. Therefore, the CPU 53 is not used for rewriting data in the nonvolatile memory.

【0005】不揮発性メモリ(NV−MEMORY)3
0への書き込みデータは専用ライタ(図示せず)からシ
リアル通信方式でシリアル端子41に送られ、S−P
(シリアルパラレル)変換回路58を経て書き込み消去
コントロールブロック54に送られる。書き込み段階、
消去段階或いはベリファイ段階を判断するために、不揮
発性メモリ30への書き込みデータの他に書き込み消去
コントロールデータが送られ、書き込み消去コントロー
ルブロック54がこれを判断する。書き込み段階なら
ば、書き込み消去コントロールブロック54はアドレス
バス10を介して不揮発性メモリ30のアドレス指定を
し、データバス12を介して不揮発性メモリ30にデー
タを書き込む。
[0005] Non-volatile memory (NV-MEMORY) 3
0 is sent from a dedicated writer (not shown) to the serial terminal 41 by a serial communication method.
The data is sent to the write / erase control block 54 via the (serial / parallel) conversion circuit 58. Writing phase,
In order to determine the erase stage or the verify stage, write / erase control data is sent in addition to the data to be written to the nonvolatile memory 30, and the write / erase control block 54 determines this. In the write stage, the write / erase control block 54 addresses the nonvolatile memory 30 via the address bus 10 and writes data to the nonvolatile memory 30 via the data bus 12.

【0006】なお、書き込み消去コントロールブロック
54は複数の書き込み消去(E/W)コントロール信号
52を不揮発性メモリ30に出力し、細かなコントロー
ルを行っている。また、専用ライタとのシリアル通信の
同期には、マイクロコンピュータ51の発振回路(図示
せず)のクロックを使用したり、同期の為の端子を他の
端子と兼用或いは専用に付けたり、様々な手段が有る。
The write / erase control block 54 outputs a plurality of write / erase (E / W) control signals 52 to the nonvolatile memory 30 to perform fine control. For synchronizing serial communication with the dedicated writer, a clock of an oscillation circuit (not shown) of the microcomputer 51 is used, a terminal for synchronization is also used as another terminal or dedicated, and various methods are used. There are means.

【0007】図4は書き込みデータ等が専用ライタから
シリアル通信方式で送られる例であるが、書き込みデー
タ等を専用ライタからパラレル通信方式で送られるもの
も存在する。
FIG. 4 shows an example in which write data and the like are sent from a dedicated writer by a serial communication system. Some write data and the like are sent from a dedicated writer by a parallel communication system.

【0008】次に、CPUのアーキテクチャについて言
及する。CPUのアーキテクチャとして、アドレス空間
が一通りしかない方式とアドレス空間が二通りある方式
とが有る。アドレス空間が一通りある方式は、メモリ部
とI/O部が一つのアドレス空間に配置される為、メモ
リマップドI/O方式と呼ばれる。この方式はアドレッ
シングの際に、メモリ部のアドレスとI/O部のアドレ
スは重ならないようにマッピングしなければならない。
この方式では、I/O部の読み出しと書き込みはメモリ
部の読み出しと書き込みと同じ命令が使用される。
Next, the architecture of the CPU will be described. As a CPU architecture, there are a system having only one address space and a system having two address spaces. A system having one address space is called a memory-mapped I / O system because a memory section and an I / O section are arranged in one address space. In this method, at the time of addressing, the address of the memory section and the address of the I / O section must be mapped so as not to overlap.
In this method, the same instruction is used for reading and writing of the I / O unit as for reading and writing of the memory unit.

【0009】一方、アドレス空間が二通りある方式で
は、メモリ部のアドレスとI/O部のアドレスは重なら
ないようにする必要はない。しかし、メモリ部のアドレ
スとI/O部のアドレスを区別する為のコントロールラ
インがハードウェアとして必要になる。この方式では、
I/O部の読み出しと書き込みはメモリ部の読み出しと
書き込みとは違う命令が使用される。
On the other hand, in the system having two types of address spaces, it is not necessary to make the address of the memory unit and the address of the I / O unit not overlap. However, a control line for distinguishing the address of the memory unit from the address of the I / O unit is required as hardware. In this scheme,
For reading and writing of the I / O unit, different instructions are used for reading and writing of the memory unit.

【0010】図5(a)(b)にこれら二つの方式のア
ドレス空間の例を示す。この例はアドレスバスが16本
の場合である。図5(b)のアドレス空間が一通りある
方式は2の16乗番地分(0H〜FFFFH)のアドレ
ス空間が一つ有り、その中にメモリ部とI/O部が含ま
れる。図5(a)のアドレス空間が二通りある方式は、
メモリ部のアドレス空間は2の16乗番地分(0H〜F
FFFH)有り、I/O部のアドレス空間は2の8乗番
地分(0H〜FFH)有るようになっている。
FIGS. 5A and 5B show examples of address spaces of these two systems. In this example, there are 16 address buses. In the method of FIG. 5B having one address space, there is one address space for 2 to the 16th address (0H to FFFFH), which includes a memory unit and an I / O unit. The method in which there are two types of address spaces in FIG.
The address space of the memory section is for 2 to the 16th address (0H to F
FFFH) is present, and the address space of the I / O section is set to have 2 to the 8th address (0H to FFH).

【0011】なお、メモリ部とは主に不揮発性ROM、
RAMなどをいい、I/O部とは主に周辺機器の制御を
行うブロックをいう。
The memory unit is mainly composed of a nonvolatile ROM,
The I / O unit refers to a block that mainly controls peripheral devices.

【0012】[0012]

【発明が解決しようとする課題】電気的にデータの書き
換え可能な不揮発性メモリを内蔵したマイクロコンピュ
ータはマスクROMを内蔵したマイクロコンピュータに
比べ、メモリセルの専有面積などの面から全体のチップ
サイズが大きくなってしまう。また、データの書き換え
時に、上記のようにCPUを利用せずに書き込み消去コ
ントロールブロック等により全ての制御をしていたの
で、書き込み消去コントロールブロック等の専有面積が
大きくなっていた。チップサイズが大きければコストア
ップにつながり、更に、小さなパッケージで組み立てる
ことができず、大きなパッケージで製品化しなければな
らない場合もある。また、ハードウェアロジックで構成
された書き込み消去コントロールブロック等は、書き込
みまたは消去の時間調節の合わせ込みなどの制御方式の
マイナーチェンジが困難であった。
A microcomputer having a built-in electrically rewritable non-volatile memory has a smaller overall chip size than a microcomputer having a built-in mask ROM in terms of the occupied area of the memory cells. It gets bigger. In addition, when data is rewritten, since all control is performed by the write / erase control block without using the CPU as described above, the occupied area of the write / erase control block or the like is increased. If the chip size is large, it leads to an increase in cost, and furthermore, it may not be possible to assemble in a small package, and it may be necessary to commercialize it in a large package. Further, it has been difficult for a write / erase control block or the like constituted by hardware logic to make a minor change in a control method such as adjustment of time adjustment of writing or erasing.

【0013】本発明はアドレス空間が二通りある方式の
CPUアーキテクチャのマイクロクンピュータにおい
て、書き込み消去の制御回路を工夫することにより、チ
ップサイズの拡大を抑制し、また、制御方式のマイナー
チェンジを比較的簡単にできるものである。
According to the present invention, in a microcomputer having a CPU architecture having two types of address spaces, an increase in the chip size is suppressed by devising a control circuit for writing and erasing, and a minor change in the control method is relatively performed. It's easy.

【0014】[0014]

【課題を解決するための手段】上記の問題を解決するた
めに、本発明のマイクロコンピュータは、第一のアドレ
ス空間と、該第一のアドレス空間と異なる第二のアドレ
ス空間をアドレッシング可能なCPUと、前記第一のア
ドレス空間に配置され、アプリケーションプログラムを
記憶する不揮発性メモリと、前記第二のアドレス空間に
配置され、前記アプリケーションプログラムを電気的に
書き換える不揮発性メモリ書き換えプログラムと、を備
え、第一のモードでは、前記アプリケーションプログラ
ムにより前記CPUが制御され、第二のモードでは、前
記不揮発性メモリ書き換えプログラムにより前記CPU
が制御されることを特徴とする。
In order to solve the above-mentioned problems, a microcomputer according to the present invention comprises a CPU capable of addressing a first address space and a second address space different from the first address space. And a non-volatile memory arranged in the first address space and storing an application program, and a non-volatile memory rewriting program arranged in the second address space and electrically rewriting the application program, In a first mode, the CPU is controlled by the application program. In a second mode, the CPU is controlled by the nonvolatile memory rewriting program.
Is controlled.

【0015】[0015]

【作用および効果】本発明のマイクロクンピュータはア
ドレス空間が二通りある方式のCPUアーキテクチャで
あることを利用し、二つのアドレス空間を第一のモード
と第二のモードの場合により切り替えて使っている。
Operation and effect The microcomputer of the present invention utilizes the CPU architecture of a system having two address spaces, and uses the two address spaces by switching between the first mode and the second mode. I have.

【0016】リセット解除後には、CPUは一定のアド
レス(例えば0000H番地)からスタートするが、第
一のモードと第二のモードの場合により切り替えられる
為、全く別のプログラムをリセット解除後に実行させる
ことができる。アプリケーションプログラムはマイクロ
クンピュータを応用製品に組み込んだ時に実行させるプ
ログラムであり、本発明に係わるマイクロコンピュータ
ではアプリケーションプログラムを不揮発性メモリに記
憶させる。第一のモードではアプリケーションプログラ
ムが実行される。第二のモードでは不揮発性メモリ書き
換えプログラムが実行され、アプリケーションプログラ
ムを書き換える。
After the reset is released, the CPU starts from a fixed address (for example, address 0000H). Since the CPU can be switched between the first mode and the second mode, a completely different program is executed after the reset is released. Can be. The application program is a program to be executed when the micro computer is incorporated in the application product. In the microcomputer according to the present invention, the application program is stored in a nonvolatile memory. In the first mode, an application program is executed. In the second mode, the nonvolatile memory rewriting program is executed to rewrite the application program.

【0017】本発明のマイクロコンピュータでは、不揮
発性メモリへのデータの書き換えの制御をプログラムに
より行っているので、書き換え専用のハードウェアロジ
ックを使った制御に比べて複雑な回路を必要とすること
なく、細かな制御が可能となり、制御方式のマイナーチ
ェンジも簡単にできる。また、ハードウェアロジックを
使った制御はCPUを利用していないために、制御シー
ケンスの実行回路を全てハードウェアロジックで構成し
なければならないが、本発明では制御シーケンスの実行
はCPUが行う。この為、不揮発性メモリへのデータの
書き込み及び消去の制御回路規模を従来に比べては小さ
くすることができる。
In the microcomputer of the present invention, the control of rewriting data to the non-volatile memory is performed by a program, so that a complicated circuit is not required as compared with the control using hardware logic dedicated to rewriting. Fine control is possible, and minor changes in the control method can be easily performed. In addition, since control using hardware logic does not use a CPU, all execution circuits for the control sequence must be configured with hardware logic. In the present invention, however, the control sequence is executed by the CPU. For this reason, the scale of a control circuit for writing and erasing data to and from the nonvolatile memory can be reduced as compared with the related art.

【0018】[0018]

【発明の実施の形態】以下、本発明の実施例を図面を参
照しながら詳細に説明する。図1は本発明の実施例であ
るマイクロコンピュータ1のブロック図であり、図2は
そのアドレス空間を示したものである。マイクロコンピ
ュータ1は主にCPU3、メモリ部5及びI/O部7か
ら構成される。CPU3とメモリ部5との間では、アド
レスバス10、データバス12、ライトライン14、リ
ードライン15、メモリ選択ライン16及びI/O選択
ライン17等を介して信号の入出力が行われる。CPU
3とI/O部7との間も同様である。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram of a microcomputer 1 according to an embodiment of the present invention, and FIG. 2 shows an address space thereof. The microcomputer 1 mainly includes a CPU 3, a memory unit 5, and an I / O unit 7. Signals are input and output between the CPU 3 and the memory unit 5 via the address bus 10, the data bus 12, the write line 14, the read line 15, the memory selection line 16, the I / O selection line 17, and the like. CPU
The same applies between the I / O unit 3 and the I / O unit 7.

【0019】アドレスバス10は16本の信号ラインか
らなり、CPU3からアドレス信号がアドレスバス10
に出力され、メモリ部5及びI/O部7に入力される。
データバス12は8本の信号ラインからなる。CPU3
が書き込み命令の実行によりメモリ部5またはI/O部
7にデータを書き込む場合は、CPU3からデータ信号
がデータバス12に出力され、メモリ部5またはI/O
部7に入力される。CPU3がプログラムの命令をフェ
ッチする場合や読み出し命令の実行によりメモリ部5ま
たはI/O部7からデータを読み出す場合は、メモリ部
5またはI/O部7からデータ信号がデータバス12に
出力され、CPU3に入力される。
The address bus 10 is composed of 16 signal lines.
And input to the memory unit 5 and the I / O unit 7.
The data bus 12 includes eight signal lines. CPU3
When writing data to the memory unit 5 or the I / O unit 7 by executing a write command, a data signal is output from the CPU 3 to the data bus 12 and the memory unit 5 or the I / O unit
Input to the unit 7. When the CPU 3 fetches a program instruction or reads data from the memory unit 5 or the I / O unit 7 by executing a read instruction, a data signal is output from the memory unit 5 or the I / O unit 7 to the data bus 12. Are input to the CPU 3.

【0020】ライトライン14は、CPU3が書き込み
命令を実行する場合、所定のタイミングでアクティブに
なり、リードライン15は、CPU3がプログラムの命
令をフェッチする場合やCPU3が読みだし命令を実行
する場合、所定のタイミングでアクティブになる。
The write line 14 is activated at a predetermined timing when the CPU 3 executes a write instruction, and the read line 15 is activated when the CPU 3 fetches a program instruction or executes a read instruction. It becomes active at a predetermined timing.

【0021】CPU3がメモリ空間に有るアドレスにア
クセスする場合は、CPU3から所定のタイミングでア
クティブレベル(ハイレベル)がメモリ選択ライン16
に出力され、CPU3がI/O空間に有るアドレスにア
クセスする場合は、CPU3から所定のタイミングでア
クティブレベル(ハイレベル)がI/O選択ライン17
に出力される。
When the CPU 3 accesses an address in the memory space, the active level (high level) is changed from the CPU 3 to the memory selection line 16 at a predetermined timing.
When the CPU 3 accesses an address in the I / O space, the active level (high level) is changed from the CPU 3 to the I / O selection line 17 at a predetermined timing.
Is output to

【0022】アドレス空間変換ブロック9には、メモリ
選択ライン16、I/O選択ライン17及びブートライ
ン20が入力用信号ラインとして接続される。ブートラ
イン20はマイクロコンピュータ1の外部端子の一つで
あるブート端子21と接続される。マイクロコンピュー
タ1の外部でブート端子21は抵抗を介して接地される
(図示せず)。ブート端子21は第一のモード時(通常
モード時)には接地レベルすなわちローレベルになって
おり、第二のモード時(書き込み消去時)には強制的に
ハイレベルにされる。アドレス空間変換ブロック9で
は、メモリ選択ライン16、I/O選択ライン17及び
ブートライン20の信号が組み合わされ、新たなメモリ
選択ライン116、I/O選択ライン117に出力され
る。新たなメモリ選択ライン116、I/O選択ライン
117はメモリ部5またはI/O部7に接続される。
To the address space conversion block 9, a memory selection line 16, an I / O selection line 17, and a boot line 20 are connected as input signal lines. The boot line 20 is connected to a boot terminal 21 which is one of the external terminals of the microcomputer 1. The boot terminal 21 is grounded via a resistor outside the microcomputer 1 (not shown). The boot terminal 21 is at the ground level, that is, low level in the first mode (normal mode), and is forcibly set to the high level in the second mode (programming / erasing). In the address space conversion block 9, the signals of the memory selection line 16, the I / O selection line 17 and the boot line 20 are combined and output to the new memory selection line 116 and the new I / O selection line 117. The new memory selection line 116 and the new I / O selection line 117 are connected to the memory unit 5 or the I / O unit 7.

【0023】アドレス空間変換ブロック9は、ブートラ
イン20がローレベルの場合、新たなメモリ選択ライン
116はメモリ選択ライン16と論理的に等しくなり、
新たなI/O選択ライン117はI/O選択ライン17
と論理的に等しくなるように回路を構成する。また、ブ
ートライン20がハイレベルの場合、新たなメモリ選択
ライン116はI/O選択ライン17と論理的に等しく
なり、新たなI/O選択ライン117はメモリ選択ライ
ン16と論理的に等しくなるように回路を構成する。
The address space conversion block 9 indicates that when the boot line 20 is at a low level, the new memory selection line 116 is logically equal to the memory selection line 16,
The new I / O selection line 117 is
The circuit is configured to be logically equal to When the boot line 20 is at a high level, the new memory selection line 116 is logically equal to the I / O selection line 17 and the new I / O selection line 117 is logically equal to the memory selection line 16. The circuit is configured as follows.

【0024】メモリ部5は電気的にデータの書き換え可
能な不揮発性メモリ(NV−MEMORY)30とRA
M32から構成されている。RAM32は4Kバイト程
度の容量であり、メモリ空間のアドレス最大値付近にマ
ッピングされている。不揮発性メモリ30は64Kバイ
トからRAM32の容量を除いた容量になる。
The memory unit 5 includes an electrically rewritable nonvolatile memory (NV-MEMORY) 30 and an RA.
M32. The RAM 32 has a capacity of about 4 Kbytes and is mapped near the address maximum value in the memory space. The non-volatile memory 30 has a capacity obtained by excluding the capacity of the RAM 32 from 64 Kbytes.

【0025】I/O部7は不揮発性メモリ書き換えプロ
グラムを格納したROM34と周辺制御部36から構成
されている。ROM34はマスクROMで構成している
が、ランダムロジックで構成することもできる。
The I / O unit 7 comprises a ROM 34 storing a nonvolatile memory rewriting program and a peripheral control unit 36. The ROM 34 is constituted by a mask ROM, but may be constituted by random logic.

【0026】周辺制御部36は入出力パラレルポート、
入出力シリアルポート、タイマ、カウンタ、DMAコン
トローラなどから構成され、特殊な場合は、エンジンコ
ントローラやプロトコルコントローラなどから構成され
る。I/O部7は64Kバイトの大きなアドレス空間が
有るが、マイクロコンピュータの機能の拡大に伴う、大
きなアドレス空間に対応可能なようになっている。
The peripheral control unit 36 includes an input / output parallel port,
It is composed of an input / output serial port, a timer, a counter, a DMA controller and the like. In special cases, it is composed of an engine controller and a protocol controller. Although the I / O unit 7 has a large address space of 64 Kbytes, it can cope with a large address space accompanying the expansion of the functions of the microcomputer.

【0027】マイクロコンピュータ1のリセット端子
(図示せず)よりリセット信号が入力され、リセット解
除されると、書き込み消去時には、I/O空間のアドレ
ス0000Hに格納されている命令から順次CPU3に
フェッチ、デコードされ、実行される。I/O空間のア
ドレス0000Hから一定のアドレス区間に格納されて
いる書き込み消去制御プログラムに従い、CPU3は不
揮発性メモリ30へのデータの書き込み及び消去を制御
する。
When a reset signal is input from a reset terminal (not shown) of the microcomputer 1 and the reset is released, at the time of writing and erasing, the instructions stored in the address 0000H of the I / O space are sequentially fetched into the CPU 3 and Decoded and executed. The CPU 3 controls writing and erasing of data to and from the nonvolatile memory 30 according to a write / erase control program stored in a fixed address section from the address 0000H of the I / O space.

【0028】専用ライタ(図示せず)より送られた不揮
発性メモリ30への書き込みデータはシリアル端子41
を経てS−P(シリアルパラレル)変換回路8に一時保
持される。CPU3は書き込み消去制御プログラムに従
い、S−P変換回路8のデータを読み込み、不揮発性メ
モリ30へデータを書き込む。
The write data sent to the nonvolatile memory 30 from a dedicated writer (not shown) is transmitted to a serial terminal 41.
Is temporarily stored in the SP (serial / parallel) conversion circuit 8. The CPU 3 reads the data of the SP conversion circuit 8 and writes the data to the nonvolatile memory 30 according to the write / erase control program.

【0029】書き込み消去制御プログラムのフローの例
を図3に示す。消去、書き込み、書き込まれたデータと
書き込むべきデータの比較(ベリファイ)の順で書き込
み消去制御プログラムは構成され、書き込みとベリファ
イの段階はループが使用されるので、プログラムの規模
は小さい。
FIG. 3 shows an example of the flow of the write / erase control program. The write / erase control program is configured in the order of erase, write, and comparison (verify) between the written data and the data to be written. Since the write and verify steps use a loop, the program scale is small.

【0030】一方、通常モード時には、リセット解除
後、メモリ空間のアドレス0000Hに格納されている
命令から順次CPU3にフェッチ、デコードされ、実行
される。メモリ空間には不揮発性メモリ30が設置され
ており、ユーザのアプリケーションセットに対応したア
プリケーションプログラムの命令が上述の書き込み消去
動作により書き込まれ記憶されている。
On the other hand, in the normal mode, after the reset is released, the instructions stored in the address 0000H in the memory space are sequentially fetched, decoded, and executed by the CPU 3 from the instruction. A nonvolatile memory 30 is provided in the memory space, and an instruction of an application program corresponding to a user's application set is written and stored by the above-described write / erase operation.

【0031】また、異なる実施例として、I/O空間の
アドレス0000H付近の小容量の領域を小規模のラン
ダムロジックあるいはROMで構成し、残りをRAMで
構成することもできる。この場合、小規模のランダムロ
ジックあるいはROMに残りのRAM部を書き換えるプ
ログラムを組み込んでおき、S−P(シリアルパラレ
ル)変換回路8のデータに応じて残りのRAM部に書き
込み消去制御プログラムを書き込む。残りのRAM部を
書き換えることで書き込み消去方法のマイナーチェンジ
が可能になる。なお、このRAMは通常モード時にも使
用可能であるので、メモリ空間に配置したRAM以外に
もI/O空間にもRAMが有ることになる。
As a different embodiment, a small-capacity area near the address 0000H in the I / O space may be constituted by small-scale random logic or ROM, and the rest may be constituted by RAM. In this case, a program for rewriting the remaining RAM section is incorporated in small-scale random logic or ROM, and a write / erase control program is written in the remaining RAM section according to the data of the SP (serial / parallel) conversion circuit 8. By rewriting the remaining RAM section, a minor change in the writing / erasing method becomes possible. Since this RAM can be used even in the normal mode, there is a RAM in the I / O space in addition to the RAM arranged in the memory space.

【0032】なお、メモリ空間やI/O空間の大きさや
バスの本数などは本実施例に限らない。
The size of the memory space and the I / O space, the number of buses, and the like are not limited to the present embodiment.

【0033】また、本実施例の説明では、メモリ空間を
第一のアドレス空間とし、I/O空間を第二のアドレス
空間としている。
In the description of this embodiment, the memory space is the first address space, and the I / O space is the second address space.

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

【図1】本発明の実施例のマイクロコンピュータの概略
図である。
FIG. 1 is a schematic diagram of a microcomputer according to an embodiment of the present invention.

【図2】本発明の実施例のマイクロコンピュータのアド
レス空間を示す概念図である。
FIG. 2 is a conceptual diagram showing an address space of the microcomputer according to the embodiment of the present invention.

【図3】本発明の実施例のマイクロコンピュータの不揮
発性メモリ書き換えプログラムのフローを示す図であ
る。
FIG. 3 is a diagram showing a flow of a nonvolatile memory rewriting program of the microcomputer according to the embodiment of the present invention.

【図4】従来における不揮発性メモリを内蔵したマイク
ロコンピュータの概略図である。
FIG. 4 is a schematic diagram of a conventional microcomputer having a built-in nonvolatile memory.

【図5】従来におけるマイクロコンピュータのアドレス
空間を示す概念図である。
FIG. 5 is a conceptual diagram showing an address space of a conventional microcomputer.

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

1、51 :マイクロコンピュータ 3、53 :CPU 5 :メモリ部 7、57 :I/O部 8、58 :S−P(シリアルパラレ
ル)変換回路 9 :アドレス空間交換ブロッ
ク 10 :アドレスバス 12 :データバス 14 :ライトライン 15 :リードライン 16、116 :メモリ選択ライン 17、117 :I/O選択ライン 20 :ブートライン 21 :ブート端子 30 :不揮発性メモリ(NV−
MEMORY) 32 :RAM 34 :ROM 36 :周辺制御部 41 :シリアル端子 50 :ホールト信号 52 :書き込み消去(E/W)
コントロール信号 54 :書き込み消去(E/W)
コントロールブロック
1, 51: microcomputer 3, 53: CPU 5: memory unit 7, 57: I / O unit 8, 58: SP (serial / parallel) conversion circuit 9: address space exchange block 10: address bus 12, data bus 14: Write line 15: Read line 16, 116: Memory select line 17, 117: I / O select line 20: Boot line 21: Boot terminal 30: Non-volatile memory (NV-
MEMORY) 32: RAM 34: ROM 36: Peripheral controller 41: Serial terminal 50: Halt signal 52: Write / erase (E / W)
Control signal 54: Write / erase (E / W)
Control block

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 第一のアドレス空間と、該第一のアドレ
ス空間と異なる第二のアドレス空間をアドレッシング可
能なCPUと、 前記第一のアドレス空間に配置され、アプリケーション
プログラムを記憶する不揮発性メモリと、 前記第二のアドレス空間に配置され、前記アプリケーシ
ョンプログラムを電気的に書き換える不揮発性メモリ書
き換えプログラムと、を備え、 第一のモードでは、前記アプリケーションプログラムに
より前記CPUが制御され、第二のモードでは、前記不
揮発性メモリ書き換えプログラムにより前記CPUが制
御されることを特徴とするマイクロコンピュータ。
1. A first address space, a CPU capable of addressing a second address space different from the first address space, and a non-volatile memory arranged in the first address space and storing an application program And a non-volatile memory rewriting program arranged in the second address space and electrically rewriting the application program. In a first mode, the CPU is controlled by the application program, and a second mode is provided. In the microcomputer, the CPU is controlled by the nonvolatile memory rewriting program.
JP2585899A 1999-02-03 1999-02-03 Microcomputer Pending JP2000222380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2585899A JP2000222380A (en) 1999-02-03 1999-02-03 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2585899A JP2000222380A (en) 1999-02-03 1999-02-03 Microcomputer

Publications (1)

Publication Number Publication Date
JP2000222380A true JP2000222380A (en) 2000-08-11

Family

ID=12177531

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2585899A Pending JP2000222380A (en) 1999-02-03 1999-02-03 Microcomputer

Country Status (1)

Country Link
JP (1) JP2000222380A (en)

Similar Documents

Publication Publication Date Title
US5974528A (en) Microcomputer with embedded flash memory having on-chip programming capability and method of programming data into the embedded flash memory
GB2385167A (en) Non-volatile memory initialisation by a controller loading firmware from the non-volatile memory to volatile memory attached to a processor.
US5950222A (en) Microcomputer using a non-volatile memory
JP2003216483A (en) Memory controller and memory system unit
JP3173407B2 (en) Microcomputer with built-in flash EEPROM
TW403880B (en) Relocatable code storage in an integrated circuit with an embedded microcontroller
JP2007299227A (en) Information processing apparatus and method for booting the same
JP2000222380A (en) Microcomputer
JPH06348504A (en) Microprocessor system
JP3032207B2 (en) Micro computer
JPH11184724A (en) In-circuit emulator and semiconductor integrated circuit
JPH08305680A (en) Semiconductor device
JP2001125786A (en) Device and system for processing data
JPH11353170A (en) Flash memory controller and memory access method of flash memory controller
JPH10283172A (en) Flash rom data rewrite system
GB2304209A (en) Starting up a processor system
JPH0581145A (en) Data write circuit in eeprom
JPH11328089A (en) Id information write circuit in device for pci bus interface
JP2001147863A (en) Flash memory rewrite device
JP2004021421A (en) Control method for memory device, its program, and recording medium
JPH04199228A (en) Semiconductor integrated circuit device
JPH10247187A (en) One-chip microcomputer
JP2012252567A (en) Data processing system
JPH1050086A (en) Microcomputer having eeprom and its rewriting method
JPH11353153A (en) Register setting circuit