[go: up one dir, main page]

JPH087742B2 - One-chip microcomputer - Google Patents

One-chip microcomputer

Info

Publication number
JPH087742B2
JPH087742B2 JP2137953A JP13795390A JPH087742B2 JP H087742 B2 JPH087742 B2 JP H087742B2 JP 2137953 A JP2137953 A JP 2137953A JP 13795390 A JP13795390 A JP 13795390A JP H087742 B2 JPH087742 B2 JP H087742B2
Authority
JP
Japan
Prior art keywords
circuit
period
address
reset
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.)
Expired - Lifetime
Application number
JP2137953A
Other languages
Japanese (ja)
Other versions
JPH0431981A (en
Inventor
良明 末永
茂美 千村
浩明 桝本
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 JP2137953A priority Critical patent/JPH087742B2/en
Publication of JPH0431981A publication Critical patent/JPH0431981A/en
Publication of JPH087742B2 publication Critical patent/JPH087742B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、ワンチップマイクロコンピュータ(以下
ワンチップマイコン)に関し、詳しくは、製品化された
ワンチップマイコンに対して後から入出力端子について
オプション変更が可能なワンチップマイコンに関する。
Description: TECHNICAL FIELD The present invention relates to a one-chip microcomputer (hereinafter, one-chip microcomputer), and more specifically, to a commercialized one-chip microcomputer, an option for input / output terminals later. The present invention relates to a changeable one-chip microcomputer.

[従来の技術] ワンチップマイコンは、カメラや家庭用電気器具、そ
の他の電子機器に制御回路として多く使用され、4ビッ
トや8ビット制御のものが多数造られている。
[Prior Art] One-chip microcomputers are often used as control circuits in cameras, household electric appliances, and other electronic devices, and many 4-bit or 8-bit control devices are manufactured.

この種のワンチップマイコンは、汎用のマイクロプロ
セッサと異なり、1チップの内部にRAMやROM等が固定の
容量でバス接続された形であらかじめ内蔵され、外部に
対しての信号の授受は、同様にバス接続されたI/Oバッ
ファで行い、これら回路をセントラルプロセッサ(ある
いはコントローラ、以下これらを含めてCPUという)が
制御して、I/Oバッファを介して外部回路とデータの授
受を行うように設計されている。
Unlike general-purpose microprocessors, this type of one-chip microcomputer is built in advance in the form of a RAM, ROM, etc., fixed-capacity bus-connected inside one chip, and the same transmission and reception of signals to and from the outside. The I / O buffer connected to the bus is used, and these circuits are controlled by the central processor (or the controller, including the CPU below), and data is exchanged with external circuits via the I / O buffer. Is designed to.

また、ROMを有するワンチップマイコンでは、ROMに回
路それぞれの用途に応じたアプリケーションプログラム
を後から書込むことができ、LSIとして製造された後に
それぞれ用途に応じてアプリケーションプログラムがロ
ードされ、用途対応のワンチップマイコンとして利用さ
れる。さらに、後者のものでは、マスクオプションによ
り、例えば1つの端子でCMOS出力かもしくはオープンド
レイン出力というように、種々のオプション機能をオプ
ション用の入出力端子等に設定できるようになってい
る。
Also, in a one-chip microcomputer having a ROM, an application program corresponding to each application of the circuit can be written in the ROM later, and after being manufactured as an LSI, the application program is loaded according to each application and the application corresponding to the application is loaded. Used as a one-chip microcomputer. Further, in the latter, various optional functions such as CMOS output or open drain output with one terminal can be set to the input / output terminal for the option by the mask option.

[解決しようとする課題] ROMにアプリケーションプログラムが後から書込める
タイプのワンチップマイコンは、後からアプリケーショ
ンプログラムの変更が可能であるので、ワンチップマイ
コンの開発や種々の用途向けに利用できる。しかし、こ
の場合、入出力端子に付加されたオプション機能につい
ては、それがマスクオプションである関係から後から変
更できない。
[Problems to be Solved] A one-chip microcomputer in which an application program can be written to a ROM later can be used for development of the one-chip microcomputer and various purposes because the application program can be changed later. However, in this case, the option function added to the input / output terminal cannot be changed later because it is a mask option.

そこで、入出力端子のオプション機能の変更は、従
来、外部回路の修正で対応したり、外部に付加回路を設
けることで行われている。その結果、この種のワンチッ
プマイコンをシステム開発に利用する場合には、特に、
そのことでシステム開発の効率が低下する欠点がある。
Therefore, the change of the optional function of the input / output terminal has hitherto been carried out by correcting the external circuit or by providing an external additional circuit. As a result, especially when using this type of one-chip microcomputer for system development,
This has the drawback of reducing the efficiency of system development.

この発明は、このような従来技術の問題点を解決する
ものであって、後から入出力端子についてオプション機
能の変更ができるワンチップマイコンを提供することを
目的とする。
SUMMARY OF THE INVENTION The present invention solves the above-mentioned problems of the prior art, and an object of the present invention is to provide a one-chip microcomputer in which an optional function of an input / output terminal can be changed later.

[課題を解決するための手段] このような目的を達成するためのこの発明のワンチッ
プマイコンの構成は、不揮発性メモリが端子から入力さ
れる電気信号により書換え可能なメモリであって、リセ
ット期間が短い第1の期間を有する第1イニシャルリセ
ット信号とこれよりリセット期間が長い第2の期間を有
する第2のイニシャルリセット信号とを発生するイニシ
ャルリセット回路と、不揮発性メモリのアドレスをアク
セスする信号を送出するアドレスカウンタと、特定のデ
ータがセットされる記憶回路を有しこの記憶回路に記憶
されたデータに応じて動作するI/Oバッファとを備えて
いて、第1の期間が不揮発性メモリとアドレスカウンタ
と記憶回路とが動作可能になるまでの期間であり、第2
の期間が不揮発性メモリとアドレスカウンタと憶回路以
外の前記CPUを含めた内部回路が動作可能になる期間で
あって、記憶回路に転送するデータが不揮発性メモリに
端子を介して電気信号として書込まれ、アドレスカウン
タが前記イニシャルリセット回路から第1のイニシャル
リセット信号を受けてリセットが解除された第1の期間
終了から第2の期間の終了までの間にアドレスカウンタ
のカウント値を順次更新してこのアドレスカウンタのカ
ウント値に応じてアクセスされる不揮発性メモリに記憶
されたデータを記憶回路に転送して記憶し、CPUを含め
た内部回路がイニシャルリセット回路から第2のイニシ
ャルリセット信号を受けてリセットが解除された第2の
期間の終了後にCPUを含めた内部回路を動作させるもの
である。
[Means for Solving the Problems] The configuration of the one-chip microcomputer of the present invention for achieving the above object is such that the non-volatile memory is a rewritable memory by an electric signal input from a terminal, and a reset period Reset circuit for generating a first initial reset signal having a short first period and a second initial reset signal having a second period having a longer reset period, and a signal for accessing an address of the nonvolatile memory And an I / O buffer that has a storage circuit in which specific data is set and that operates according to the data stored in the storage circuit, and the first period is a nonvolatile memory. Is a period until the address counter and the memory circuit become operable.
Is a period during which the internal circuits including the CPU other than the non-volatile memory, the address counter, and the storage circuit can operate, and the data transferred to the storage circuit is written to the non-volatile memory as an electric signal through the terminal. When the address counter receives the first initial reset signal from the initial reset circuit and reset is released, the count value of the address counter is sequentially updated from the end of the first period to the end of the second period. The data stored in the nonvolatile memory that is accessed according to the count value of the lever counter is transferred to the storage circuit and stored therein, and the internal circuit including the CPU receives the second initial reset signal from the initial reset circuit. The internal circuit including the CPU is operated after the end of the second period when the reset is released.

[作用] ところで、ワンチップマイコンは、内蔵されるCPU等
の内部に多種多様な回路が含まれ、CPUの外部にも多種
多様な回路がある。この関係でそれらすべての動作を保
証するための電源電圧になるまでのリセット期間は比較
的長い。一方、メモリの動作可能な電圧は、CPUや一般
のハード回路よりも低い値に設定されているので、電源
ONから動作可能になるまでの期間は、前記のリセット期
間よりも短い。これは、記憶データの保証とバックアン
プ動作を行う関係からそうなっている。また、レジスタ
やアクセス回路などは、トランジスタの工夫によりメモ
リと同様な動作電圧の低い回路にすることは容易であ
る。そこで、前記のリセット期間よりも短い期間に不揮
発性メモリとアクセス回路と記憶回路とを動作させてオ
プションI/Oについて初期設定をする。このようにすれ
ば、通常のリセット期間において、オプション設定が完
了する。
[Operation] By the way, the one-chip microcomputer includes various circuits inside the built-in CPU and the like, and various circuits outside the CPU. In this relationship, the reset period until reaching the power supply voltage for guaranteeing all the operations is relatively long. On the other hand, the operable voltage of the memory is set to a value lower than that of the CPU and general hardware circuits.
The period from turning on to becoming operable is shorter than the reset period. This is because of the guarantee of stored data and the back-amplifier operation. Further, it is easy to make a register, an access circuit, and the like into a circuit having a low operating voltage like a memory by devising a transistor. Therefore, the nonvolatile memory, the access circuit, and the storage circuit are operated during a period shorter than the reset period to initialize the option I / O. In this way, option setting is completed during the normal reset period.

すなわち、イニシャルリセット回路に期間の相違する
第1及び第2のイニシャルリセット信号を発生させ、第
1のリセット信号と第2のリセット信号との間に、端子
を介して電気信号により書込がみできる不揮発性メモ
リ、例えば、EEPROMのアクセス回路を動作させてEEPROM
に記憶したデータをI/Oに転送するようにしているの
で、EEPROMのデータをあらかじめ外部から書込み、変更
しておけば、I/Oに記憶されるデータを容易に変更する
ことができる。
That is, the first and second initial reset signals having different periods are generated in the initial reset circuit, and writing is performed by an electric signal between the first reset signal and the second reset signal via the terminal. Non-volatile memory, for example, EEPROM by operating the access circuit of EEPROM
Since the data stored in the I / O is transferred to the I / O, the data stored in the I / O can be easily changed if the data in the EEPROM is externally written and changed in advance.

その結果、I/Oにオプションがあるときには、後から
自由にそのI/Oに対してオプションに応じた設定ができ
る。
As a result, when an I / O has an option, the I / O can be freely set later according to the option.

[実施例] 以下、この発明の一実施例について図面を参照して詳
細に説明する。
[Embodiment] An embodiment of the present invention will be described in detail below with reference to the drawings.

第1図は、この発明のワンチップマイコンの一実施例
のブロック図であり、第2図は、オプション用EEPROMと
I/Oバッファとの関係を示す説明図、第3図は、オプシ
ョン用入出力端子のI/Oの内部構成の説明図である。
FIG. 1 is a block diagram of one embodiment of the one-chip microcomputer of the present invention, and FIG.
FIG. 3 is an explanatory diagram showing the relationship with the I / O buffer, and FIG. 3 is an explanatory diagram of the internal configuration of the I / O of the option input / output terminal.

第1図において、10は、ワンチップマイコンであっ
て、タイミング発生回路を含むCPU1と、アプリケーショ
ンプログラム記憶用のEEPROM2、入出力端子に対してオ
プション機能付加についてのデータ記憶用のEEPROM3、E
EPROM2及びEEPROM3をアクセスするためのアドレスカウ
ンタ4a、EEPROM2及びEEPROM3に対する書込みデータを一
時的に記憶するレジスタ4b,I/Oバッファ(I/O)5a,5b,
・・・,5n、I/Oバッファ(I/O)6a,6b,・・・6m、オプ
ション設定用入出力端子に接続されたI/Oバッファ(I/
O)7a,7b,・・・7、そしてモード設定用端子8とを
有している。そして、これらの各回路は、バス9を介し
て相互に接続されている。また、オプション機能付加用
のEEPROM3は、前記バス9とは別にオプション設定用入
出力端子に接続されたI/Oバッファ7a,7b,・・・7と
データ線4c及びアドレスバス4d(このアドレスバスはバ
ス9のアドレスバスであってもよい)により相互に接続
されている。
In FIG. 1, reference numeral 10 denotes a one-chip microcomputer, which includes a CPU 1 including a timing generation circuit, an EEPROM 2 for storing an application program, and an EEPROM 3 and E for storing data for adding optional functions to input / output terminals.
Address counter 4a for accessing EPROM2 and EEPROM3, register 4b for temporarily storing write data for EEPROM2 and EEPROM3, I / O buffers (I / O) 5a, 5b,
..., 5n, I / O buffer (I / O) 6a, 6b, ... 6m, I / O buffer (I / O) connected to the input / output terminal for option setting
O) 7a, 7b, ... 7 and a mode setting terminal 8. Then, these respective circuits are connected to each other via a bus 9. In addition to the bus 9, the EEPROM 3 for adding the optional function includes the I / O buffers 7a, 7b, ... 7 connected to the option setting input / output terminals, the data line 4c and the address bus 4d (this address bus May be the address bus of bus 9).

11は、クロック発生回路であって、CPU2をはじめワン
チップマイコン10の各回路にクロックを供給するととも
に、アドレスカウンタ+デコーダ4a(以下アドレスカウ
ンタ4aとして説明)にクロック(信号11aとして示す)
を供給する。これによりアドレスカウンタ4aは、ワンチ
ップマイコン10に電源が投入され、リセットが解除され
てから動作を始める。12は、イニシャルリセット回路で
あって、通常のイニシャルリセット回路のほかに内部に
カウンタを有していて、電源が“ON"されたときに2種
類の異なるリセット期間を持つリセット信号を発生す
る。第1のリセット信号12aは、アドレスカウンタ4aを
リセット解除をする信号であり、電源電圧が回路動作可
能な電圧になる期間の間、LOWレベル(以下“L")とな
り、リセット状態を保つ。これは、例えば、クロック発
生回路11のクロックを電源“ON"からほぼ1024個程度カ
ウントする間、“L"であり、その後HIGHレベル(以下
“H")となる。この信号は、通常のC,Rを用いたリセッ
ト回路やカウンタにより構成することができる。第2の
リセット信号12bは、電源“ON"から“L"となっていて、
第1のリセット信号12aが“H"となってからさらにクロ
ックを、例えば、1024個カウントした後に“L"から“H"
となる信号であり、CPU2等の内部回路のリセット解除を
する。この信号は、例えば、カウンタを用いたリセット
回路により構成することができる。このようなイニシャ
ルリセット回路12によりこれら2つのリセット信号を発
生させることによりアドレスカウンタ4aは、ワンチップ
マイコン10における他の回路よりも先にリセットが解除
されて動作し、0から1023までのアドレスを発生する。
なお、この期間にあるときには、電源電圧はEEPROMやI/
Oバッファが動作する電源電圧になっている。このと
き、アドレスカウンタ4aは、第1のリセット信号12aが
“H"となってから第2のリセット信号12bが“H"となる
までの間、クロック11aにより順次インクリメントさ
れ、各アドレス値に対応するEEPROM3の各アドレスから
データを読出してオプション入出力用のI/Oバッファ7a,
7b,・・・7に対してデータ線4cを介して順次データ
を転送する。
Reference numeral 11 denotes a clock generation circuit, which supplies a clock to each circuit of the one-chip microcomputer 10 including the CPU 2 and a clock (shown as a signal 11a) to an address counter + decoder 4a (hereinafter described as the address counter 4a).
To supply. As a result, the address counter 4a starts operating after the one-chip microcomputer 10 is powered on and reset is released. Reference numeral 12 denotes an initial reset circuit, which has a counter inside the normal initial reset circuit and generates a reset signal having two different reset periods when the power is turned on. The first reset signal 12a is a signal for releasing the reset of the address counter 4a, and is at a LOW level (hereinafter "L") during the period in which the power supply voltage becomes a voltage at which the circuit can operate, and maintains the reset state. This is, for example, “L” while counting about 1024 clocks of the clock generation circuit 11 from the power “ON”, and then becomes HIGH level (hereinafter “H”). This signal can be configured by a reset circuit or a counter using ordinary C and R. The second reset signal 12b changes from "ON" to "L",
After the first reset signal 12a becomes "H", the clock is further counted, for example, 1024, and then "L" to "H".
This signal is used to release reset of internal circuits such as CPU2. This signal can be configured by, for example, a reset circuit using a counter. By generating these two reset signals by such an initial reset circuit 12, the address counter 4a is released from reset and operates before the other circuits in the one-chip microcomputer 10, and operates the addresses 0 to 1023. appear.
During this period, the power supply voltage is EEPROM or I / O.
O The power supply voltage at which the buffer operates is set. At this time, the address counter 4a is sequentially incremented by the clock 11a until the second reset signal 12b becomes "H" after the first reset signal 12a becomes "H", and corresponds to each address value. Read data from each address of EEPROM3 to I / O buffer 7a for option input / output,
Data is sequentially transferred to 7b, ... 7 through the data line 4c.

13は、モード設定用端子8に接続されたモード検出回
路であって、モード設定用端子8に加えられる電圧を検
出してワンチップマイコン10を各種のモード状態に設定
する。ここで、設定できるモードとしては、例えば0V〜
2Vの電圧がこの端子に加えられたときには、通常の動作
モードとなり、2Vを越え、3Vまでの電圧がこの端子に加
えられたときには、バスモニタモードとなる。また、3V
を越え、5Vまでの電圧がこの端子に加えられたときに
は、外部のデータを受けてCPUをコントロールできるテ
ストモードとなり、5Vを越え、7Vまでの電圧がこの端子
に加えられたときには、EEPROM2,3へデータを書込む、E
EPROM書込みモードとなる。
A mode detection circuit 13 is connected to the mode setting terminal 8 and detects the voltage applied to the mode setting terminal 8 to set the one-chip microcomputer 10 in various mode states. Here, as a mode that can be set, for example, 0 V to
When a voltage of 2V is applied to this pin, it is in the normal operation mode, and when a voltage of more than 2V and up to 3V is applied to this pin, it is in the bus monitor mode. Also, 3V
When the voltage exceeding 5V is applied to this pin, it becomes the test mode in which the CPU can be controlled by receiving the external data, and when the voltage exceeding 5V and up to 7V is applied to this pin, EEPROM2,3 Write data to, E
Enters EPROM write mode.

そして、I/Oバッファ5a,5b,・・・,5nは、前記のテス
トモードやEEPROM書込みモード時にタイミングをモニタ
するための出力用になるI/Oバッファであって、I/Oバッ
ファ6a,6b,・・・,6nは、テストモードやEEPROM書込み
モード時にEEPROM2,EEPROM3にプログラムデータや各種
のデータを書込むときのデータ入力端子となるI/Oバッ
ファである。なお、I/Oバッファ7a,7b,・・・,7を含
め、各I/Oバッファにはラッチ回路等のデータを記憶す
る回路が含まれている。
Then, the I / O buffers 5a, 5b, ..., 5n are I / O buffers for output for monitoring the timing in the test mode or the EEPROM write mode, and the I / O buffer 6a, 6b, ..., 6n are I / O buffers that serve as data input terminals when writing program data or various data to EEPROM2 or EEPROM3 in the test mode or EEPROM writing mode. Each I / O buffer including the I / O buffers 7a, 7b, ..., 7 includes a circuit for storing data such as a latch circuit.

バス9は、データバスとアドレスバスとコントロール
バスとで構成されていて、CPU1には、ROMやRAMが内蔵さ
れている。また、20は、各I/Oバッファが接続されてい
る入出力端子である。
The bus 9 is composed of a data bus, an address bus, and a control bus, and the CPU 1 has ROM and RAM built therein. Further, 20 is an input / output terminal to which each I / O buffer is connected.

第2図は、モード検出回路13とI/Oバッファ6a,6b,・
・・,6nとの関係を示すものである。これらの各I/Oバッ
ファは同様な構成であって、これらを代表するものとし
てI/Oバッファ6を示す。I/Oバッファ6は、入力バッフ
ァ回路61と、出力バッファ回路62、ラッチ回路63,64、
2入力のゲート回路65等を有していて、入力バッファ回
路61と出力バッファ回路62、そしてゲート回路65の一方
の入力がそれぞれ入出力端子20に接続されている。
FIG. 2 shows the mode detection circuit 13 and the I / O buffers 6a, 6b ,.
.., 6n is shown. Each of these I / O buffers has the same structure, and the I / O buffer 6 is shown as a representative of them. The I / O buffer 6 includes an input buffer circuit 61, an output buffer circuit 62, latch circuits 63 and 64,
It has a 2-input gate circuit 65 and the like, and one input of the input buffer circuit 61, the output buffer circuit 62, and the gate circuit 65 is connected to the input / output terminal 20, respectively.

ここで、モード検出回路13がEEPROM書込みモードを検
出したときにはその出力端子13aに“H"の信号を発生す
る。この出力は、ゲート回路65の他方の入力に入力され
るとともに、入力バッファ回路61,出力バッファ回路62
のディセーブル信号として供給されて入力バッファ回路
61,出力バッファ回路62の動作を停止させる。このと
き、ゲート回路65は開き、入出力端子20の信号を通過さ
せ、それをEEPROMの書込みデータを記憶するレジスタ4b
の入出力端子20の桁位置に対応する桁位置に供給する。
Here, when the mode detection circuit 13 detects the EEPROM writing mode, it outputs a signal of "H" to its output terminal 13a. This output is input to the other input of the gate circuit 65, and also to the input buffer circuit 61 and the output buffer circuit 62.
Input buffer circuit supplied as a disable signal for
61, stop the operation of the output buffer circuit 62. At this time, the gate circuit 65 is opened to allow the signal of the input / output terminal 20 to pass therethrough and to let it pass through the register 4b for storing the write data of the EEPROM.
Supply to the digit position corresponding to the digit position of the I / O terminal 20 of.

また、モード検出用回路13の入力に3V〜5Vの入力電圧
が加えられCPUを外からコントロールしてコントロール
回路14の内部に設けられた状態レジスタのフラグのうち
EEPROM書込みフラグを“1"にセットする。このフラグが
“1"にされると、I/Oバッファ6a,6b,………,6nを介して
前記のアドレスカウンタ4aの値を外部から設定して次に
I/Oバッファ6a,6b,・・・,6nを介してEEPROM2又は3の
アドレスカウンタ4aが示すアドレスに位置のデータを書
込むことができる。
In addition, an input voltage of 3V to 5V is applied to the input of the mode detection circuit 13 to control the CPU from the outside, and among the flags of the status register provided inside the control circuit 14.
Set the EEPROM write flag to "1". When this flag is set to "1", the value of the address counter 4a is externally set via the I / O buffers 6a, 6b, ...
The position data can be written to the address indicated by the address counter 4a of the EEPROM 2 or 3 via the I / O buffers 6a, 6b, ..., 6n.

また、コントロール回路14はEEPROM2,EEPROM3のどち
らか一方を選択するための状態レジスタを持っている。
Further, the control circuit 14 has a status register for selecting one of the EEPROM2 and the EEPROM3.

そこで、EEPROM2,3にプログラムやデータをロードす
るときには、モード設定用端子8に5Vを越えて7Vまでの
電圧を印加し、その後に外部からEEPROM2,EEPROM3の所
定のアドレスデータを書込む。なお、データ書込みタイ
ミングは、バス9をモニタすることでクロックの発生に
合わせて行われる。
Therefore, when loading a program or data to the EEPROMs 2 and 3, a voltage of more than 5V to 7V is applied to the mode setting terminal 8 and then predetermined address data of the EEPROM 2 and EEPROM 3 is externally written. The data write timing is set in synchronization with the clock generation by monitoring the bus 9.

ここでは、EEPROM2とEEPROM3は、まったく別のアドレ
ス空間に配置されるものとする。このためEEPROM2とEEP
ROM3の選択は、例えばモード検出用回路13に3〜5Vを加
えて外からCPUをコントロールするモードにし、コント
ロール回路14内部に設けられた状態レジスタにEEPROM2,
EEPROM3のどちらを選択するかを設定する。EEPROM2のア
ドレス設定はCPU1から行う。また、EEPROM3は、ここで
は1アドレスに1ビットのデータを記憶するものとす
る。
Here, it is assumed that EEPROM2 and EEPROM3 are located in completely different address spaces. Therefore EEPROM2 and EEP
To select the ROM3, for example, 3 to 5 V is applied to the mode detection circuit 13 to set the mode in which the CPU is controlled from the outside, and the EEPROM2,
Select which of EEPROM3 to select. The address of EEPROM2 is set from CPU1. The EEPROM 3 is assumed to store 1-bit data at 1 address here.

第3図は、アドレスカウンタ4aの出力をアドレスバス
4dを介して受け、データをEEPROM3からデータ線4cを介
して受けるオプション入出力用のI/Oバッファ7a,7b,・
・・7を示している。第2図と同様に各I/Oバッファ
を代表して示したのがI/Oバッファ7である。I/Oバッフ
ァ7は、入力バッファであって、データ線4cに接続され
たラッチ回路71と、アドレスバス4dに接続されたアドレ
スデコーダ72、入力回路73、プルアップ用のトランジス
タ74等とで構成されている。なお、出力バッファの場合
には、入力回路73が出力回路となる。
FIG. 3 shows the output of the address counter 4a on the address bus.
Option I / O buffers 7a, 7b, ... that receive data via 4d and receive data from EEPROM 3 via data line 4c
..7 is shown. Similar to FIG. 2, the I / O buffer 7 is shown as a representative of each I / O buffer. The I / O buffer 7 is an input buffer and includes a latch circuit 71 connected to the data line 4c, an address decoder 72 connected to the address bus 4d, an input circuit 73, a pull-up transistor 74, and the like. Has been done. In the case of an output buffer, the input circuit 73 serves as an output circuit.

この場合にラッチ回路71にデータ“1"あるいは“0"を
セットすることで、“1"のときにはトランジスタ74が
“OFF"して入力回路73がプルアップ抵抗なしの入力回路
となり、“0"のときにはトランジスタ74が“ON"してプ
ルアップ抵抗ありの回路となる。これは、一例であっ
て、このほか、出力回路をオープンドレイン回路とする
か、通常のインバータ回路とするか、あるいはプルアッ
プ回路とするか、さらには、プルダウン回路とするか等
をI/Oバッファの回路構成により自由に設定することが
できる。
In this case, by setting the data “1” or “0” in the latch circuit 71, when it is “1”, the transistor 74 turns “OFF” and the input circuit 73 becomes an input circuit without a pull-up resistor, so that “0” In the case of, the transistor 74 is turned "ON" and the circuit has a pull-up resistor. This is just an example. In addition, whether the output circuit is an open drain circuit, a normal inverter circuit, a pull-up circuit, or a pull-down circuit is I / O. It can be freely set by the circuit configuration of the buffer.

次に、ワンチップマイコン10の全体的な動作について
説明する。
Next, the overall operation of the one-chip microcomputer 10 will be described.

まず、EEPROM3についてのデータ書込み動作から説明
すると、モード設定用端子8に5Vを越えて7Vのまでの電
圧の信号が供給されると、ワンチップマイコン10は、EE
PROM書込みモードとなる。
First, the data write operation for the EEPROM 3 will be described. When a signal with a voltage of more than 5V and up to 7V is supplied to the mode setting terminal 8, the one-chip microcomputer 10 causes the EE
Enter PROM write mode.

このとき、まず、I/Oバッファ6a,6b,・・・,6nを介し
てEEPROM2及び3にデータが書込める。EEPROM3のアドレ
ス空間は、“0"〜“1023"までであるので、そこに各I/O
バッファ7a,7b,・・・,7のラッチ回路71にセットする
データを格納する。この場合、EEPROM3のそれぞれのア
ドレスに格納するデータは、そのアドレス値と各I/Oバ
ッファ7におけるアドレスデコーダ72のデコードアドレ
スとが一致するアドレス位置にそのラッチ回路71がラッ
チすべきデータとして“1"又は“0"が記憶されている。
At this time, first, data can be written in the EEPROMs 2 and 3 via the I / O buffers 6a, 6b, ..., 6n. The address space of EEPROM3 is from "0" to "1023", so each I / O
The data to be set in the latch circuit 71 of the buffers 7a, 7b, ... In this case, the data stored in each address of the EEPROM 3 is "1" as the data to be latched by the latch circuit 71 at the address position where the address value and the decode address of the address decoder 72 in each I / O buffer 7 match. "Or" 0 "is stored.

このようにしてそれぞれのEEPROM2,3にデータが記憶
されたワンチップマイコン10にモード検出回路の入力が
0V〜2Vで通常動作モードになる様に設定され、電源が投
入されて動作状態にされると、リセット回路13が動作す
る。そして、まず、クロックがほぼ“1023"までカウン
トされたタイミングで第1のリセット信号12aが“L"か
ら“H"になり、アドレスカウンタ4aのリセットが解除さ
れる。このときには電源電圧は、回路が動作可能な安定
状態に入っている。
In this way, the input of the mode detection circuit is input to the one-chip microcomputer 10 whose data is stored in each EEPROM 2, 3.
The reset circuit 13 is operated when the normal operation mode is set at 0V to 2V and the power is turned on to bring the operation state. Then, first, at the timing when the clock is counted up to about "1023", the first reset signal 12a changes from "L" to "H", and the reset of the address counter 4a is released. At this time, the power supply voltage is in a stable state in which the circuit can operate.

アドレスカウンタ4aは、このタイミングで“0"からク
ロック発生回路11からのクロック11aに応じてインクリ
メントされていき、各インクリメントされたアドレスに
おいてEEPROM3のアドレスをアクセスし、EEPROM3から読
出したデータを各I/Oバッファ7a,7b,・・・,7に送出
する。各I/Oバッファ7では、そのうち対応するアドレ
スをデコードするアドレスデコーダ72を持つI/Oバッフ
ァがアドレスバス4dから供給されたアドレス信号(アド
レスカウンタ4aの値)をデコードしてそのラッチ回路71
にEEPROM3からのデータをセットしていく。
At this timing, the address counter 4a increments from “0” in accordance with the clock 11a from the clock generation circuit 11, accesses the address of the EEPROM 3 at each incremented address, and reads the data read from the EEPROM 3 into each I / O. , O buffers 7a, 7b, ... In each I / O buffer 7, an I / O buffer having an address decoder 72 for decoding the corresponding address decodes the address signal (value of the address counter 4a) supplied from the address bus 4d and latches it.
Set the data from EEPROM3 to.

このようにして、発生クロックが“1024"から“2048"
(=1024+1024)までのタイミングになると、今度は、
第2のリセット信号12bが“L"から“H"となり、ワンチ
ップマイコン10の内部回路のリセットが解除され、通常
の動作に入る。このときには、各I/Oバッファ7a,7b,・
・・,7のラッチ回路71には、EEPROM3に記憶されたデ
ータに従って“1"あるいは“0"のデータが設定されてい
て、それに接続される入出力端子がオプションに応じた
機能に選択されている。
In this way, the generated clock is from "1024" to "2048".
When it comes to the timing up to (= 1024 + 1024), this time,
The second reset signal 12b changes from "L" to "H", the reset of the internal circuit of the one-chip microcomputer 10 is released, and normal operation starts. At this time, each I / O buffer 7a, 7b, ...
.., 7 data is set to "1" or "0" according to the data stored in the EEPROM3, and the input / output terminal connected to it is selected for the function according to the option. There is.

さて、各I/Oバッファ7a,7b,・・・,7の内容を変更
したいときには、モード設定用端子8に前記した所定の
電圧の信号を加えて、EEPROM書込みモードにしてEEPROM
3のデータを変更すれば容易に他の状態に設定できるこ
とは理解できよう。
Now, when it is desired to change the contents of each I / O buffer 7a, 7b, ..., 7, the above-mentioned predetermined voltage signal is applied to the mode setting terminal 8 and the EEPROM write mode is set.
It can be understood that other states can be easily set by changing the data in 3.

このようにすることにより、アプリケーションプログ
ラムの変更と同時に自由に後からI/Oについてもオプシ
ョン設定ができ、それに対応する入出力端子をオプショ
ンに応じた機能とすることができる。
By doing so, at the same time as changing the application program, it is possible to freely set options for I / O later, and the corresponding input / output terminals can be made to function according to the options.

以上説明してきたが、実施例では、オプション設定用
の入出力端子に接続されたI/Oが複数設けられている
が、これは、1つであってもよい。また、EEPROMとして
アプリケーションプログラムを格納するEEPROMを設けて
いるが、このようなEEPROMが設けられていなくてもよ
い。さらに、この発明は、EEPROMに限定されるものでは
なく、このメモリが外部から書換えできるような不揮発
性メモリとしてワンチップマイコンに設けられていれば
どのようなメモリであってもよい。
As described above, in the embodiment, the plurality of I / Os connected to the input / output terminals for option setting are provided, but the number may be one. Further, although the EEPROM for storing the application program is provided as the EEPROM, such an EEPROM may not be provided. Further, the present invention is not limited to the EEPROM, and any memory may be used as long as the memory is provided in the one-chip microcomputer as a nonvolatile memory that can be rewritten from the outside.

また、実施例では、入出力端子に対するオプション付
加用のEEPROM3を1ビット記憶用のメモリとしている
が、これは、数ビット記憶用であってもよく、さらに、
例えば、8ビットを1アドレスに記憶し、8ビットパラ
レルに8個の各I/Oバッファに転送するようにしてもよ
い。
Further, in the embodiment, the EEPROM 3 for adding an option to the input / output terminal is a memory for storing 1 bit, but this may be for storing several bits.
For example, 8 bits may be stored in one address and transferred in parallel to each of the 8 I / O buffers.

実施例では、EEPROM3がアドレスカウンタ4aの示すア
ドレス空間のうち“0"〜“1023"に配置されているが、
アドレス空間はデコーダ等の回路で容易に変換が可能で
あるので、このEEPROM3がどこの空間に配置されていて
もよいことはもちろんである。さらに、このアドレス空
間の割り当ての数は、I/Oバッファにデータを転送する
数に対応するかそれ以上であればよい。したがって、第
1のイニシャルリセット信号と第2のイニシャルリセッ
ト信号との間の期間はそれに応じて決定されればよい。
In the embodiment, the EEPROM 3 is arranged in "0" to "1023" in the address space indicated by the address counter 4a.
Since the address space can be easily converted by a circuit such as a decoder, it goes without saying that the EEPROM 3 may be arranged in any space. Furthermore, the number of allocations of this address space may correspond to the number of data transferred to the I / O buffer or more. Therefore, the period between the first initial reset signal and the second initial reset signal may be determined accordingly.

[発明の効果] 以上の説明から理解できるように、この発明にあって
は、イニシャルリセット回路に期間の相違する第1及び
第2のイニシャルリセット信号を発生させ、第1のリセ
ット信号12aと第2のリセット信号12bとの間に端子を介
して電気信号により書込がみできる不揮発性メモリ、例
えば、EEPROMのアクセス回路を動作させてEEPROMに記憶
したデータをI/Oに転送するようにしているので、EEPRO
Mのデータをあらかじめ外部から書込み、変更しておけ
ば、I/Oに記憶されるデータを容易に変更することがで
きる。
[Effects of the Invention] As can be understood from the above description, in the present invention, the first reset signal 12a and the first reset signal 12a are generated by causing the initial reset circuit to generate the first and second initial reset signals having different periods. A non-volatile memory which can be written by an electric signal through a terminal between the reset signal 12b and the second reset signal 12b, for example, an access circuit of the EEPROM is operated to transfer the data stored in the EEPROM to the I / O. So EEPRO
If the M data is externally written and changed beforehand, the data stored in the I / O can be easily changed.

その結果、I/Oにオプションがあるときには、後から
自由にそのオプションに応じた設定ができる。
As a result, when I / O has an option, it can be freely set later according to the option.

これによりワンチップマイコンを開発したり、後から
用途に応じて入出力端子機能を変更するような場合には
自由にかつ効率よくI/O端子の内容変更をすることが可
能になり、外部回路の修正や開発や外付けをすることな
しにワンチップマイコンを使用することができる。した
がって、ワンチップマイコンのアプリケーションの開発
期間を短くでき、また、用途変更の自由度を増加させる
ことができる。
This makes it possible to freely and efficiently change the contents of the I / O pin when developing a one-chip microcomputer or changing the input / output pin function according to the application later. The one-chip microcomputer can be used without modification, development, or external installation. Therefore, the development period of the application of the one-chip microcomputer can be shortened, and the degree of freedom in changing the application can be increased.

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

第1図は、この発明のワンチップマイコンの一実施例の
ブロック図、第2図は、オプション用EEPROMとI/Oバッ
ファとの関係を示す説明図、第3図は、オプション用入
出力端子のI/Oバッファの内部構成の説明図である。 1……CPU、2……プリケーションプログラム記憶用EEP
ROM、3……オプション機能付加用のEEPROM、4a……ア
ドレスカウンタ、 4b……書込みデータを記憶するレジスタ、 4c……データ線、4d……アドレスバス、 5a,5b,5n,6a,6b,6m,7a,7b,7……I/Oバッファ、8……
モード設定用端子、9……バス、10……ワンチップマイ
コン、14……コントロール回路(EEPROMをコントロール
する回路)。
FIG. 1 is a block diagram of an embodiment of a one-chip microcomputer of the present invention, FIG. 2 is an explanatory diagram showing the relationship between an option EEPROM and an I / O buffer, and FIG. 3 is an option input / output terminal. 3 is an explanatory diagram of an internal configuration of the I / O buffer of FIG. 1 ... CPU, 2 ... EEP for storing application program
ROM, 3 ... EEPROM for adding optional functions, 4a ... address counter, 4b ... register for storing write data, 4c ... data line, 4d ... address bus, 5a, 5b, 5n, 6a, 6b, 6m, 7a, 7b, 7 …… I / O buffer, 8 ……
Mode setting terminal, 9 ... Bus, 10 ... One-chip microcomputer, 14 ... Control circuit (circuit that controls EEPROM).

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭60−103424(JP,A) 特開 平1−149158(JP,A) 特開 平1−154212(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (56) Reference JP-A-60-103424 (JP, A) JP-A-1-149158 (JP, A) JP-A-1-154212 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】外部から書換可能な不揮発性メモリとCPU
とを内蔵したワンチップマイクロコンピュータにおい
て、前記不揮発性メモリは、端子から入力される電気信
号により書換え可能なメモリであって、リセット期間が
短い第1の期間を有する第1イニシャルリセット信号と
これよりリセット期間が長い第2の期間を有する第2の
イニシャルリセット信号とを発生するイニシャルリセッ
ト回路と、前記不揮発性メモリのアドレスをアクセスす
る信号を送出するアドレスカウンタと、特定のデータが
セットされる記憶回路を有しこの記憶回路に記憶された
データに応じて動作するI/Oバッファとを備え、前記第
1の期間は、前記不揮発性メモリと前記アドレスカウン
タと前記記憶回路とが動作可能になるまでの期間であ
り、前記第2の期間は、前記不揮発性メモリと前記アド
レスカウンタと前記記憶回路以外の前記CPUを含めた内
部回路が動作可能になる期間であって、前記記憶回路に
転送するデータが前記不揮発性メモリに前記端子を介し
て電気信号として書込まれ、前記アドレスカウンタが前
記イニシャルリセット回路から前記第1のイニシャルリ
セット信号を受けてリセットが解除された前記第1の期
間終了から前記第2の期間の終了までの間に前記アドレ
スカウンタのカウント値を順次更新してこのアドレスカ
ウンタのカウント値に応じてアクセスされる前記不揮発
性メモリに記憶されたデータを前記記憶回路に転送して
記憶し、前記CPUを含めた内部回路が前記イニシャルリ
セット回路から前記第2のイニシャルリセット信号を受
けてリセットが解除された前記第2の期間の終了後に前
記CPUを含めた内部回路を動作させることを特徴とする
ワンチップマイクロコンピュータ。
1. An externally rewritable non-volatile memory and a CPU
In the one-chip microcomputer incorporating the above, the non-volatile memory is a memory that is rewritable by an electric signal input from a terminal, and a first initial reset signal having a first period with a short reset period and An initial reset circuit for generating a second initial reset signal having a second period having a long reset period, an address counter for transmitting a signal for accessing an address of the nonvolatile memory, and a memory in which specific data is set. An I / O buffer having a circuit and operating in accordance with data stored in the memory circuit, wherein the nonvolatile memory, the address counter, and the memory circuit are operable during the first period. Up to the non-volatile memory, the address counter, and the memory during the second period. In a period during which an internal circuit including the CPU other than the path becomes operable, data to be transferred to the storage circuit is written as an electric signal in the nonvolatile memory via the terminal, and the address counter is The count value of the address counter is sequentially updated from the end of the first period when the reset is released by receiving the first initial reset signal from the initial reset circuit to the end of the second period, and this address is updated. Data stored in the non-volatile memory, which is accessed according to the count value of the counter, is transferred to the storage circuit and stored therein, and an internal circuit including the CPU outputs the second initial reset signal from the initial reset circuit. In response to this, the internal circuit including the CPU is operated after the end of the second period when the reset is released. One-chip microcomputer.
JP2137953A 1990-05-28 1990-05-28 One-chip microcomputer Expired - Lifetime JPH087742B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2137953A JPH087742B2 (en) 1990-05-28 1990-05-28 One-chip microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2137953A JPH087742B2 (en) 1990-05-28 1990-05-28 One-chip microcomputer

Publications (2)

Publication Number Publication Date
JPH0431981A JPH0431981A (en) 1992-02-04
JPH087742B2 true JPH087742B2 (en) 1996-01-29

Family

ID=15210576

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2137953A Expired - Lifetime JPH087742B2 (en) 1990-05-28 1990-05-28 One-chip microcomputer

Country Status (1)

Country Link
JP (1) JPH087742B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3355879B2 (en) * 1995-08-01 2002-12-09 株式会社デンソー Control circuit
KR100397571B1 (en) * 2000-09-09 2003-09-13 주식회사 3지테크놀러지 Opening and closing apparatus of a casement window
KR100389805B1 (en) * 2000-12-22 2003-06-27 주식회사 3지테크놀러지 Opening and closing apparatus of a casement window
US6772360B2 (en) 2001-02-07 2004-08-03 Emulex Design & Manufacturing Corporation Extension signal generator coupled to an extension timer and an extension register to generate an initialization extension signal
WO2005101167A1 (en) * 2004-03-31 2005-10-27 Matsushita Electric Industrial Co., Ltd. Information processing device and information processing device setting method
JP2005309767A (en) 2004-04-21 2005-11-04 Sony Ericsson Mobilecommunications Japan Inc Power controller, electronic equipment, and mobile telephone terminal
JP2006155004A (en) * 2004-11-26 2006-06-15 Oki Electric Ind Co Ltd Logic device, logic system, and data read-out control method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60103424A (en) * 1983-11-11 1985-06-07 Oki Electric Ind Co Ltd Initial setting system
JPH01149158A (en) * 1987-12-04 1989-06-12 Mitsubishi Electric Corp Semiconductor integrated circuit

Also Published As

Publication number Publication date
JPH0431981A (en) 1992-02-04

Similar Documents

Publication Publication Date Title
KR100375217B1 (en) Microcontroller incorporating an electrically rewritable non-volatile memory
US5233613A (en) Reliable watchdog timer
US5263168A (en) Circuitry for automatically entering and terminating an initialization mode in a data processing system in response to a control signal
US4694393A (en) Peripheral unit for a microprocessor system
US5396639A (en) One chip microcomputer having programmable I/O terminals programmed according to data stored in nonvolatile memory
US4947478A (en) Switching control system for multipersonality computer system
JPH087742B2 (en) One-chip microcomputer
US5051890A (en) Program/data memory employed in microcomputer system
US5767694A (en) Information processing apparatus with a mode setting circuit
JPH03204053A (en) Read-only memory
US7191323B2 (en) Information processing unit selecting one of reset vector addresses
JPH0944467A (en) Microcomputer
JPH07182170A (en) Microprocessor
EP0497443B1 (en) Static ram based microcontroller
JPH1069336A (en) Integrated circuit
JP3152595B2 (en) Microcomputer interrupt handling device
EP0714060B1 (en) One chip microcomputer with built-in non-volatile memory
JPH05101201A (en) Option setting circuit
JPS623458B2 (en)
JP2575436B2 (en) Semiconductor integrated circuit with built-in flip-flop circuit
US6154820A (en) Arrangement for storing program instructions and data in a memory device and method therefor
JPS6346460B2 (en)
JPH1011316A (en) Single-chip microcomputer and its test
KR100212264B1 (en) Rom data test circuit
JPH06176175A (en) Option setting circuit and electronic equipment