JPH03224018A - Clock switching circuit for microcomputer - Google Patents

Clock switching circuit for microcomputer

Info

Publication number
JPH03224018A
JPH03224018A JP2019567A JP1956790A JPH03224018A JP H03224018 A JPH03224018 A JP H03224018A JP 2019567 A JP2019567 A JP 2019567A JP 1956790 A JP1956790 A JP 1956790A JP H03224018 A JPH03224018 A JP H03224018A
Authority
JP
Japan
Prior art keywords
microcomputer
input
output
circuit
reset
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
JP2019567A
Other languages
Japanese (ja)
Inventor
Nobuhiro Arai
信宏 荒井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2019567A priority Critical patent/JPH03224018A/en
Publication of JPH03224018A publication Critical patent/JPH03224018A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain universal applicability of a microcomputer by outputting selectively the oscillation clocks via a switch circuit according to the reset output of a reset circuit and the input state of an input/output port when the microcomputer is reset. CONSTITUTION:A microcomputer 2 works with the switching output of the oscillation clock of an oscillation circuit 1. When this microcomputer 2 is reset, an input/output port 6 is pulled up or down so that the oscillation clocks are selectively outputted outputted via an OR gate 13. Thus it is just required to externally connect an input state setting means to the port 6 in order to selectively output the oscillation clocks that actuate the microcomputer 2. Then the mask change is omitted for the chip of the microcomputer. In such a constitution, a general-purpose microcomputer is obtained.

Description

【発明の詳細な説明】 (イ)産業上の利用分野 本発明は、マイクロコンピュータのクロック切り換え回
路に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (a) Field of Industrial Application The present invention relates to a clock switching circuit for a microcomputer.

(ロ)従来の技術 マイクロコンピュータは、水晶振動子、セラミック振動
子等を含んで成る発振回路の発振クロックから作成され
るシステムクロックに基づいて動作する。近年、マイク
ロコンピュータの汎用化に伴い、マイクロコンピュータ
には、発振回路の発振クロックと該発振クロックを分周
した分周クロックとのオプション切り換え出力に基づい
て動作するものがある。ここで、発振クロックと分周ク
ロックとを切り換え出力するには、プログラム処理によ
って切り換える方法と、マスク処理によって切り換える
方法とがあるが、前者の場合、マイクロコンピュータが
動作中の為、両クロックの切り換え時にノイズが生じて
該マイクロコンピュータが暴走してしまう恐れがある。
(b) Prior Art Microcomputers operate based on a system clock generated from an oscillation clock of an oscillation circuit including a crystal resonator, a ceramic resonator, and the like. In recent years, as microcomputers have become more general-purpose, some microcomputers operate based on an optional switching output between an oscillation clock of an oscillation circuit and a frequency-divided clock obtained by dividing the oscillation clock. Here, to switch and output the oscillation clock and the divided clock, there are two methods: switching by program processing and switching by mask processing, but in the former case, since the microcomputer is operating, both clocks cannot be switched. At times, noise may occur and the microcomputer may run out of control.

そこで、従来は、両クロックの切り換え出力部分をマス
クパターンで形成していた。
Therefore, in the past, the switching output portions of both clocks were formed by a mask pattern.

(ハ)発明が解決しようとする課題 しかしながら、前記従来の技術の場合、マイクロコンピ
ュータのチップを作成する過程で、発振クロック又は分
周クロックの選択に応じてマスクパターンを変更しなけ
ればならず、汎用化には不向きとなる問題点があった。
(c) Problems to be Solved by the Invention However, in the case of the above-mentioned conventional technology, the mask pattern must be changed depending on the selection of the oscillation clock or the divided clock in the process of manufacturing the microcomputer chip. There were problems that made it unsuitable for general use.

(ニ)課題を解決するための手段 本発明は、前記問題点を解決する為になされたものであ
り、発振回路の発振クロック又は該発振クロックを分周
した分周クロックの何れかの切り換え出力に基づいて動
作するマイクロコンピュータにおいて、マイクロコンピ
ュータをリセットするリセット回路と、前記リセット回
路のリセット解除出力に基づいて出力ポートとして使用
され、且つ、前記リセット回路のりセント出力に基づい
て入力ポートとして使用され、所定の周辺回路の高イン
ピーダンスの入力と接続さt′Lる入出力ポートと、前
記リセット回路のりセント出力によって、前記入出力ポ
ートの入力状態を記憶保持する記憶保持回路と、前記記
憶保持回路の出力によって、前記発振クロック又は前記
分周クロックの何れかを切り換え出力する切り換え回路
と、を備え、マイクロコンピュータのリセット時、前記
入出力ポートの入力状態に応じて前記発振クロック又は
前記分周クロックの切り換えを行うことを特徴とする。
(d) Means for Solving the Problems The present invention has been made to solve the above problems, and provides a switching output of either the oscillation clock of the oscillation circuit or the divided clock obtained by dividing the oscillation clock. In a microcomputer that operates based on the above, the microcomputer includes a reset circuit that resets the microcomputer, and is used as an output port based on the reset release output of the reset circuit, and is used as an input port based on the reset output of the reset circuit. , an input/output port connected to a high impedance input of a predetermined peripheral circuit, a memory holding circuit that stores and holds the input state of the input/output port by a positive output of the reset circuit, and the memory holding circuit. a switching circuit that switches and outputs either the oscillation clock or the frequency-divided clock according to the output of the microcomputer; It is characterized in that it performs switching.

(ホ)作用 本発明によれば、マイクロコンピュータのりセント時、
リセット回路のリセット出力と入出力ポートの入力状態
によって、発振クロック又は分周クロックの何れかが切
り換え回路から選択出力される。これより、マイクロコ
ンピュータは、選択出力に基づいて動作することになる
(E) Effect According to the present invention, when a microcomputer is inserted,
Depending on the reset output of the reset circuit and the input state of the input/output port, either the oscillation clock or the divided clock is selectively output from the switching circuit. From this, the microcomputer will operate based on the selected output.

(へ)実施例 本発明の詳細を図面に従って具体的に説明する。(f) Example The details of the present invention will be specifically explained with reference to the drawings.

図面は、本発明の一実施例を示す回路図である。The drawing is a circuit diagram showing one embodiment of the present invention.

図面において、発振回路(1)は、水晶振動子、セラミ
ック振動子等の発振振動子を含んで成り、所定周波数(
例えば数MH2)の発振クロックを出力し、該発振クロ
ックはマイクロコンピュータ(2)に取り込まれる。T
型フリップ70ツブ(3)のT(トリガ)端子には発振
クロックが反転印加され、Q(出力)端子からは発振ク
ロックの立下がりに同期した1/2分周出力(分周クロ
ック)が出力さ!しる。リセット回路(4)は、マイク
ロコンピュータをリセットする時に「1」となるリセッ
ト信号を出力し、リセット回路(4)の出力は、バッフ
ァ(5)の制御入力に印加される。入出力ポート(6)
は、高インピーダンスの入力を有する所定の周辺回路と
接続される。ここで、マイクロコンピュータ(2)のリ
セット時、リセット回路(4)からは71 Jのリセッ
ト信号が出力される為、バッファ(5)は動作せず、入
出力ポート(6)は入力ポートとして使用される。また
、マイクロコンピュータ(2)の動作時、リセット回路
(1)からは「O」のノセット解除信号が出力される為
、バッファ(5)は動作し、入出力ポート(6)は出力
ポートとして使用されることになる。プルダウン抵抗(
14)は、入出力ポート(6)と前記周辺回路の入力と
の間に設けられ、マイクロコンピュータ(2)のりセン
ト時、入出力ポート(6)の入力状態をローレベル(論
理「0」)に設定する。ここで、プルダウン抵抗(14
)の抵抗値は、前記周辺回路の入力に影響を与えない値
に設定されている。尚、図示していないが、プルダウン
抵抗(14)に代わって電源VDDにプルアップされる
プルアップ抵抗を、入出力ポート(6)と前記周辺回路
の入力との間に設けてもよく、この場合、前記プルアッ
プ抵抗は、入出力ポート(6)の入力状態をハイレベル
(論理「1.)に設定する。ここで、前記プルアンプ抵
抗の抵抗値も、前記周辺回路の入力に影響を与えない値
に設定されることになる。ANDゲート(7)(8)の
−方の入力には、リセット回路(4)の出力が共通印加
され、他方の入力には、各々入出力ポート(6)への入
力がバッファ(9)を介して印加及び反転印加される。
In the drawing, an oscillation circuit (1) includes an oscillation resonator such as a crystal resonator or a ceramic resonator, and has a predetermined frequency (
For example, an oscillation clock of several MH2) is output, and the oscillation clock is taken into the microcomputer (2). T
An inverted oscillation clock is applied to the T (trigger) terminal of the type flip 70 tube (3), and a 1/2 frequency divided output (divided clock) synchronized with the falling edge of the oscillation clock is output from the Q (output) terminal. difference! Sign. The reset circuit (4) outputs a reset signal that becomes "1" when resetting the microcomputer, and the output of the reset circuit (4) is applied to the control input of the buffer (5). Input/output port (6)
is connected to a given peripheral circuit having a high impedance input. Here, when the microcomputer (2) is reset, a 71 J reset signal is output from the reset circuit (4), so the buffer (5) does not operate and the input/output port (6) is used as an input port. be done. Also, when the microcomputer (2) is operating, the reset circuit (1) outputs a no-set release signal of "O", so the buffer (5) operates and the input/output port (6) is used as an output port. will be done. Pull-down resistor (
14) is provided between the input/output port (6) and the input of the peripheral circuit, and sets the input state of the input/output port (6) to a low level (logic "0") when the microcomputer (2) is connected. Set to . Here, the pull-down resistor (14
) is set to a value that does not affect the input of the peripheral circuit. Although not shown, a pull-up resistor that is pulled up to the power supply VDD instead of the pull-down resistor (14) may be provided between the input/output port (6) and the input of the peripheral circuit. In this case, the pull-up resistor sets the input state of the input/output port (6) to a high level (logic "1.").Here, the resistance value of the pull-amp resistor also affects the input of the peripheral circuit. The output of the reset circuit (4) is commonly applied to the negative inputs of the AND gates (7) and (8), and the output of the reset circuit (4) is applied to the other input of each input/output port (6). ) is applied and inverted via a buffer (9).

即ち、マイクロコンピュータ(2)のリセット時、AN
Dゲート(7)(8)の一方の入力には「1」のり七ノ
ド信号が印加される為、ANDゲート(7)からは入出
力ポート(6)への入力がそのまま出力され、ANDゲ
ート(8)からは入出力ポート(6)への入力が反転出
力される。R8型フッノブフロップ(10)のS(セッ
ト)端子には、ANDゲート(7)の出力が印加され、
R(リセット)端子には、ANDゲート(8)の出力が
印加される。
That is, when the microcomputer (2) is reset, the AN
Since a "1" signal is applied to one input of the D gates (7) and (8), the input to the input/output port (6) is output as is from the AND gate (7), and the AND gate From (8), the input to the input/output port (6) is inverted and output. The output of the AND gate (7) is applied to the S (set) terminal of the R8 type Futnobu flop (10),
The output of the AND gate (8) is applied to the R (reset) terminal.

即ち、マイクロコンピュータ(2)がリセットされ、且
つ、入出力ポート(6)への入力がハイレベルの時、R
5型フリップ70ツブ(10)はセットされ、また、マ
イクロコンピュータ(2)がリセットされ、且つ、入出
力ポート(6)への入力がローレベルの時、R5型フリ
ップ70ツブ(10)はリセットされる。ANDゲート
(11)(12)及びORゲート(13)は切り換え回
路を構成する。ここで、ANDゲート(11)(12)
の一方の入力には、各々発振クロック及び分周クロック
が印加され、他方の入力には、各々R5型フリンプフロ
ノプ(10)のQ(出力)端子の出力が印加及び反転印
加される。即ち、R5型フリシブフロップ(10)がセ
ットされた時、ORゲー) (13)から発振クロック
が切り換え出力され、また、R5型フリップフロップ(
10)がノセントさ!tた時、ORゲート(13)から
分周クロlりが切り換え出力される。
That is, when the microcomputer (2) is reset and the input to the input/output port (6) is at high level, R
When the type 5 flip 70 knob (10) is set and the microcomputer (2) is reset and the input to the input/output port (6) is at low level, the R5 type flip 70 knob (10) is reset. be done. AND gates (11) (12) and OR gate (13) constitute a switching circuit. Here, AND gate (11) (12)
An oscillation clock and a frequency-divided clock are applied to one input of , and the output of the Q (output) terminal of the R5 type flimp frontop (10) is applied and inverted, respectively, to the other input. That is, when the R5 type flip-flop (10) is set, the oscillation clock is switched and output from the OR game (13), and the R5 type flip-flop (13) is switched and output.
10) is nocent! At time t, the OR gate (13) switches and outputs the divided clock signal.

以上より、マイクロコンピュータ(2)のリセット時、
入出力ポート(6)をプルアスプ又はプルダウンするの
みで、発振クロック又は分周クロックがORゲート(1
3)から切り換え出力されることになる。また、マイク
ロコンピュータ(2)の動作時、ORゲート(13)か
ら出力される発振クロック又は分周クロックの何れか一
方からマイクロコンピュータ(2)動作用のシステムク
ロックが作成され、処理データSが入出力ポート(6)
から出力されることになる。
From the above, when resetting the microcomputer (2),
By simply pulling up or pulling down the input/output port (6), the oscillation clock or divided clock can be set to the OR gate (1
3) will be switched and output. Furthermore, when the microcomputer (2) operates, a system clock for operating the microcomputer (2) is created from either the oscillation clock or the divided clock output from the OR gate (13), and the processing data S is input. Output port (6)
will be output from.

従って、マイクロコンピュータ(2)を動作させるため
の発振クロック又は分周クロックの切り換えを行うには
、入出力ポート(6)にプルアップ抵抗又はプルダウン
抵抗を外部接続すればよい為、マイクロコンピュータ(
2)のチップのマスク変更が不要となり(マスクが共通
でよく)、汎用性のあるマイクロコンピュータを提供で
きることになる。更に、マイクロコンピュータ(2)の
ユーザー自身が発振クロック又は分周クロックを自由に
切り換え出力できる為、使用性の良好なマイクロコンピ
ュータを提供できることになる。
Therefore, in order to switch the oscillation clock or divided clock for operating the microcomputer (2), it is only necessary to externally connect a pull-up resistor or pull-down resistor to the input/output port (6).
2) There is no need to change the mask of the chip (a common mask may be used), and a versatile microcomputer can be provided. Furthermore, since the user of the microcomputer (2) can freely switch and output the oscillation clock or the divided clock, it is possible to provide a microcomputer with good usability.

(ト)発明の効果 本発明によれば、マイクロコンピュータを動作させるた
めの発振クロック又は該発振クロックを分周した分周ク
ロックを切り換え出力するには、入出力ポートに入力状
態設定手段を外部接続するのみでよい為、マイクロコン
ピュータのチップのマスク変更が不要となって、汎用性
のあるマイクロコンピュータの提供が可能となり、更に
、マイクロコンピュータのユーザー自身が発振クロック
又は分周クロックを自由に切り換え出力できる為、使用
性の良好なマイクロコンピュータの提供ら可能となる等
の利点が得られる。
(g) Effects of the Invention According to the present invention, in order to switch and output an oscillation clock for operating a microcomputer or a divided clock obtained by dividing the oscillation clock, an input state setting means is externally connected to an input/output port. This eliminates the need to change the mask of the microcomputer chip, making it possible to provide a versatile microcomputer.Furthermore, the microcomputer user can freely switch the oscillation clock or divided clock for output. Therefore, advantages such as being able to provide a microcomputer with good usability can be obtained.

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

図面は、本発明の一実施例を示す回路図である。 (1)・ 発振回路、(2)・・マイクロコンピュータ
、(4)  リセット回路、(6)・・・入出力ポート
、(10)−RS型フリップ70ツブ、(11)(12
)・・−ANDゲート、(13)−ORゲート、(14
)・・・プルダウン抵抗。
The drawing is a circuit diagram showing one embodiment of the present invention. (1) Oscillation circuit, (2) Microcomputer, (4) Reset circuit, (6) Input/output port, (10) -RS type flip 70 tube, (11) (12
)...-AND gate, (13)-OR gate, (14
)...Pull-down resistance.

Claims (3)

【特許請求の範囲】[Claims] (1)発振回路の発振クロック又は該発振クロックを分
周した分周クロックの何れかの切り換え出力に基づいて
動作するマイクロコンピュータにおいて、 マイクロコンピュータをリセットするリセット回路と、 前記リセット回路のリセット解除出力に基づいて出力ポ
ートとして使用され、且つ、前記リセット回路のリセッ
ト出力に基づいて入力ポートとして使用され、所定の周
辺回路の高インピーダンスの入力と接続される入出力ポ
ートと、 前記リセット回路のリセット出力によって、前記入出力
ポートの入力状態を記憶保持する記憶保持回路と、 前記記憶保持回路の出力によって、前記発振クロック又
は前記分周クロックの何れかを切り換え出力する切り換
え回路と、を備え、 マイクロコンピュータのリセット時、前記入出力ポート
の入力状態に応じて前記発振クロック又は前記分周クロ
ックの切り換えを行うことを特徴とするマイクロコンピ
ュータのクロック切り換え回路。
(1) In a microcomputer that operates based on the switching output of either an oscillation clock of an oscillation circuit or a frequency-divided clock obtained by dividing the oscillation clock, the microcomputer includes a reset circuit that resets the microcomputer, and a reset release output of the reset circuit. an input/output port that is used as an output port based on the reset output of the reset circuit, is used as an input port based on the reset output of the reset circuit, and is connected to a high impedance input of a predetermined peripheral circuit; A microcomputer, comprising: a memory holding circuit that stores and holds the input state of the input/output port; and a switching circuit that switches and outputs either the oscillation clock or the divided clock according to the output of the memory holding circuit. 1. A clock switching circuit for a microcomputer, characterized in that when resetting the microcomputer, the oscillation clock or the divided clock is switched depending on the input state of the input/output port.
(2)入出力ポートの入力状態を設定するための入力状
態設定手段を、前記入出力ポートに外部接続して成るこ
とを特徴とする請求項(1)記載のマイクロコンピュー
タのクロック切り換え回路。
(2) A clock switching circuit for a microcomputer according to claim (1), characterized in that an input state setting means for setting the input state of the input/output port is externally connected to the input/output port.
(3)入力状態設定手段は、周辺回路の入力に影響を与
えない抵抗値を有するプルアップ抵抗又はプルダウン抵
抗であることを特徴とする請求項(2)記載のマイクロ
コンピュータのクロック切り換え回路。
(3) The clock switching circuit for a microcomputer according to claim (2), wherein the input state setting means is a pull-up resistor or a pull-down resistor having a resistance value that does not affect inputs of peripheral circuits.
JP2019567A 1990-01-30 1990-01-30 Clock switching circuit for microcomputer Pending JPH03224018A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019567A JPH03224018A (en) 1990-01-30 1990-01-30 Clock switching circuit for microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019567A JPH03224018A (en) 1990-01-30 1990-01-30 Clock switching circuit for microcomputer

Publications (1)

Publication Number Publication Date
JPH03224018A true JPH03224018A (en) 1991-10-03

Family

ID=12002872

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019567A Pending JPH03224018A (en) 1990-01-30 1990-01-30 Clock switching circuit for microcomputer

Country Status (1)

Country Link
JP (1) JPH03224018A (en)

Similar Documents

Publication Publication Date Title
JPS61191973A (en) Semiconductor integrated circuit with testing circuit
JPH03224018A (en) Clock switching circuit for microcomputer
US4073131A (en) Time-setting and displaying mode control circuit for an electronic timepiece
JPH0362611A (en) Clock generating circuit
JPH02130020A (en) Delay circuit
JP2953713B2 (en) Semiconductor integrated circuit
JP2524404B2 (en) Shift register
JPH0315776A (en) Mode setting circuit
JPH0369212A (en) Programmable counter circuit
JPS5912635A (en) Variable frequency divider
JPH0433117A (en) Watchdog timer circuit
JP2664109B2 (en) Real-time port
JPH0522085A (en) Edge Triggered Flip Flop
JPH01208909A (en) Timer device
JPH0191528A (en) High speed prescaler circuit
JPS6213851B2 (en)
JPS59229923A (en) Logic circuits for integrated circuits
JPH06196985A (en) Pulse width extending circuit
JPS6144415B2 (en)
JPS6187426A (en) flip flop
JPH02109414A (en) Semiconductor integrated circuit filter and its manufacture
JPH08125510A (en) Signal delay circuit
JPH04169878A (en) Test circuit of digital integrated circuit
JPH02268358A (en) Microcomputer
JPH02145011A (en) Waveform shaping circuit