JPH11306072A - Single chip microcontroller - Google Patents

Single chip microcontroller

Info

Publication number
JPH11306072A
JPH11306072A JP21228698A JP21228698A JPH11306072A JP H11306072 A JPH11306072 A JP H11306072A JP 21228698 A JP21228698 A JP 21228698A JP 21228698 A JP21228698 A JP 21228698A JP H11306072 A JPH11306072 A JP H11306072A
Authority
JP
Japan
Prior art keywords
data
write
erase
address
memory
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
JP21228698A
Other languages
Japanese (ja)
Inventor
Shikifu Sha
式富 謝
Mosho Chin
茂松 陳
Shisho Go
士昌 呉
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.)
Winbond Electronics Corp
Original Assignee
Winbond Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Winbond Electronics Corp filed Critical Winbond Electronics Corp
Publication of JPH11306072A publication Critical patent/JPH11306072A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a single chip microcontroller which can be used for a telephone or facsimile equipment for storing a telephone number and a fax number. SOLUTION: A memory unit 10 has both a static random access memory 1 and a flash EPROM 2 incorporated, and an internal flash EPROM 2 can be directly read in the same way as the static random access memory 1 is. Thus, an external EPROM and its related program for changing data stored there become unnecessary.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、マイクロコントロ
ーラに関する。より詳細には、メモリ・ユニット内にフ
ラッシュ消去可能なプログラマブル読取り専用メモリ
(フラッシュEPROM)とスタティック・ランダム・
アクセス・メモリ(SRAM)の両方が組み込まれ、フ
ラッシュ消去可能なプログラマブル読み取り専用メモリ
に記憶されたデータを、単一ステップで、すなわちスタ
ティック・ランダム・アクセス・メモリに記憶したデー
タを読み取るのと同じ方式で読み取るシングル・チップ
・マイクロコントローラに関する。
[0001] The present invention relates to a microcontroller. More specifically, a flash erasable programmable read only memory (flash EPROM) and a static random
The same method of reading data stored in flash erasable programmable read-only memory, incorporating both access memory (SRAM), in a single step, ie, static random access memory A single-chip microcontroller that reads in

【0002】[0002]

【従来の技術】様々なコンピュータやシステムで、マイ
クロコントローラは、多くの場合4ビット・マイクロコ
ントローラ、8ビット・マイクロコントローラ、16ビ
ット・マイクロコントローラなどに分類される。マイク
ロコントローラはすべて、入出力ポート、中央処理装置
(CPU)およびメモリ・ユニットを備え、入出力ポー
トは、マイクロコントローラ内のデータを受け取り、出
力し、送り出すために設けられ、中央処理装置は、受け
取ったデータまたは獲得したデータを処理するため設け
られ、メモリ・ユニットは、中央処理装置によって実行
されるデータや関連プログラムを記憶するために設けら
れ、通常は、ROM(読取り専用メモリ)とRAM(ラ
ンダム・アクセス・メモリ)からなる。
2. Description of the Related Art In various computers and systems, microcontrollers are often classified into 4-bit microcontrollers, 8-bit microcontrollers, 16-bit microcontrollers, and the like. All microcontrollers have input / output ports, a central processing unit (CPU) and a memory unit, and the input / output ports are provided for receiving, outputting, and sending data in the microcontroller, and the central processing unit has A memory unit is provided for processing data or acquired data, and a memory unit is provided for storing data executed by the central processing unit and related programs, and is usually provided with a ROM (read only memory) and a RAM (random memory). Access memory).

【0003】ROMは、電源を切断した後でもデータを
保持することができ、したがって、不変のデータやプロ
グラム・アプリケーションの記憶に適している。ROM
は、通常、マスクROM、EPROM(消去可能なプロ
グラマブルROM)およびEEPROM(電気的消去可
能なプログラマブルROM)に分けられる。マスクRO
Mのデータは、製造中にあらかじめ書き込まれ、後で変
更することはできない。一方、EPROMのデータは、
EPROMの透明な窓に約30分間紫外線を照射するこ
とにより、EPROMレコーダ(プログラマ)によって
書き込まれ、繰り返しプログラムしなおすことができ
る。同様に、EEPROMのデータは、EEPROMレ
コーダ(プログラマ)によって書き込まれる。しかしな
がら、EEPROMデータは、電子信号により置き換え
られて変更されるため、EPROMに紫外線を利用する
場合よりも便利である。
A ROM can retain data even after power is turned off, and is therefore suitable for storing unchangeable data and program applications. ROM
Are usually divided into a mask ROM, an EPROM (erasable programmable ROM) and an EEPROM (electrically erasable programmable ROM). Mask RO
The data of M is pre-written during manufacturing and cannot be changed later. On the other hand, EPROM data
By irradiating the transparent window of the EPROM with ultraviolet light for about 30 minutes, it is written by an EPROM recorder (programmer) and can be reprogrammed repeatedly. Similarly, the data in the EEPROM is written by an EEPROM recorder (programmer). However, since the EEPROM data is replaced and changed by an electronic signal, it is more convenient than the case where ultraviolet light is used for the EPROM.

【0004】RAMは、ROMと異なり、電力が遮断さ
れるとデータがなくなり、そのため、変化する一時的な
データの記憶に適している。
[0004] Unlike a ROM, a RAM loses data when power is cut off, and is therefore suitable for storing temporarily changing data.

【0005】たとえば電話、ファックスなどのいくつか
の用途では、メモリ・ユニットは、特定のデータ(電話
番号やファックス番号など)を長時間記憶し、またある
一定の間隔でデータを変更できなければならない。一時
的データを長時間記憶しなければならない用途では、従
来のシングル・チップ・マイクロコントローラのメモリ
・ユニットは利用できない。その代わりに、そのような
タイプのデータを記憶するために、マイクロコントロー
ラに外部EEPROM(電気的消去可能なプログラマブ
ルROM)が設けられることもある。
In some applications, such as telephones, faxes, etc., the memory unit must store certain data (such as telephone and fax numbers) for long periods of time and must be able to change the data at certain intervals. . In applications where temporary data must be stored for long periods of time, conventional single-chip microcontroller memory units are not available. Alternatively, the microcontroller may be provided with an external EEPROM (Electrically Erasable Programmable ROM) to store such types of data.

【0006】[0006]

【発明が解決すべき課題】しかし、外部EEPROMを
使用すると、追加のインタフェース、関連プログラムに
よる制御回路、および記録(プログラム)用の高い電圧
が必要になり、したがって、シングル・チップ・マイク
ロコントローラのコストと複雑さが実質上増大する問題
があった。本発明は、上記問題点を解決し、電話やファ
ックス等で使用可能で、かつ低コストのシングル・チッ
プ・マイクロコントローラを提供することを目的とす
る。
However, the use of an external EEPROM requires additional interfaces, associated program control circuitry, and high voltages for recording (programming), and therefore, the cost of a single chip microcontroller. The problem is that the complexity increases substantially. SUMMARY OF THE INVENTION It is an object of the present invention to solve the above problems and to provide a low-cost single-chip microcontroller that can be used for telephone, fax, and the like.

【0007】[0007]

【課題を解決するための手段】前述の目的を達成するた
めに、本発明は、外部EEPROMや複雑なプログラム
を含む関連デバイスを必要としない、内部フラッシュ・
メモリを備えたシングル・チップ・マイクロコントロー
ラを提供する。したがって、コストを低減することがで
き、電源を遮断した後もフラッシュ・メモリ内にデータ
(電話番号やファックス番号など)を維持するとがで
き、ランダム・アクセス・メモリと同じように単一ステ
ップでデータを読み取ることができる。
SUMMARY OF THE INVENTION In order to achieve the foregoing objects, the present invention provides an internal flash memory that does not require an external EEPROM or an associated device containing a complex program.
Provide a single chip microcontroller with memory. Thus, costs can be reduced, data can be maintained in flash memory (such as telephone and fax numbers) after a power loss, and data can be stored in a single step, similar to random access memory. Can be read.

【0008】本発明のシングル・チップ・マイクロコン
トローラは、メモリ・ユニットと中央処理装置からな
る。メモリ・ユニットは、フラッシュ・メモリとランダ
ム・アクセス・メモリが内蔵されている。フラッシュ・
メモリを読取りアドレスに関して読み取るとき、中央処
理装置は、読み取ったデータを、データ・バスを介して
デスティネーション・レジスタに直接転送する。さら
に、書込み/消去アドレスと書込み/消去データに関し
てフラッシュ・メモリに書き込み/消去するとき、中央
処理装置は、最初に、書込み/消去アドレスと書込み/
消去データをデータ/アドレス・レジスタに転送し、次
に、フラッシュ・メモリの書込み/消去アドレスへ/か
ら書込み/消去データを書込み/消去し、次に、データ
/アドレス・レジスタの書込み/消去データを、フラッ
シュ・メモリ内のデータと比較して、書込み/消去を確
実に完了させる。
[0008] The single chip microcontroller of the present invention comprises a memory unit and a central processing unit. The memory unit has a built-in flash memory and random access memory. flash·
When reading memory for a read address, the central processing unit transfers the read data directly to the destination register via the data bus. Further, when writing / erasing the flash memory with respect to the write / erase address and the write / erase data, the central processing unit firstly writes the write / erase address and the write / erase data.
Transfer the erase data to the data / address register, then write / erase the write / erase data to / from the flash memory write / erase address, and then write / erase the data / address register. , Assures completion of writing / erasing as compared with data in the flash memory.

【0009】このシングル・チップ・マイクロコントロ
ーラでは、フラッシュ・メモリは、同じメモリ・アドレ
スを共用し、別のレジスタに記憶されたブロック選択信
号によってイネーブルされるいくつかのメモリ・ブロッ
クに分割されることがある。
In this single chip microcontroller, the flash memory is divided into several memory blocks sharing the same memory address and enabled by a block select signal stored in another register. There is.

【0010】以下の詳細な説明は、例として示され、本
発明をその実施形態だけに制限するものではなく、添付
図面と関連して最もよく理解されよう。
The following detailed description is given by way of example and is not intended to limit the invention to only its embodiments but to be best understood in connection with the accompanying drawings.

【0011】 〔発明の詳細な説明〕シングル・チップ・マイクロコン
トローラの従来のメモリ・ユニットは、多くの場合、読
取り専用メモリ(ROM)とランダム・アクセス・メモ
リ(RAM)からなる。しかしながら、ROMは、不変
のプログラムやデータしか保存することができず、一方
RAMは、変化する一時的なデータしか保存することが
できない。したがって、このメモリ・ユニットは、電話
番号やファックス番号などの一時的データを長時間記憶
するためには使用できない。
DETAILED DESCRIPTION OF THE INVENTION Conventional memory units for single chip microcontrollers often consist of read only memory (ROM) and random access memory (RAM). However, ROM can only store immutable programs and data, while RAM can only store changing temporary data. Therefore, this memory unit cannot be used to store temporary data such as telephone numbers and fax numbers for long periods of time.

【0012】図1は、本発明のシングル・チップ・マイ
クロコントローラのメモリ・ユニットのアロケーション
を示す図である。この実施形態では、簡略化のために、
例として4ビットのシングル・チップ・マイクロコント
ローラを検討する。4ビット・シングル・チップ・マイ
クロコントローラは、中央処理装置(図示せず)とメモ
リ・ユニットからなり、このメモリ・ユニットには、ラ
ンダム・アクセス・メモリ1とフラッシュ・メモリ2が
両方とも組み込まれている。
FIG. 1 is a diagram showing the allocation of a memory unit of a single-chip microcontroller according to the present invention. In this embodiment, for simplicity,
Consider a 4-bit single-chip microcontroller as an example. The 4-bit single-chip microcontroller consists of a central processing unit (not shown) and a memory unit, in which both random access memory 1 and flash memory 2 are incorporated. I have.

【0013】図1において、ランダム・アクセス・メモ
リ1(たとえば、SRAM)は、メモリ・アドレス00
0H〜1FFHに位置決めされる。また、フラッシュ・
メモリ2(たとえば、フラッシュEPROM)は、メモ
リ・アドレス200H〜3FFHに位置決めされる。フ
ラッシュ・メモリ2は、同じメモリ・アドレスを共用
し、ブロック選択信号BK(図示せず)によってイネー
ブルにされ選択される4つのメモリ・ブロック、バンク
0〜バンク3に分割される。ブロック選択信号BKは、
レジスタに記憶され、ブロック選択信号BKとイネーブ
ルされるメモリ・ブロックとの関係を、表1に示す。
In FIG. 1, a random access memory 1 (for example, an SRAM) stores a memory address 00
It is positioned at 0H to 1FFH. In addition, flash
Memory 2 (eg, flash EPROM) is located at memory addresses 200H-3FFH. Flash memory 2 shares the same memory address and is divided into four memory blocks, banks 0-3, which are enabled and selected by block select signal BK (not shown). The block selection signal BK is
Table 1 shows the relationship between the block selection signal BK stored in the register and the enabled memory block.

【0014】[0014]

【表1】[Table 1]

【0015】この表から分かるように、メモリ・ブロッ
ク・バンク0は、ブロック選択信号BKが[**00]
のときにイネーブルされ、メモリ・ブロック・バンク1
は、ブロック選択信号BKが[**01]のときにイネ
ーブルされ、メモリ・ブロック・バンク2は、ブロック
選択信号BKが[**10]のときにイネーブルされ、
メモリ・ブロック・バンク3は、ブロック選択信号BK
が[**11]のときイネーブルされる。
As can be seen from this table, in memory block bank 0, the block selection signal BK is [** 00]
, And memory block bank 1
Is enabled when the block select signal BK is [** 01], the memory block bank 2 is enabled when the block select signal BK is [** 10],
The memory block bank 3 receives the block selection signal BK
Is enabled when [** 11].

【0016】フラッシュ・メモリ2の読み取り動作は、
ランダム・アクセス・メモリ1の読み取り動作と同一で
ある。シングル・チップ・マイクロコントローラが、
「読み取り」命令を受け取り、中央処理装置にフラッシ
ュ・メモリ2を読取りアドレスMxに関して読み取らせ
るとき、中央処理装置は、メモリ・アドレスMxのデー
タを、データ・バスを介してデスティネーション・レジ
スタに直接転送する。次に、読み取りステップを例とし
て示す。
The read operation of the flash memory 2 is as follows.
This is the same as the reading operation of the random access memory 1. Single-chip microcontroller
When receiving a "read" instruction and causing the central processing unit to read the flash memory 2 for the read address Mx, the central processing unit transfers the data at the memory address Mx directly to the destination register via the data bus. I do. Next, the reading step will be described as an example.

【0017】 MOV BK,#02H;メモリ・ブロック・バンク2
をイネーブルする MOV A,Mx ;レジスタMxの値をデスティ
ネーション・レジスタAに移動する
MOV BK, # 02H; memory block bank 2
MOV A, Mx; Move register Mx value to destination register A

【0018】この例では、最初にブロック選択信号BK
が2にセットされ、メモリ・ブロッ・バンク2が選択さ
れイネーブルされる。次に、メモリ・アドレスMxに記
憶されたデータが、出力用にデスティネーション・レジ
スタAに直接転送される。
In this example, first, the block selection signal BK
Is set to 2, and memory block bank 2 is selected and enabled. Next, the data stored at the memory address Mx is directly transferred to the destination register A for output.

【0019】読み取り動作と対照的に、フラッシュ・メ
モリ2の書込み/消去動作では、データ/アドレス・レ
ジスタBが、関連する書込み/消去アドレスMyと書込
み/消去データDyを記憶しなければならない。
In contrast to a read operation, in a write / erase operation of the flash memory 2, the data / address register B must store an associated write / erase address My and write / erase data Dy.

【0020】図2は、フラッシュ・メモリ2にデータを
書き込むときの、本発明のシングル・チップ・マイクロ
コントローラのタイミング・シーケンスである。次に、
書込みステップを例として示す。
FIG. 2 shows a timing sequence of the single-chip microcontroller of the present invention when writing data to the flash memory 2. next,
The writing step is shown as an example.

【0021】 MOV BK,#02H;メモリ・ブロック・バンク2をイネーブルする MOV My,B ;データ/アドレス・レジスタBの書込みデータDyを 書込みアドレスMyに移動する delay1 CLR PROG ;PROG信号を低レベルにセットする delay2 set PROG ;PROG信号を高レベルにセットするMOV BK, # 02H; enable memory block bank 2 MOV My, B; move write data Dy of data / address register B to write address My delay1 CLR PROG; set PROG signal to low level Set delay2 set PROG; set PROG signal to high level

【0022】この例では、最初に、ブロック選択信号B
Kが2にセットされ、メモリ・ブロック・バンク2が選
択されイネーブルされる。次に、データ/アドレス・レ
ジスタB(書込みアドレスと書込みデータを記憶し、メ
モリ・ブロック・バンク2内の書き込み位置を示す)に
記憶された書込みデータDyを、メモリ・アドレスMy
に渡す。その後で、書込みデータが、フラッシュ・メモ
リ2のメモリ・ブロック・バンク2のメモリ・アドレス
Myに記録(プログラム)される(図2に示したよう
に、「PROG信号を低レベルにセットする」)所定期
間の記録(プログラミング)した後、メモリ・ブロック
・バンク2のメモリ・アドレスMyの書込みデータが、
比較器を使ってデータ/アドレス・レジスタBに記憶さ
れたデータと比較され、書込み動作の完了を示す書込み
/消去信号EPが得られる。書込み動作が完了した場合
(メモリ・ブロック・バンク2のメモリ・アドレスMx
の書込みデータとデータ/アドレス・レジスタAに記憶
されたデータが等しい場合)は、フラッシュ・メモリ2
へのデータの書込み(プログラミング)が停止され(図
2に示したように、「PROG信号を高レベルにセット
する」)、そうでない場合は、転送が完了するのに十分
な期間だけ記録(プログラミング)が続けられる。
In this example, first, the block selection signal B
K is set to 2 and memory block bank 2 is selected and enabled. Next, the write data Dy stored in the data / address register B (which stores the write address and the write data and indicates the write position in the memory block bank 2) is transferred to the memory address My
Pass to. Thereafter, the write data is recorded (programmed) at the memory address My of the memory block bank 2 of the flash memory 2 ("set the PROG signal to low level" as shown in FIG. 2). After recording (programming) for a predetermined period, the write data of the memory address My of the memory block bank 2 is
The data is compared with the data stored in the data / address register B using the comparator, and a write / erase signal EP indicating completion of the write operation is obtained. When the write operation is completed (memory address Mx of memory block bank 2)
Is equal to the data stored in the data / address register A).
Writing (programming) data to the memory is halted ("set PROG signal high" as shown in FIG. 2); otherwise, recording (programming) is performed only for a period sufficient to complete the transfer. ) Is continued.

【0023】図3は、フラッシュ・メモリ2からデータ
を消去するときの、本発明のシングル・チップ・マイク
ロコントローラのタイミング・シーケンスである。これ
と対応する消去ステップを、例として示す。
FIG. 3 is a timing sequence of the single chip microcontroller of the present invention when erasing data from the flash memory 2. The corresponding erasing step is shown as an example.

【0024】 MOV BK,#03H;メモリ・ブロック・バンク3
をイネーブルする MOV Mx,#300H;消去アドレス300Hを決
定する delay1 CLR ERASE;ERASE信号を低レベルにセッ
トする set ERASE;ERASE信号を高レベルにセッ
トする
MOV BK, # 03H; memory block bank 3
MOV Mx, # 300H; Determine erase address 300H delay1 CLR ERASE; Set ERASE signal to low level set ERASE; Set ERASE signal to high level

【0025】この例では、最初に、ブロック選択信号B
Kが3にセットされ、メモリ・ブロック・バンク3がイ
ネーブルされる。次に、データ/アドレス・レジスタ
(この例では300H)に記憶された消去アドレスが、
メモリ・アドレスMxに渡され、これは、メモリ・ブロ
ック・バンク3のメモリ・アドレスMxにおけるデータ
を消去する位置を示す。次に、メモリ・ブロック・バン
ク3のメモリ・アドレスMxからデータが消去される
(図3に示したように、「ERASE信号を低レベルに
セットする」)。所定期間の消去の後、メモリ・ブロッ
ク・バンク3のメモリ・アドレスMxのデータが、デフ
ォルト値と比較され、消去動作の完了を示す書込み/消
去信号EPが得られる。消去動作が完了した場合は、消
去が停止され(図3に示したように、「ERASE信号
を高レベルにセットする」)、そうでない場合は、転送
が完了するだけの期間消去が継続される。
In this example, first, the block selection signal B
K is set to 3 and memory block bank 3 is enabled. Next, the erase address stored in the data / address register (300H in this example) is
It is passed to the memory address Mx, which indicates the position at which the data at the memory address Mx of the memory block bank 3 is to be erased. Next, data is erased from the memory address Mx of the memory block bank 3 ("set the ERASE signal to low level" as shown in FIG. 3). After erasing for a predetermined period, the data at the memory address Mx of the memory block bank 3 is compared with a default value, and a write / erase signal EP indicating completion of the erasing operation is obtained. If the erase operation is completed, the erase is stopped ("erase signal is set to a high level" as shown in FIG. 3). Otherwise, the erase is continued for a time period during which the transfer is completed. .

【0026】前述のように、書込み動作と消去動作で発
生した書込み/消去信号EPは、4ビット・レジスタに
記憶することができる。書込み/消去信号EPと書込み
/消去動作の完了の関係を、表IIに示す。
As described above, the write / erase signal EP generated in the write operation and the erase operation can be stored in the 4-bit register. Table II shows the relationship between the write / erase signal EP and the completion of the write / erase operation.

【0027】[0027]

【表2】[Table 2]

【0028】消去動作の書込み動作が完成したとき、書
込み/消去信号の最下位ビットがゼロにセットされ(E
P0=0)、そうでない場合は、書込み/消去信号の最
下位ビットが1にセットされる(EP0=1)。
When the write operation of the erase operation is completed, the least significant bit of the write / erase signal is set to zero (E
(P0 = 0), otherwise, the least significant bit of the write / erase signal is set to 1 (EP0 = 1).

【0029】図4は、本発明のシングル・チップ・マイ
クロコントローラの内部ブロック図である。シングル・
チップ・マイクロコントローラは、メモリ・ユニット1
0、データ/アドレス・レジスタ20、ブロック選択レ
ジスタ30、書込み/消去レジスタ40および比較器5
0からなる。メモリ・ユニット10は、2つのランダム
・アクセス・メモリMEM0〜MEM1と、2つのフラ
ッシュEPROMS、MEM2〜MEM3を含む。
FIG. 4 is an internal block diagram of the single chip microcontroller of the present invention. single·
The chip microcontroller is the memory unit 1
0, data / address register 20, block select register 30, write / erase register 40, and comparator 5
Consists of zero. The memory unit 10 includes two random access memories MEM0 to MEM1 and two flash EPROMS, MEM2 to MEM3.

【0030】シングル・チップ・マイクロコントローラ
が、「読み取り」命令を受け取り、フラッシュEPRO
Mに記憶されたデータを読み取ると、イネーブルされた
メモリ・ブロック(ブロック信号BKによって決定され
た)のメモリ・アドレスMxに記憶されたデータが、デ
ータ・バス、バス1を介してデスティネーション・レジ
スタAに直接転送される。シングル・チップ・マイクロ
コントローラが、「書き込み/消去」命令(MOV M
x,A)を受け取り、フラッシュEPROMのメモリ・
アドレスMxへ/からデータを書き込み/消去すると
き、最初に、イネーブルされたメモリ・ブロックのメモ
リ・アドレスMxに記憶されたデータと書込み/消去デ
ータが、データ/アドレス・レジスタ20にラッチされ
る。所定期間の書込み/消去の後、信号CRが生成され
て、比較器50がトリガされ、メモリ・アドレスMxの
データと、データ/アドレス・レジスタ20に記憶され
たデータが比較される。
A single chip microcontroller receives a "read" command and issues a flash EPRO
When the data stored in M is read, the data stored in the memory address Mx of the enabled memory block (determined by the block signal BK) is transferred to the destination register via the data bus, bus 1. A is forwarded directly to A. A single chip microcontroller issues a "write / erase" instruction (MOVM
x, A) and the memory of the flash EPROM
When writing / erasing data to / from the address Mx, first, the data and write / erase data stored at the memory address Mx of the enabled memory block are latched in the data / address register 20. After writing / erasing for a predetermined period, a signal CR is generated, the comparator 50 is triggered, and the data at the memory address Mx is compared with the data stored in the data / address register 20.

【0031】図5は、本発明のシングル・チップ・マイ
クロコントローラの内部の制御信号を示すダイアグラム
である。書込み/消去動作を実行するとき、最初に、メ
モリ・アドレスMxのデータと書込み/消去データが、
データ/アドレス・レジスタ20に記憶される。次に、
フラッシュEPROM2が、所定期間だけ記録(プログ
ラム)される。その後、信号CRが生成され、前述の比
較動作がトリガされ、書込み/消去動作を確実に完了さ
せる。
FIG. 5 is a diagram showing the control signals inside the single chip microcontroller of the present invention. When executing the write / erase operation, first, the data at the memory address Mx and the write / erase data are
Stored in data / address register 20. next,
The flash EPROM 2 is recorded (programmed) for a predetermined period. Thereafter, a signal CR is generated, which triggers the above-described comparison operation, and ensures that the write / erase operation is completed.

【0032】要するに、本発明は、内部フラッシュ・メ
モリを備えたシングル・チップ・マイクロコントローラ
を提供し、それにより、外部EEPROMとその関連デ
バイスおよびプログラムを不要にする。したがって、E
EPROMとその関連デバイスおよびプログラムを省略
することができ、データ(電話番号やファックス番号な
ど)を、フラッシュ・メモリに記憶し、単一の命令を利
用してランダム・アクセス・メモリ内のデータと同じよ
うに直接読み込むことができる。
In summary, the present invention provides a single chip microcontroller with internal flash memory, thereby eliminating the need for an external EEPROM and its associated devices and programs. Therefore, E
EPROM and its associated devices and programs can be omitted, data (telephone numbers, fax numbers, etc.) can be stored in flash memory and, using a single instruction, identical to data in random access memory Can be read directly.

【0033】以上の本発明の好ましい実施形態の説明
は、例示と説明のためだけに提供した。これは、網羅的
なものではなく、本発明を、開示された正確な形態に制
限するものではない。当業者には、多くの修正および変
形が明らかであろう。実施形態は、本発明の原理とその
実際の応用を最もよく説明できるように選択され説明さ
れ、それにより、当業者は、熟慮された特定の使用に適
した様々な実施形態と様々な修正に関して本発明を理解
することができる。本発明の範囲は、併記の特許請求の
範囲およびその等価物によって定義されるものである。
The foregoing description of a preferred embodiment of the invention has been presented for purposes of illustration and description only. This is not exhaustive and does not limit the invention to the precise form disclosed. Many modifications and variations will be apparent to those skilled in the art. The embodiments have been chosen and described in such a way as to best explain the principles of the invention and its practical application, so that those skilled in the art can contemplate the various embodiments and various modifications that are contemplated for a particular use. The present invention can be understood. It is intended that the scope of the invention be defined by the Claims appended hereto and their equivalents.

【0034】[0034]

【発明の効果】本発明のシングル・チップ・マイクロコ
ントローラによれば、 メモリ・ユニットにスタティッ
ク・ランダム・アクセス・メモリとフラッシュEPRO
Mが両方とも組み込まれており、内部フラッシュEPR
OMは、スタティック・ランダム・アクセス・メモリと
同じように直接読み取ることができ、それにより、外部
EPROMと、その中に記憶されたデータを変更するた
めのその関連プログラムが不要になる。
According to the single-chip microcontroller of the present invention, a memory unit has a static random access memory and a flash EPRO.
M are both built-in and internal flash EPR
The OM can be read directly, similar to a static random access memory, thereby eliminating the need for an external EPROM and its associated programs to modify the data stored therein.

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

【図1】本発明のメモリ・ユニットのアロケーションを
示す図である。
FIG. 1 is a diagram showing the allocation of a memory unit according to the present invention.

【図2】フラッシュ・メモリにデータを書き込むとき
の、本発明のシングル・チップ・マイクロコントローラ
のタイミング・シーケンスである。
FIG. 2 is a timing sequence of the single-chip microcontroller of the present invention when writing data to a flash memory.

【図3】フラッシュ・メモリからデータを消去するとき
の、本発明のシングル・チップ・マイクロコントローラ
のタイミング・シーケンスである。
FIG. 3 is a timing sequence of the single-chip microcontroller of the present invention when erasing data from a flash memory.

【図4】本発明のシングル・チップ・マイクロコントロ
ーラの内部ブロック図である。
FIG. 4 is an internal block diagram of the single-chip microcontroller of the present invention.

【図5】本発明のシングル・チップ・マイクロコントロ
ーラ内の制御信号を示す図である。
FIG. 5 is a diagram showing control signals in the single-chip microcontroller of the present invention.

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

1 ランダム・アクセス・メモリ 2 フラッシュ・メモリ 10 メモリ・ユニット 20 データ/アドレス・レジスタ 30 ブロック選択レジスタ 40 書込み/消去レジスタ 50 比較器 DESCRIPTION OF SYMBOLS 1 Random access memory 2 Flash memory 10 Memory unit 20 Data / address register 30 Block selection register 40 Write / erase register 50 Comparator

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 内部フラッシュ・メモリを備えたシング
ル・チップ・マイクロコントローラにおいて、 フラッシュEPROMとスタティックRAMとを備えた
メモリ・ユニットと、 フラッシュEPROMとスタティックRAMとから、読
取りアドレスに関して読み取るときに、読取りアドレス
にあるデータをデータバスを介してデスティネーション
・レジスタに直接転送する中央処理装置とを備え、 前記中央処理装置が、前記フラッシュEPROMに、書
込み/消去アドレス及び書込み/消去データに関して書
き込みまたは消去するとき、最初に、書込み/消去アド
レス及び書込み/消去データをデータ/アドレス・レジ
スタに記憶し、次に、書込み/消去アドレスに書込み/
消去データを書込み/消去し、次に、データ/アドレス
・レジスタの書込み/消去データと、前記フラッシュE
PROM内のデータとを比較することを特徴とするシン
グル・チップ・マイクロコントローラ。
1. A single-chip microcontroller having an internal flash memory, comprising: reading from a memory unit having a flash EPROM and a static RAM; and reading a read address from the flash EPROM and the static RAM. A central processing unit for directly transferring data at an address to a destination register via a data bus, wherein the central processing unit writes or erases the flash EPROM with respect to a write / erase address and write / erase data. First, the write / erase address and the write / erase data are stored in the data / address register, and then the write / erase address is written /
Write / erase erase data, then write / erase data in the data / address register and the flash E
A single chip microcontroller characterized by comparing data in a PROM.
【請求項2】 フラッシュRAMが、同じメモリ・アド
レスを共用しブロック選択信号によってイネーブルされ
る複数のブロックを含むことを特徴とする、請求項1に
記載のシングル・チップ・マイクロコントローラ。
2. The single-chip microcontroller of claim 1, wherein the flash RAM includes a plurality of blocks sharing the same memory address and enabled by a block select signal.
【請求項3】 ブロック選択信号が、パラメータ・レジ
スタに記憶されたことを特徴とする、請求項2に記載の
シングル・チップ・マイクロコントローラ。
3. The single-chip microcontroller according to claim 2, wherein the block selection signal is stored in a parameter register.
【請求項4】 前記フラッシュEPROMに書き込みま
たは消去した後で、前記フラッシュEPROM内の書込
み/消去データをデータ/アドレス・レジスタ内のデー
タと所定の期間比較し、完了を保証する信号を出力する
比較器をさらに含むことを特徴とする、請求項1に記載
のシングル・チップ・マイクロコントローラ。
4. A program for comparing a write / erase data in the flash EPROM with data in a data / address register for a predetermined period after writing or erasing in the flash EPROM, and outputting a signal for guaranteeing completion. The single-chip microcontroller according to claim 1, further comprising a detector.
【請求項5】 フラッシュ・メモリとRAMを有するメ
モリ装置と、 データ・バスと、 フラッシュ・メモリを読取りアドレスに関して読み取る
ときに、読取りアドレスにあるデータを、データ・バス
を介してデスティネーション・レジスタに直接転送する
中央処理装置とを含み、 中央処理装置が、フラッシュ・メモリを書込み/消去ア
ドレスと書込み/消去データに関して書込み/消去する
ときに、最初に、書込み/消去アドレスと書込み/消去
データをデータ・バスを介してデータ/アドレス・レジ
スタに記憶し、次に、フラッシュ・メモリに書込み/消
去して、フラッシュ・メモリ内の書込み/消去データを
データ/アドレス・レジスタ内のデータと比較して、完
了を保証するマイクロコントローラ。
5. A memory device having a flash memory and a RAM, a data bus, and when reading the flash memory with respect to a read address, transferring data at the read address to a destination register via the data bus. A central processing unit that transfers data directly to the flash memory when writing / erasing the flash memory with respect to the write / erase address and the write / erase data. Storing in the data / address register via the bus, then writing / erasing the flash memory, comparing the write / erase data in the flash memory with the data in the data / address register, Microcontroller that guarantees completion.
【請求項6】 フラッシュ・メモリが、EEPROMで
あることを特徴とする請求項5に記載のマイクロコント
ローラ。
6. The microcontroller according to claim 5, wherein the flash memory is an EEPROM.
【請求項7】 フラッシュ・メモリが、同じメモリ・ア
ドレスを共用しブロック選択信号によってイネーブルさ
れる複数のブロックからなることを特徴とする、請求項
5に記載のマイクロコントローラ。
7. The microcontroller of claim 5, wherein the flash memory comprises a plurality of blocks sharing the same memory address and enabled by a block select signal.
【請求項8】 ブロック選択信号を記憶するためのパラ
メータ・レジスタをさらに含むことを特徴とする請求項
7に記載のマイクロコントローラ。
8. The microcontroller according to claim 7, further comprising a parameter register for storing a block selection signal.
【請求項9】 比較の結果を記憶するための書込み/消
去レジスタをさらに含むことを特徴とする請求項7に記
載のマイクロコントローラ。
9. The microcontroller according to claim 7, further comprising a write / erase register for storing a result of the comparison.
JP21228698A 1998-03-31 1998-07-28 Single chip microcontroller Pending JPH11306072A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
TW87/04855 1998-03-31
TW87104855A TW379326B (en) 1998-03-31 1998-03-31 Single-chip microcontroller of built-in flash memory

Publications (1)

Publication Number Publication Date
JPH11306072A true JPH11306072A (en) 1999-11-05

Family

ID=21629788

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21228698A Pending JPH11306072A (en) 1998-03-31 1998-07-28 Single chip microcontroller

Country Status (2)

Country Link
JP (1) JPH11306072A (en)
TW (1) TW379326B (en)

Also Published As

Publication number Publication date
TW379326B (en) 2000-01-11

Similar Documents

Publication Publication Date Title
JP3898305B2 (en) Semiconductor storage device, control device and control method for semiconductor storage device
KR100307894B1 (en) Flash EEPROM Main Memory in Computer Systems
US6128675A (en) Memory device having plurality of flash memories with a flash memory controlling circuit
US6115292A (en) Memory configuration of a composite memory device
JPH1185609A (en) Semiconductor memory and data managing method therefor
KR20040075051A (en) Flash memory access using a plurality of command cycles
JP3875139B2 (en) Nonvolatile semiconductor memory device, data write control method thereof, and program
WO2006051779A1 (en) Nonvolatile storage device control method, memory controller and nonvolatile storage device
JP4308780B2 (en) Semiconductor memory device, memory controller, and data recording method
JPH07153284A (en) Non-volatile semiconductor memory and its control method
JP2003051195A (en) Semiconductor memory device
JPH11306072A (en) Single chip microcontroller
JP3597393B2 (en) Data recording / reproducing device
WO2008032935A1 (en) Device having shared memory and method for transferring code data
US5862075A (en) Device for protection after a page-write operation in an electrically programmable memory
KR920010469A (en) Single Chip Microcomputers and Multifunction Memory
JPH06162786A (en) Information processor using flash memory
KR20030095820A (en) Access control device for memory and method thereof
JP2000276461A (en) Microcomputer
GB2338321A (en) Single chip micro-controller with an internal flash memory
JP2611851B2 (en) ROM read inhibit circuit
JP3152595B2 (en) Microcomputer interrupt handling device
JP3166659B2 (en) Storage device
EP0714060B1 (en) One chip microcomputer with built-in non-volatile memory
JP2627370B2 (en) Development support system