JPH04207238A - Clock switching circuit - Google Patents

Clock switching circuit

Info

Publication number
JPH04207238A
JPH04207238A JP2291421A JP29142190A JPH04207238A JP H04207238 A JPH04207238 A JP H04207238A JP 2291421 A JP2291421 A JP 2291421A JP 29142190 A JP29142190 A JP 29142190A JP H04207238 A JPH04207238 A JP H04207238A
Authority
JP
Japan
Prior art keywords
clock
output
frequency
reset
circuit
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
JP2291421A
Other languages
Japanese (ja)
Inventor
Hidetoshi Kanbe
英利 神戸
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2291421A priority Critical patent/JPH04207238A/en
Publication of JPH04207238A publication Critical patent/JPH04207238A/en
Pending legal-status Critical Current

Links

Landscapes

  • Synchronisation In Digital Transmission Systems (AREA)
  • Dram (AREA)

Abstract

PURPOSE:To prevent the malfunction for clock switching and to improve the operability by providing a frequency comparing circuit and automatically discriminating frequencies of a reference clock and a clock input to perform switching. CONSTITUTION:When a frequency f1 of the reference clock is lower than a frequency f2 of the clock input, a frequency comparing circuit 6 outputs the high level. When a reset input is asserted, a timer 4 is reset and outputs OUT1 and OUT2 go to the low level. An FF circuit 5 is reset by the output OUT1, and a selector 2 selects the clock input side. When the reset input is negated, the timer 4 starts counting, and the output of the comparator 6 is latched in the circuit 5 at the timing of the output OUT1. The selector selects the clock input side by the output of the circuit 5. When the frequency f1 is higher than the frequency f2, the circuit 6 outputs the low level to select the reference clock side. Thus, clocks are automatically switched to prevent the malfunction.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、システム毎に組み合わされるクロックが異
なる場合にクロックを選択して使用するためのクロック
切替回路に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a clock switching circuit for selecting and using a clock when the clocks combined for each system are different.

(従来の技術〕 第2図は従来のクロック切替回路の回路図であり、図に
おいて、(1)は切替スイッチ、(2)は基準クロック
とクロック入力が入力され、上記切替スイッチ(1)に
よる切替信号に基ついていずれかを選択するセレクタ、
(3)は上記セレクタ(2)のセレクト端子に接続され
たプルアップ抵抗である。
(Prior Art) Fig. 2 is a circuit diagram of a conventional clock switching circuit. In the figure, (1) is a changeover switch, (2) is a reference clock and a clock input, and a selector for selecting one based on the switching signal;
(3) is a pull-up resistor connected to the select terminal of the selector (2).

次に動作について説明する。切替スイッチ(1)をオフ
すると、セレクタ(2)のセレクト端子はプルアップ抵
抗(3)によってハイレベルとなる。これにより、セレ
クタ(2)はB入力端のクロック入力を選択し出力Yに
クロック出力する。
Next, the operation will be explained. When the selector switch (1) is turned off, the select terminal of the selector (2) is brought to a high level by the pull-up resistor (3). As a result, the selector (2) selects the clock input at the B input terminal and outputs the clock to the output Y.

他方、切替スイッチ(1)をオンすると、セレクタ(2
)のセレクト端子はロウレベルとなり、セレクタ(2)
はA入力側の基準クロックを選択し出力Yにクロック出
力する。
On the other hand, when the changeover switch (1) is turned on, the selector (2
) select terminal becomes low level, selector (2)
selects the reference clock on the A input side and outputs the clock to output Y.

〔発明が解決しようとする課題) 従来のクロック切替回路は以上のように構成されている
ので、クロック入力と基準クロックのどちらか速い方も
しくは遅い方をクロック出力に出力したい場合、クロッ
ク入力と基準クロックの周波数を比較して人手で切り替
える必要かあり、切替の際に、クロック出力に出るノイ
ズによる誤動作を避けるために、切替後クロック出力を
使用している回路をリセットするか、電源かオフされて
いる間にスイッチを切り替えてから電源をオンする必要
かあるなどの問題かあフた。
[Problem to be Solved by the Invention] Since the conventional clock switching circuit is configured as described above, when it is desired to output either the clock input or the reference clock, whichever is faster or slower, as the clock output, it is necessary to switch between the clock input and the reference clock. It is necessary to compare the clock frequencies and switch manually.When switching, in order to avoid malfunctions due to noise that appears on the clock output, it is necessary to reset the circuit using the clock output or turn off the power. Is there a problem such as whether it is necessary to turn on the power after switching the switch while it is running?

また、特開昭60−105937号及び特開昭61−1
05938号公報には、フリップフロップ、選択回路及
びタイマ等の回路構成によってクロックを選択する技術
が開示されているが、クロックの周波数を比較して例え
ば一番早い(または遅い)クロックを選択するようなこ
とはなされていない。
Also, JP-A-60-105937 and JP-A-61-1
Publication No. 05938 discloses a technique for selecting a clock by using a circuit configuration such as a flip-flop, a selection circuit, and a timer. Nothing has been done.

この発明は上記のような問題点を解消するためになされ
たもので、基準クロックとクロック入力の周波数を自動
的に判定してクロック出力に出力できるとともに、切替
時の誤操作防止と操作性向上、誤動作を防止するクロッ
ク切替回路を得ることを目的とする。
This invention was made to solve the above-mentioned problems, and it is possible to automatically determine the frequency of the reference clock and clock input and output it to the clock output, and also prevents erroneous operation when switching, improves operability, The purpose of this invention is to obtain a clock switching circuit that prevents malfunction.

(課題を解決するための手段〕 この発明に係るクロック切替回路は、基準クロックと他
のクロックの周波数を比較する周波数比較回路と、リセ
ット信号を入力して起動するタイマと、周波数比較回路
の出力をタイマの出力でラッチするフリップフロップと
、このフリップフロップの出力で基準クロックと他のク
ロックを切り替えるセレクタを備えたものである。
(Means for Solving the Problems) A clock switching circuit according to the present invention includes a frequency comparison circuit that compares the frequencies of a reference clock and another clock, a timer that is activated by inputting a reset signal, and an output of the frequency comparison circuit. It is equipped with a flip-flop that latches the clock using the output of a timer, and a selector that uses the output of this flip-flop to switch between the reference clock and other clocks.

(作用〕 この発明においては、クロック入力を基準クロックとを
周波数比較回路で比較すると共に、リセット時にタイマ
によりクロック切替のタイミングを生成して周波数比較
回路の出力を保持し、セレクタのクロック出力を切り替
える。
(Function) In this invention, the clock input is compared with the reference clock by the frequency comparison circuit, and at the time of reset, the clock switching timing is generated by the timer, the output of the frequency comparison circuit is held, and the clock output of the selector is switched. .

〔実施例〕〔Example〕

以下、この発明の一実施例を第2図と同一部分は同一符
号を付して示す第1図について説明する。第1図におい
て、(6)はクロック入力と基準クロックを比較する周
波数比較回路、(4)はタイマ、(5)は周波数比較回
路(6)の出力をタイマ(4)の出力て保持するフリッ
プフロップ、(2)はこのフリップフロップ(2)の出
力でクロック入力と基準クロックを選択するセレクタ、
(7)はリセット入力とタイマ(4)の出力をオアする
ORケートである。
Hereinafter, an embodiment of the present invention will be described with reference to FIG. 1, in which the same parts as in FIG. 2 are denoted by the same reference numerals. In Figure 1, (6) is a frequency comparison circuit that compares the clock input and the reference clock, (4) is a timer, and (5) is a flip-flop that holds the output of the frequency comparison circuit (6) as the output of timer (4). (2) is a selector that selects the clock input and reference clock using the output of this flip-flop (2);
(7) is an OR gate that ORs the reset input and the output of timer (4).

次に動作について説明する。基準クロックの周波数をf
l、クロック入力の周波数を12とする。基準クロック
の周波数flがクロック入力の周波数12より遅い場合
、すなわちf2> flの時、周波数比較回路(6)は
ハイレベルを出力する。リセット動作でリセット入力が
アサートされるとタイマ(4)がリセットされ、その出
力01JTI、 0UT2がロウレベルとなる。フリッ
プフロップ(5)は0LITIでリセットされ、セレク
タ(2)は基準クロック側をセレクトする。リセット入
力がネゲートされると、タイマ(4)がカウントを開始
する。リセット出力はオアゲート(7)に入力されたタ
イマ(4)の出力01172によりロウレベルのままで
ある。また、タイマ(4)の出力0UTIは0OT2よ
り短い時間で出力され、この出力0UTIのタイミング
で周波数比較器(6)の出力を、フリップフロップ(5
)がラッチする。フリップフロップ(5)の出力はセレ
クタ(2)へ送られ、クロック入力側がセレクトされク
ロック出力へ出力される。その後タイマ(4)の出力0
LIT2がハイレベルとなりオアゲート(7)を介して
リセット出力がネゲートされる。
Next, the operation will be explained. The frequency of the reference clock is f
1, and the frequency of the clock input is 12. When the frequency fl of the reference clock is slower than the frequency 12 of the clock input, that is, when f2>fl, the frequency comparison circuit (6) outputs a high level. When the reset input is asserted in the reset operation, the timer (4) is reset, and its outputs 01JTI and 0UT2 become low level. The flip-flop (5) is reset at 0LITI, and the selector (2) selects the reference clock side. When the reset input is negated, timer (4) starts counting. The reset output remains at a low level due to the output 01172 of the timer (4) input to the OR gate (7). Also, the output 0UTI of the timer (4) is output in a shorter time than 0OT2, and at the timing of this output 0UTI, the output of the frequency comparator (6) is output from the flip-flop (5).
) latches. The output of the flip-flop (5) is sent to the selector (2), which selects the clock input side and outputs it to the clock output. After that, timer (4) output 0
LIT2 becomes high level and the reset output is negated via the OR gate (7).

次に、基準クロックの周波数f1がクロック入力の周波
数f2より速い場合、すなわちf2≦f1の時、周波数
比較回路(6)はロウレベルを出力する。リセット動作
でリセット入力がアサートされるとタイマ(4)がリセ
ットされ、その出力0[JTl、 0LIT2がロウレ
ベルとなる。フリップフロップ(5)は0IITIでリ
セットされ、セレクタ(2)は基準クロック側をセレク
トする。リセット入力がネゲートされると、タイマ(4
)がカウントを開始する。リセット出力はオアゲート(
7)に入力されたタイマ(4)の出力Oυ丁2によりロ
ウレベルのままである。タイマ(4)の出力0UTIの
タイミングで周波数比較器(6)の出力を、フリップフ
ロップ(5)がラッチする。
Next, when the frequency f1 of the reference clock is faster than the frequency f2 of the clock input, that is, when f2≦f1, the frequency comparison circuit (6) outputs a low level. When the reset input is asserted in the reset operation, the timer (4) is reset, and its outputs 0[JTl, 0LIT2 become low level. The flip-flop (5) is reset at 0IITI, and the selector (2) selects the reference clock side. When the reset input is negated, the timer (4
) starts counting. The reset output is an OR gate (
It remains at a low level due to the output OυD2 of the timer (4) inputted to 7). The flip-flop (5) latches the output of the frequency comparator (6) at the timing of the output 0UTI of the timer (4).

フリップフロップ(5)の出力はセレクタ(2)へ送ら
れ、基準クロック側がセレクトされクロック出力へ出力
される。その後タイマ(4)の出力0UT2がハイレベ
ルとなりオアゲート(7)を介してリセット出力がネゲ
ートされる。
The output of the flip-flop (5) is sent to the selector (2), and the reference clock side is selected and output to the clock output. Thereafter, the output 0UT2 of the timer (4) becomes high level and the reset output is negated via the OR gate (7).

なお、上記実施例では、基準クロックとクロック入力の
速い方を選択する場合について説明したか、どちらか遅
い方を選択するものでも同様の効果を奏する。
In the above embodiment, the case where the faster one of the reference clock and the clock input is selected is explained, but the same effect can be obtained even if the slower one is selected.

(発明の効果) 以上のように、この発明によれは、基準クロックとクロ
ック入力をリセットのタイミングで自動的に周波数を切
り替えるように構成したので、クロック入力が変更にな
った場合でもその周波数に対応してクロック出力を自動
的に切り替えることができ、クロック出力を使用する後
続の回路の誤動作の可能性のないものが得られる効果が
ある。
(Effects of the Invention) As described above, according to the present invention, since the frequency of the reference clock and the clock input is automatically switched at the reset timing, even if the clock input is changed, the frequency remains unchanged. Correspondingly, the clock output can be automatically switched, which has the effect of eliminating the possibility of malfunction of subsequent circuits that use the clock output.

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

第1図はこの発明の一実施例によるクロック切替回路の
ブロック図、第2図は従来のクロック切替回路のブロッ
ク図である。 (1)は切替スイッチ、(2)はセレクタ、(3)はプ
ルアップ抵抗、(4)はタイマ、(5)はフリップフロ
ップ、(6)は周波数比較回路、(7)はセレクタ。 なお、図中、同一符号は同一、又は相当部分を示す。
FIG. 1 is a block diagram of a clock switching circuit according to an embodiment of the present invention, and FIG. 2 is a block diagram of a conventional clock switching circuit. (1) is a changeover switch, (2) is a selector, (3) is a pull-up resistor, (4) is a timer, (5) is a flip-flop, (6) is a frequency comparison circuit, and (7) is a selector. In addition, in the figures, the same reference numerals indicate the same or equivalent parts.

Claims (1)

【特許請求の範囲】[Claims] 基準クロックと他のクロックの周波数を比較する周波数
比較回路と、リセット信号を入力して起動するタイマと
、周波数比較回路の出力をタイマの出力でラッチするフ
リップフロップと、このフリップフロップの出力で基準
クロックと他のクロックを切り替えるセレクタを備えた
クロック切替回路。
A frequency comparison circuit that compares the frequency of the reference clock and other clocks, a timer that is started by inputting a reset signal, a flip-flop that latches the output of the frequency comparison circuit with the output of the timer, and a reference clock that uses the output of this flip-flop. A clock switching circuit with a selector that switches between one clock and another clock.
JP2291421A 1990-10-29 1990-10-29 Clock switching circuit Pending JPH04207238A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2291421A JPH04207238A (en) 1990-10-29 1990-10-29 Clock switching circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2291421A JPH04207238A (en) 1990-10-29 1990-10-29 Clock switching circuit

Publications (1)

Publication Number Publication Date
JPH04207238A true JPH04207238A (en) 1992-07-29

Family

ID=17768663

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2291421A Pending JPH04207238A (en) 1990-10-29 1990-10-29 Clock switching circuit

Country Status (1)

Country Link
JP (1) JPH04207238A (en)

Similar Documents

Publication Publication Date Title
EP0322618A2 (en) Clock selection circuit
JPH0562705B2 (en)
JPH04207238A (en) Clock switching circuit
JP2665070B2 (en) Bus circuit
JPH01194014A (en) Clock switching device
JP2953713B2 (en) Semiconductor integrated circuit
JP2005012515A (en) Variable frequency divider
JPH05291895A (en) Clock selection circuit
JPH04105412A (en) Flip-flop
JPH07321609A (en) D type flip-flop circuit with hold function
JPS63282820A (en) Clock signal switching system
JPH03263914A (en) Signal waveform shaping circuit
JPS61288574A (en) Synchronous separation circuit
JPH0346412A (en) Selection circuit changeover device
JPH05102844A (en) Frequency divider circuit
JPS61285523A (en) Clock switching circuit
JPH02130020A (en) Delay circuit
JPS63312721A (en) Ternary input circuit
JPH06121006A (en) Current/standby switching circuit
JPS5916469A (en) Digital signal switching circuit
JPH03164852A (en) Integrated circuit
JPH0567955A (en) Input circuit
JPS63204425A (en) Clock signal switching circuit
JPH0315776A (en) Mode setting circuit
JPH05128932A (en) Switch circuit