JP3223160B2 - Microcomputer - Google Patents
MicrocomputerInfo
- Publication number
- JP3223160B2 JP3223160B2 JP08555098A JP8555098A JP3223160B2 JP 3223160 B2 JP3223160 B2 JP 3223160B2 JP 08555098 A JP08555098 A JP 08555098A JP 8555098 A JP8555098 A JP 8555098A JP 3223160 B2 JP3223160 B2 JP 3223160B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- rom
- nonvolatile memory
- microcomputer
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Microcomputers (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、不揮発性メモリを
備えるマイクロコンピュータの改良に関する。[0001] 1. Field of the Invention [0002] The present invention relates to an improvement of a microcomputer having a nonvolatile memory.
【0002】[0002]
【従来の技術】一般に、マイクロコンピュータには、動
作制御用のプログラムが記憶されるマスクROMや、デ
ータが記憶されるRAMが内蔵されている。その一方
で、メモリーとして、書き込まれたデータの電気的に一
括消去が可能な不揮発性メモリ(フラッシュメモリ)が
開発され、よく知られるようになった。最近では、マイ
クロコンピュータにおいて前記マスクROMやRAMの
代わりとして不揮発性メモリが内蔵されるものが登場し
てきている。不揮発性メモリを内蔵したマイクロコンピ
ュータでは、不揮発性メモリが電気的に書き込み済みの
データが消去可能なため、動作制御用のプログラム書き
換えが容易に行えるという利点がある。2. Description of the Related Art Generally, a microcomputer has a built-in mask ROM for storing an operation control program and a RAM for storing data. On the other hand, as a memory, a nonvolatile memory (flash memory) capable of electrically erasing written data electrically at a time has been developed and has become well known. Recently, microcomputers having a built-in nonvolatile memory instead of the mask ROM and RAM have appeared. A microcomputer having a built-in nonvolatile memory has an advantage that a program for operation control can be easily rewritten because data that has been electrically written in the nonvolatile memory can be erased.
【0003】[0003]
【発明が解決しようとする課題】不揮発性メモリを内蔵
するマイクロコンピュータにおいては、図2に示すよう
に、不揮発性メモリに書き込まれたプログラムを書き換
えるためのプログラムだけを記憶するマスクROM1が
備えられる。このプログラム書換用のマスクROM1と
不揮発性メモリ2とのアドレス番号は連続したアドレス
番号で付されている。例えば、マスクROM1が000
0H〜0100Hのアドレスが付されるとすると、不揮
発性メモリ2には0101H〜FFFFHが付される。As shown in FIG. 2, a microcomputer having a built-in nonvolatile memory is provided with a mask ROM 1 for storing only a program for rewriting a program written in the nonvolatile memory. The address numbers of the program rewriting mask ROM 1 and the non-volatile memory 2 are assigned consecutive address numbers. For example, if the mask ROM1 is 000
Assuming that addresses from 0H to 0100H are assigned, 0101H to FFFFH are assigned to the nonvolatile memory 2.
【0004】ここで、マスクROM1及び不揮発性メモ
リ2に書き込まれたプログラムは動作制御用であるの
で、同一のアドレッシング信号によって上記2つのメモ
リのアドレスを制御することが望ましい。加えて不揮発
性メモリを内蔵したマイクロコンピュータは、ROMや
RAMを内蔵するマイクロコンピュータのアドレス制御
をそのまま使用している。その為に、アドレス番号はR
OM1とRAM2とに跨って連続したアドレスが付され
ている。しかし、そうすると不揮発性メモリ2にもアド
レス0000H〜0100Hで指定される未使用の領域
が存在するので、不揮発性メモリ2の利用効率が悪かっ
た。Here, since the programs written in the mask ROM 1 and the nonvolatile memory 2 are for operation control, it is desirable to control the addresses of the two memories by the same addressing signal. In addition, a microcomputer having a built-in nonvolatile memory directly uses the address control of a microcomputer having a built-in ROM or RAM. Therefore, the address number is R
Consecutive addresses are assigned over OM1 and RAM2. However, in this case, since the non-volatile memory 2 also has an unused area designated by the addresses 0000H to 0100H, the use efficiency of the non-volatile memory 2 is low.
【0005】[0005]
【課題を解決するための手段】本発明は、電気的に一括
消去可能な不揮発性メモリと、プログラムが記憶された
ROMとを備え、前記ROMのアドレスが前記不揮発性
メモリのアドレスと重複されて付されるマイクロコンピ
ュータにおいて、通常動作時前記ROMのアドレスを選
択し、テスト時前記不揮発性メモリのアドレスを選択す
るセレクタを備えることを特徴とする。According to the present invention, there is provided a nonvolatile memory which can be electrically erased in a batch, and a ROM in which a program is stored, wherein an address of the ROM is overlapped with an address of the nonvolatile memory. The attached microcomputer is characterized by comprising a selector for selecting an address of the ROM during a normal operation and selecting an address of the non-volatile memory during a test.
【0006】また、前記ROM及び不揮発性メモリのア
ドレス信号を発生するマイコン制御部部とを備え、前記
セレクタは外部回路より印加されるテスト信号に応じて
前記アドレス信号を前記ROMまたは前記不揮発性メモ
リに導通させることを特徴とする。特に、前記セレクタ
は、前記テスト信号に応じて互いにオンまたはオフする
2つのトランスミッションゲートより成ることを特徴と
する。A microcomputer controller for generating address signals for the ROM and the nonvolatile memory; wherein the selector converts the address signal to the ROM or the nonvolatile memory in response to a test signal applied from an external circuit; To be electrically connected. In particular, the selector includes two transmission gates that are turned on or off in response to the test signal.
【0007】本発明によれば、同一アドレスが付される
ROMと不揮発性メモリとにおいて、通常動作時ROM
のアドレスが指定され、テスト時に不揮発性メモリのR
OMと同一のアドレスが指定されるので、通常動作時使
用されない不揮発性メモリの特定領域をテスト時に使用
される。According to the present invention, the normal operation ROM and the nonvolatile memory have the same address.
Is specified, and R is stored in the nonvolatile memory during the test.
Since the same address as that of the OM is specified, a specific area of the non-volatile memory which is not used in the normal operation is used in the test.
【0008】[0008]
【発明の実施の形態】図1は本発明の実施の形態を示す
図である。1は不揮発性メモリ内のプログラム書換用の
プログラムが書き込まれたマスクROMであり、アドレ
ス制御部1a及びデータ出力部1bを備える。2はマイ
クロコンピュータ自体の動作を制御するためのプログラ
ムが書き込まれた不揮発性メモリであり、アドレス制御
部2a、データ入力部2b及びデータ出力部2cを備え
る。3はマイコン制御部であり、カウント値に応じてア
ドレス信号を発生するプログラムカウンタPC、プログ
ラムデータを命令にデコードするインストラクションデ
コーダIDEC、外部RAMにアドレス信号を発生する
RAM用アドレス回路ADR及びデータを一時格納する
レジスタRGを備える。4はマイコン制御部3からのア
ドレス信号をマスクROM1及び不揮発性メモリ2に選
択して出力するセレクタであり、5はマスクROM1及
び不揮発性メモリ2の出力データを選択してマイコン制
御部3に出力するセレクタである。6及び7は外部回路
からのテスト信号TESTに応じてアドレス信号をマス
クROM1または不揮発性メモリ2に導通させるトラン
スミッションゲートである。8及び9は外部回路からの
テスト信号TESTに応じてマスクROM1または不揮
発性メモリ2からの出力データを導通させるトランスミ
ッションゲートである。そして、10は外部RAMであ
る。FIG. 1 is a diagram showing an embodiment of the present invention. Reference numeral 1 denotes a mask ROM in which a program for rewriting a program in a nonvolatile memory is written, and includes an address control unit 1a and a data output unit 1b. Reference numeral 2 denotes a nonvolatile memory in which a program for controlling the operation of the microcomputer itself is written, and includes an address control unit 2a, a data input unit 2b, and a data output unit 2c. Reference numeral 3 denotes a microcomputer control unit, which is a program counter PC that generates an address signal according to a count value, an instruction decoder IDEC that decodes program data into an instruction, a RAM address circuit ADR that generates an address signal in an external RAM, and temporarily stores data. It has a register RG for storing. Reference numeral 4 denotes a selector for selecting and outputting an address signal from the microcomputer control unit 3 to the mask ROM 1 and the non-volatile memory 2. Reference numeral 5 selects output data of the mask ROM 1 and the non-volatile memory 2 and outputting the data to the microcomputer control unit 3. Selector. Reference numerals 6 and 7 are transmission gates for conducting an address signal to the mask ROM 1 or the nonvolatile memory 2 in response to a test signal TEST from an external circuit. Reference numerals 8 and 9 denote transmission gates for conducting output data from the mask ROM 1 or the nonvolatile memory 2 in response to a test signal TEST from an external circuit. Reference numeral 10 denotes an external RAM.
【0009】図1において、テスト動作時のデータ読み
出し動作を説明する。外付けピンPINを介してHレベ
ルのテスト信号TESTがトランスミッションゲート6
乃至9に印加される。よって、トランスミッションゲー
ト6及び8はインバータ9の作用によりオフし、トラン
スミッションゲート7及び9はオンする。この状態に
て、プログラムカウンタPCによりアドレス0000H
〜0100Hのうち一つのアドレスを指定するアドレス
信号adが出力されたとする。マイコン制御部3では、
アドレス0000H〜0100Hを指定するアドレス信
号が出力されたことを判別して、第1状態のセレクト信
号SEを出力する。よって、セレクタ4はアドレス信号
adをトランスミッションゲート6及び7の方へ出力さ
せ、セレクタ5はトランスミッションゲート8及び9の
出力データを選択してマイコン制御部5に出力させる。Referring to FIG. 1, a data read operation during a test operation will be described. An H-level test signal TEST is applied to the transmission gate 6 via an external pin PIN.
To 9. Therefore, transmission gates 6 and 8 are turned off by the action of inverter 9, and transmission gates 7 and 9 are turned on. In this state, the address 0000H is set by the program counter PC.
It is assumed that an address signal ad for designating one address among 0-100H is output. In the microcomputer control unit 3,
It is determined that an address signal designating addresses 0000H to 0100H has been output, and a first state select signal SE is output. Therefore, the selector 4 outputs the address signal ad to the transmission gates 6 and 7, and the selector 5 selects the output data of the transmission gates 8 and 9 and outputs the data to the microcomputer control unit 5.
【0010】ここで、トランスミッションゲート7及び
9がオンしているので、アドレス信号adはセレクタ4
を介して、トランスミッションゲート7を通過し、不揮
発性メモリ2内のアドレス制御回路2aに入力される。
アドレス信号adにより、アドレス0000H〜010
0Hが指定され、指定されたアドレス内のデータが読み
出される。読み出されたデータはデータ出力部2cから
出力され、トランスミッションゲート9を通過し、セレ
クタ5を介してマイコン制御部3に入力される。Since the transmission gates 7 and 9 are turned on, the address signal ad is supplied to the selector 4
Through the transmission gate 7 and input to the address control circuit 2a in the nonvolatile memory 2.
Addresses 0000H to 010 are generated by the address signal ad.
0H is designated, and the data in the designated address is read. The read data is output from the data output unit 2c, passes through the transmission gate 9, and is input to the microcomputer control unit 3 via the selector 5.
【0011】また、テスト時のデータ書き込みも、アド
レス指定は上記のような手順で行われる。書き込まれる
べきデータは不揮発性メモリ2のデータ入力部に入力さ
れ、その後指定されたアドレスにデータが順次書き込ま
れる。次に、通常動作時について説明する。通常動作時
Lレベルのテスト信号TESTが入力され、トランスミ
ッションゲート6及び8がオンし、トランスミッション
ゲート7及び9はオフしている。このような状態におい
ては不揮発性メモリ2に書き込まれたプログラムに従っ
た動作を説明する。マイコン制御部3のプログラムカウ
ンタPCのカウント値がインクリメントされ、カウント
値に応じてアドレス信号adが発生する。尚、この場合
のアドレス信号adはアドレス0101H〜FFFFH
のいずれかを指定するものである。マイコン制御部3は
アドレス0101H〜FFFFHを指定するアドレス信
号が出力されたことを判別して、第2状態のセレクト信
号SEを出力する。よって、セレクタ4はアドレス信号
adを不揮発性メモリ2へ出力させ、セレクタ5は不揮
発性メモリ2の出力データを選択してマイコン制御部3
に出力させる。[0011] In the data writing at the time of the test, the address is specified in the above-described procedure. The data to be written is input to the data input section of the nonvolatile memory 2, and then the data is sequentially written to the specified address. Next, the normal operation will be described. During normal operation, an L-level test signal TEST is input, transmission gates 6 and 8 are turned on, and transmission gates 7 and 9 are turned off. In such a state, an operation according to a program written in the nonvolatile memory 2 will be described. The count value of the program counter PC of the microcomputer control unit 3 is incremented, and an address signal ad is generated according to the count value. Note that the address signal ad in this case has addresses 0101H to FFFFH.
Is specified. The microcomputer control unit 3 determines that an address signal designating the addresses 0101H to FFFFH has been output, and outputs a second state select signal SE. Therefore, the selector 4 outputs the address signal ad to the nonvolatile memory 2, and the selector 5 selects the output data of the nonvolatile memory 2 and
Output.
【0012】アドレス信号adにより不揮発メモリ2の
アドレスが指定され、プログラムデータが読み出され
る。プログラムデータはセレクタ5を介してマイコン制
御部3に入力され、インストラクションデコーダIDE
Cでプログラム命令にデコードされ、各種動作が実行さ
れる。その後、プログラムカウントIDECのカウント
値がインクリメントされ、不揮発性メモリ2において次
のアドレスが指定され、プログラムデータに応じて各種
命令が実行される。マイクロコンピュータは上記動作を
繰り返し、通常動作を行う。The address of the nonvolatile memory 2 is designated by the address signal ad, and the program data is read. The program data is input to the microcomputer control unit 3 through the selector 5 and the instruction decoder IDE
At C, the instruction is decoded into a program instruction, and various operations are executed. Thereafter, the count value of the program count IDEC is incremented, the next address is specified in the nonvolatile memory 2, and various instructions are executed according to the program data. The microcomputer repeats the above operation and performs a normal operation.
【0013】次に、通常動作中の外部割り込みによるデ
ータの書き換えについて説明する。プログラムカウンタ
PCの通常動作時のカウント値がレジスタRGに格納さ
れた後、プログラムカウンタPCのカウント値が所定値
(例えば、0000H)に設定される。これにより、ア
ドレス0000H〜0100Hのいずれかを指定するア
ドレス信号が出力されたことを判別して、第1状態のセ
レクト信号SEを出力する。よって、アドレス信号ad
は、セレクタ4及びトランスミッションゲート6を介し
てマスクROM1のアドレス制御部1aに入力される。
そして、ROM1のアドレスが指定されて、ROM1の
プログラムデータが読み出される。プログラムデータは
トランスミッションゲート8を通過し、セレクタ5を介
してマイコン制御部3に入力される。その後、プログラ
ムカウンタPCがインクリメントされ、ROM1内の次
のアドレスが指定される。Next, rewriting of data by an external interrupt during normal operation will be described. After the count value of the program counter PC during normal operation is stored in the register RG, the count value of the program counter PC is set to a predetermined value (for example, 0000H). Thus, it is determined that an address signal designating any one of addresses 0000H to 0100H has been output, and a select signal SE in the first state is output. Therefore, the address signal ad
Is input to the address control unit 1a of the mask ROM 1 via the selector 4 and the transmission gate 6.
Then, the address of the ROM 1 is specified, and the program data of the ROM 1 is read. The program data passes through the transmission gate 8 and is input to the microcomputer control unit 3 via the selector 5. Thereafter, the program counter PC is incremented, and the next address in the ROM 1 is specified.
【0014】ROM1には不揮発性メモリ2のデータを
書き換えるプログラムが書き込まれており、このプログ
ラムに従ってマイコン制御部3が動作する。まず、外部
RAM12のアドレスが指定され、書き換えられるデー
タが読み出される。読み出されたデータはマイコン制御
部3のレジスタRGに保持された後、不揮発性メモリ2
のデータ入力部2bに転送される。データ入力部2b内
のデータは不揮発性メモリ2に書き込まれ、データ書換
えが完了する。書換えが完了すると、レジスタRGに格
納されていた外部割込み直前のカウント値がカウント値
にセットされ、通常動作に戻る。A program for rewriting data in the nonvolatile memory 2 is written in the ROM 1, and the microcomputer control section 3 operates according to the program. First, an address of the external RAM 12 is specified, and data to be rewritten is read. The read data is held in the register RG of the microcomputer control unit 3 and then read from the nonvolatile memory 2.
Is transferred to the data input unit 2b. The data in the data input unit 2b is written to the nonvolatile memory 2, and the data rewriting is completed. When the rewriting is completed, the count value immediately before the external interrupt stored in the register RG is set to the count value, and the operation returns to the normal operation.
【0015】このように、Hレベルのテスト信号を印加
することによりROM1と同一アドレスが付された不揮
発性メモリ2の0000H〜0100Hの領域にデータ
の読み出し及び書き込みを行うことができ、Lレベルの
テスト信号を印加することにより、ROM1のプログラ
ムを読み出すことができる。As described above, by applying the H-level test signal, data can be read and written from / to 0000H to 0100H of the nonvolatile memory 2 assigned the same address as that of the ROM 1, and the L-level can be read. By applying the test signal, the program in the ROM 1 can be read.
【0016】[0016]
【発明の効果】本発明によれば、同一アドレスが付され
るROMと不揮発性メモリとにおいて、通常動作時RO
Mのアドレスが指定され、テスト時に不揮発性メモリの
ROMと同一のアドレスが指定されるので、通常動作時
使用されない不揮発性メモリの特定領域をテスト時に使
用される。その為、不揮発性メモリを有効に利用するこ
とができる。According to the present invention, in the ROM and the nonvolatile memory to which the same address is assigned, the RO during the normal operation is stored.
Since the address of M is designated and the same address as the ROM of the nonvolatile memory is designated at the time of the test, a specific area of the nonvolatile memory which is not used at the time of the normal operation is used at the time of the test. Therefore, the nonvolatile memory can be used effectively.
【図1】本発明の実施の形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.
【図2】従来例を示すブロック図である。FIG. 2 is a block diagram showing a conventional example.
1 ROM 2 不揮発性メモリ 3 マイコン制御部 4,5 セレクタ DESCRIPTION OF SYMBOLS 1 ROM 2 Non-volatile memory 3 Microcomputer control part 4, 5 Selector
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 11/22 - 11/277 G06F 12/00 - 12/06 G06F 15/78 ──────────────────────────────────────────────────続 き Continued on the front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06F 11/22-11/277 G06F 12/00-12/06 G06F 15/78
Claims (3)
と、前記不揮発性メモリのデータを書き換えするための
書き換えプログラムが記憶されたROMとを備え、前記
不揮発性メモリの一部の領域のアドレスが前記ROMの
アドレスと同一アドレスが付されるマイクロコンピュー
タにおいて、前記不揮発性メモリ及び前記ROMのアドレス信号を発
生するものであって、通常動作時には、前記不揮発性メ
モリの他の領域と前記ROMとのアドレスが連続するよ
うにアドレスを発生し、テスト時には不揮発性メモリの
一部の領域を使用するようにアドレスを発生するマイコ
ン制御部を備える ことを特徴とするマイクロコンピュー
タ。1. A non-volatile memory that can be electrically erased in a batch, and a memory for rewriting data in the non-volatile memory.
And a rewriting program is stored ROM, the
The address of a partial area of the nonvolatile memory is
A microcomputer to which the same address as the address is assigned generates an address signal for the nonvolatile memory and the ROM.
The non-volatile memory during normal operation.
Addresses in other areas of the memory and the ROM are continuous.
The address is generated as shown in the figure.
Myco generating address to use some area
A microcomputer comprising a computer control unit .
記ROMを指定するアドレス信号が、通常動作時前記R
OMに入力するように選択し、テスト時前記不揮発性メ
モリの一部の領域に入力するように選択するセレクタを
備え、前記セレクタは外部回路より印加されるテスト信
号に応じて前記アドレス信号を前記ROMまたは前記不
揮発性メモリに導通させることを特徴とする請求項1記
載のマイクロコンピュータ。2. A method according to claim 1, further comprising the steps of :
During normal operation, the address signal for designating the ROM
OM, and select the non-volatile memory during the test.
Selector to select input to some area of the memory
2. The microcomputer according to claim 1 , wherein the selector is configured to conduct the address signal to the ROM or the nonvolatile memory in accordance with a test signal applied from an external circuit.
て互いにオンまたはオフする2つのトランスミッション
ゲートより成ることを特徴とする請求項2記載のマイク
ロコンピュータ。3. The microcomputer according to claim 2, wherein the selector includes two transmission gates that are turned on or off in accordance with the test signal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP08555098A JP3223160B2 (en) | 1998-03-31 | 1998-03-31 | Microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP08555098A JP3223160B2 (en) | 1998-03-31 | 1998-03-31 | Microcomputer |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH11282708A JPH11282708A (en) | 1999-10-15 |
JP3223160B2 true JP3223160B2 (en) | 2001-10-29 |
Family
ID=13861955
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP08555098A Expired - Fee Related JP3223160B2 (en) | 1998-03-31 | 1998-03-31 | Microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3223160B2 (en) |
-
1998
- 1998-03-31 JP JP08555098A patent/JP3223160B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH11282708A (en) | 1999-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100198382B1 (en) | Computer with multi-booting function | |
US4626986A (en) | Processor having plural initial loading programs for loading different operating systems | |
EP0991081B1 (en) | Emulated EEPROM memory device and corresponding method | |
JP2004118826A (en) | System unit booted using flash memory, and its booting method | |
KR100265266B1 (en) | Microcomputer comprsing flash eeprom and method of erasing flash eeprom | |
KR100604877B1 (en) | Apparatus and method for controlling the mapping of memory addresses in embedded systems | |
JP3223160B2 (en) | Microcomputer | |
US5974519A (en) | Address re-designate circuit for microcontroller | |
JPH11184724A (en) | In-circuit emulator and semiconductor integrated circuit | |
US20020188823A1 (en) | Program executing device and method for executing programs | |
JP2001147863A (en) | Flash memory rewrite device | |
US6298412B1 (en) | Microcomputer and method of determining completion of writing in the microcomputer | |
JP2731618B2 (en) | emulator | |
JP3093642B2 (en) | Single chip microcomputer and test method thereof | |
EP0714060B1 (en) | One chip microcomputer with built-in non-volatile memory | |
JP2858517B2 (en) | Computer system and method for providing addressable expanded storage in the same | |
JP3691137B2 (en) | Microcomputer with built-in nonvolatile memory | |
JPS6012660B2 (en) | memory device | |
JPH0381185B2 (en) | ||
JPH11282706A (en) | Microcomputer | |
JPH0991267A (en) | Data writer for non-volatile memory | |
JPH11149407A (en) | Memory system and using method for external non-volatile memory | |
JPH1050086A (en) | Microcomputer having eeprom and its rewriting method | |
JPH06222917A (en) | Electronic device | |
JPH11184834A (en) | Microcomputer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |