JPH066210A - Timer circuit - Google Patents

Timer circuit

Info

Publication number
JPH066210A
JPH066210A JP4181543A JP18154392A JPH066210A JP H066210 A JPH066210 A JP H066210A JP 4181543 A JP4181543 A JP 4181543A JP 18154392 A JP18154392 A JP 18154392A JP H066210 A JPH066210 A JP H066210A
Authority
JP
Japan
Prior art keywords
input signal
circuit
signal
external input
outputs
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
JP4181543A
Other languages
Japanese (ja)
Inventor
Mizuo Kusakabe
瑞夫 日下部
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 JP4181543A priority Critical patent/JPH066210A/en
Publication of JPH066210A publication Critical patent/JPH066210A/en
Pending legal-status Critical Current

Links

Landscapes

  • Manipulation Of Pulses (AREA)
  • Microcomputers (AREA)
  • Electronic Switches (AREA)

Abstract

PURPOSE:To provide a timer circuit which has a noise dealing function to the external input signals. CONSTITUTION:A selection circuit 7 sets and outputs the initial value to a counter circuit 1 from a reload register 3 in response to an external input signal. Meanwhile an input control circuit 8 outputs the initial value to the circuit 1 in response to the AND secured between an event input signal and the external input signal. Therefore the circuit 1 outputs an overflow signal based on the initial value set previously and in response to the H-level period of the external input signal. Based on this overflow signal, a pulse that has a short H-level period to the external input signal and has many noise components due to the chattering, etc., is discriminated from a pulse that has a long H-level period and has the reduced noise components.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、半導体回路で構成さ
れるタイマ回路に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a timer circuit composed of a semiconductor circuit.

【0002】[0002]

【従来の技術】図4は従来のタイマ回路を示すブロック
図であり、図において、1はイベント入力端子2より入
力されたイベント入力信号に同期してカウントするカウ
ンタ回路、3はカウンタ回路1のオーバーフロー信号に
より、格納された値を設定出力するリロードレジスタ、
4はそのカウンタ回路1の出力信号線、5は中央処理装
置(図示せず、以下CPUという)とカウンタ回路1お
よびリロードレジスタ3とを接続したバスである。
2. Description of the Related Art FIG. 4 is a block diagram showing a conventional timer circuit. In the figure, 1 is a counter circuit which counts in synchronization with an event input signal input from an event input terminal 2 and 3 is a counter circuit 1. Reload register that sets and outputs the stored value by overflow signal,
Reference numeral 4 is an output signal line of the counter circuit 1, and 5 is a bus connecting a central processing unit (not shown, hereinafter referred to as CPU) to the counter circuit 1 and the reload register 3.

【0003】次に動作について説明する。あらかじめ、
カウンタ回路1およびリロードレジスタ3には初期値と
してバス5を介してCPUよりデータが与えられる。次
に、カウンタ回路1はこの初期値に基づきイベント入力
端子2より入力されたイベント入力信号に同期してカウ
ンタ値を増減する。例えば、カウンタ回路1が8ビット
構成のアップカウンタとすると、カウンタ値は“00”
から“FF”まで+1ずつ増加する。そして、カウンタ
値“FF”の時に次のイベント入力されれば同期してカ
ウンタ回路1はオーバーフローし、オーバーフロー信号
が出力される。このオーバーフロー信号によりリロード
レジスタ3はそのリロードレジスタ3に初期値として格
納された値をカウンタ回路1に設定出力する。カウンタ
回路1はこの設定出力された初期値に基づき、再びイベ
ント入力信号に同期してカウンタ値を増加する。
Next, the operation will be described. in advance,
Data is supplied from the CPU to the counter circuit 1 and the reload register 3 via the bus 5 as initial values. Next, the counter circuit 1 increases or decreases the counter value in synchronization with the event input signal input from the event input terminal 2 based on this initial value. For example, if the counter circuit 1 is an 8-bit up counter, the counter value is "00".
To "FF" increase by +1. Then, when the next event is input when the counter value is "FF", the counter circuit 1 overflows in synchronization with the output of the overflow signal. By this overflow signal, the reload register 3 sets and outputs the value stored in the reload register 3 as an initial value to the counter circuit 1. The counter circuit 1 again increases the counter value in synchronization with the event input signal based on the set and output initial value.

【0004】[0004]

【発明が解決しようとする課題】従来のタイマ回路は以
上のように構成されているので、CPUより与えられた
初期値に応じた周期的な出力信号をカウンタ回路1の出
力信号線4から得ることは可能であるが、このような、
単一機能であるため応用用途が限定される。例えば、外
部入力信号に対してHレベル期間が短くチャタリング等
によりノイズ成分が多いパルスと、Hレベル期間が長く
ノイズ成分が少ないパルスとを判別するなどのノイズ対
策が行えないなどの問題点があった。
Since the conventional timer circuit is configured as described above, a periodic output signal corresponding to the initial value given by the CPU is obtained from the output signal line 4 of the counter circuit 1. It is possible, but like this,
Since it has a single function, its application is limited. For example, there is a problem that noise countermeasures cannot be taken, such as distinguishing between a pulse having a long H level period and a large noise component due to chattering and a pulse having a long H level period and a small noise component with respect to an external input signal. It was

【0005】この発明は上記のような問題点を解消する
ためになされたもので、外部入力信号のノイズ対策機能
を有するタイマ回路を得ることを目的とする。
The present invention has been made to solve the above problems, and an object of the present invention is to obtain a timer circuit having a function of preventing noise of an external input signal.

【0006】[0006]

【課題を解決するための手段】この発明に係るタイマ回
路は、カウンタ回路のオーバーフロー信号と外部入力信
号とのどちらか一方を選択しリロードレジスタに出力す
る選択回路と、イベント入力信号と外部入力信号との論
理積に応じた信号をカウンタ回路に出力する入力信号制
御回路とを備えたものである。
A timer circuit according to the present invention comprises a selection circuit for selecting either an overflow signal of a counter circuit or an external input signal and outputting the selected signal to a reload register, an event input signal and an external input signal. And an input signal control circuit for outputting a signal according to the logical product of

【0007】[0007]

【作用】この発明におけるタイマ回路は、選択回路を外
部入力信号側に選択することにより、外部入力信号に応
じてあらかじめ設定された初期値をリロードレジスタか
らカウンタ回路に設定出力する。また、入力信号制御回
路はイベント入力信号と外部入力信号とを入力し、それ
らの論理積に応じた信号をカウンタ回路に出力する。し
たがって、カウンタ回路は、あらかじめ設定された初期
値に基づき外部入力信号の一定レベルの期間の長さに応
じて、オーバーフロー信号を出力し、このオーバーフロ
ー信号により、外部入力信号に対して一定レベル期間が
短くノイズ成分が多い信号と、一定レベル期間が長くノ
イズ成分が少ない信号とを判別する。
In the timer circuit according to the present invention, by selecting the selection circuit to the external input signal side, the initial value preset according to the external input signal is set and output from the reload register to the counter circuit. The input signal control circuit inputs the event input signal and the external input signal and outputs a signal corresponding to the logical product of them to the counter circuit. Therefore, the counter circuit outputs an overflow signal according to the length of the constant level period of the external input signal based on the preset initial value, and the overflow signal causes the constant level period with respect to the external input signal. A short signal with many noise components and a signal with a long fixed level period and few noise components are discriminated.

【0008】[0008]

【実施例】実施例1.以下、この発明の一実施例を図に
ついて説明する。図1において、1〜5は従来の技術と
同等である。6はノイズ成分が重畳された外部入力信号
を入力する外部入力端子、7はカウンタ回路1のオーバ
ーフロー信号と外部入力端子6より入力された外部入力
信号とのどちらか一方を選択し、信号線Aを通じてリロ
ードレジスタ3に出力する選択回路であり、選択回路7
はCPU(図示せず)とバス5で接続されている。8は
イベント入力端子2より入力されたイベント入力信号と
外部入力信号との論理積に応じた信号をカウンタ回路1
に出力する入力信号制御回路である。なお、Bは選択回
路7から入力信号制御回路8への信号線を示す。
EXAMPLES Example 1. An embodiment of the present invention will be described below with reference to the drawings. In FIG. 1, 1 to 5 are equivalent to the conventional technique. Reference numeral 6 designates an external input terminal for inputting an external input signal on which a noise component is superimposed, 7 designates either the overflow signal of the counter circuit 1 or the external input signal input from the external input terminal 6, and selects the signal line A Output to the reload register 3 via the selection circuit 7
Are connected to a CPU (not shown) by a bus 5. Reference numeral 8 denotes a counter circuit 1 which outputs a signal corresponding to a logical product of an event input signal input from the event input terminal 2 and an external input signal.
It is an input signal control circuit for outputting to. In addition, B indicates a signal line from the selection circuit 7 to the input signal control circuit 8.

【0009】次に動作について説明する。図1のブロッ
ク図と図2のタイミングチャートを参照しながら説明す
る。まず、CPUによりバス5を介してカウンタ回路1
およびリロードレジスタ3に、例えば初期値“AA”が
与えられる。また、CPUにより選択回路7を外部入力
信号側に選択するように設定する。この選択回路7によ
り、リロードレジスタ3に外部入力信号(図2(A))
に同期した信号(図2(B))が信号線Aを通して出力
され、図2の外部入力信号の立上がりt1 ,t2 ,t
3 ,t4 に応じてリロードレジスタ3は初期値として格
納された“AA”をカウンタ回路1に設定出力する。こ
の時、外部入力信号t1 〜t4 のようなHレベル期間が
短いパルスではリロードレジスタ3からカウンタ回路1
への設定出力間隔が短く、t4 以後のようなHレベル期
間が長いパルスでは設定出力間隔が長くなる。なお、選
択回路7は外部入力信号側の選択に伴い、信号線Bより
Hレベルの信号(図2(C))を入力信号制御回路8に
出力する。
Next, the operation will be described. This will be described with reference to the block diagram of FIG. 1 and the timing chart of FIG. First, the counter circuit 1 via the bus 5 by the CPU
An initial value “AA” is given to the reload register 3, for example. Also, the CPU is set to select the selection circuit 7 to the external input signal side. This selection circuit 7 causes the reload register 3 to receive an external input signal (FIG. 2 (A)).
2B is output through the signal line A, and the rising edges t 1 , t 2 , t of the external input signal in FIG.
The reload register 3 sets and outputs "AA" stored as an initial value to the counter circuit 1 in accordance with 3 and t 4 . At this time, in the case of a pulse having a short H level period such as the external input signals t 1 to t 4 , the reload register 3 causes the counter circuit 1 to move.
The set output interval is short and the set output interval is long for a pulse having a long H level period such as after t 4 . The selection circuit 7 outputs an H level signal (FIG. 2C) from the signal line B to the input signal control circuit 8 in accordance with the selection on the external input signal side.

【0010】また、入力信号制御回路8にはイベント入
力端子2より入力されたイベント入力信号(図2
(D))と外部入力端子6より入力された外部入力信号
とを入力し、それらの論理積に応じてカウンタ回路1に
出力する(図2(E))。この時、カウンタ回路1に出
力されるHレベルのイベント入力信号数は、外部入力信
号t1 〜t4 のようなHレベル期間が短いパルスでは少
なく、t4 以後のようなHレベル期間が長いパルスで多
くなる。
Further, the input signal control circuit 8 receives the event input signal input from the event input terminal 2 (see FIG. 2).
(D)) and the external input signal input from the external input terminal 6 are input and output to the counter circuit 1 according to the logical product of them (FIG. 2 (E)). At this time, the event input signal number of H level is output to the counter circuit 1 is less than H-level period is short pulse as an external input signal t 1 ~t 4, a long H-level period, such as t 4 after Increased with pulses.

【0011】また、図2(F)に示すように、カウンタ
回路1では時刻t1 にリロードレジスタ3より初期値と
して“AA”が設定される。また、入力信号制御回路8
より外部入力信号との論理積によるイベント入力信号が
入力され、初期値“AA”より+1ずつカウントする。
しかし、外部入力信号のHレベル期間が短いのでカウン
タ回路1のカウンタ値は増加せず、オーバーフロー値
“FF”に達することなく、時刻t2 にリロードレジス
タ3より初期値として“AA”が設定される。同様にし
て、時刻t2 以後イベント入力信号によりカウンタ回路
1はカウントするが、時刻t4 まで外部入力信号のHレ
ベル期間が短いのでオーバーフロー値“FF”に達する
ことはない。
Further, as shown in FIG. 2F, in the counter circuit 1, "AA" is set as an initial value from the reload register 3 at time t 1 . In addition, the input signal control circuit 8
Further, an event input signal which is a logical product of an external input signal is input, and the initial value "AA" is counted by +1.
However, since the H level period of the external input signal is short, the counter value of the counter circuit 1 does not increase, the overflow value “FF” is not reached, and “AA” is set as the initial value from the reload register 3 at time t 2. It Similarly, the counter circuit 1 counts by the event input signal after the time t 2, but the overflow value “FF” does not reach until the time t 4 because the H level period of the external input signal is short.

【0012】時刻t4 以後はHレベル期間が長いので、
カウンタ回路1のカウンタ値は増加し、オーバーフロー
値“FF”に達した後オーバーフロー信号をカウンタ回
路1の出力信号線4より出力する。このオーバーフロー
信号をCPUの割込み信号として用いることにより、外
部入力信号を時刻t4 より割込み処理することができ
る。このように、外部入力信号に対してHレベル期間が
短くノイズ成分が多いパルスと、Hレベル期間が長くノ
イズ成分が少ないパルスとを判別することができる。
Since the H level period is long after time t 4 ,
The counter value of the counter circuit 1 increases, and after reaching the overflow value “FF”, an overflow signal is output from the output signal line 4 of the counter circuit 1. By using this overflow signal as an interrupt signal of the CPU, the external input signal can be interrupted from time t 4 . In this way, it is possible to distinguish between a pulse having a short H level period and a large noise component and a pulse having a long H level period and a small noise component with respect to the external input signal.

【0013】図3は入力信号制御回路8の具体的構成を
示す論理回路図であり、図において、9aはナットゲー
ト、9bはナンドゲート、9cはアンドゲートである。
図3のように構成すれば、選択回路7が外部入力信号側
を選択した場合、選択回路出力信号BにはHレベルの信
号が入力され、外部入力信号とイベント入力信号との論
理積がカウンタ回路1に出力される。また、選択回路7
がカウンタ回路1のオーバーフロー信号側を選択した場
合、選択回路出力信号BにはLレベルの信号が入力さ
れ、イベント入力信号がそのままカウンタ回路1に出力
される。したがって、このタイマ回路は従来技術と同様
な機能を選択回路7により選択することができる。
FIG. 3 is a logic circuit diagram showing a specific configuration of the input signal control circuit 8. In the figure, 9a is a nut gate, 9b is a NAND gate, and 9c is an AND gate.
With the configuration shown in FIG. 3, when the selection circuit 7 selects the external input signal side, an H level signal is input to the selection circuit output signal B, and the logical product of the external input signal and the event input signal is counted. It is output to the circuit 1. In addition, the selection circuit 7
When the overflow signal side of the counter circuit 1 is selected, the L level signal is input to the selection circuit output signal B, and the event input signal is output to the counter circuit 1 as it is. Therefore, this timer circuit can select the same function as that of the prior art by the selection circuit 7.

【0014】[0014]

【発明の効果】以上のように、この発明によればカウン
タ回路のオーバーフロー信号と外部入力信号とのどちら
か一方を選択しリロードレジスタに出力する選択回路
と、イベント入力信号と外部入力信号との論理積に応じ
た信号をカウンタ回路に出力する入力信号制御回路とを
備えた構成にしたので、カウンタ回路のオーバーフロー
信号により、外部入力信号に対して一定レベル期間が短
くチャタリング等によりノイズ成分が多い信号と、一定
レベル期間が長くノイズ成分が少ない信号とを判別する
ことができ、外部入力信号のノイズ対策機能を有するタ
イマ回路が得られる効果を奏する。
As described above, according to the present invention, the selection circuit for selecting either the overflow signal of the counter circuit or the external input signal and outputting it to the reload register, the event input signal and the external input signal are selected. Since the input signal control circuit that outputs a signal corresponding to the logical product to the counter circuit is provided, a constant level period is short with respect to an external input signal due to an overflow signal of the counter circuit, and a noise component is large due to chattering or the like. It is possible to distinguish a signal from a signal having a long fixed level period and a small noise component, and it is possible to obtain a timer circuit having a noise countermeasure function for an external input signal.

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

【図1】この発明の一実施例によるタイマ回路を示すブ
ロック図である。
FIG. 1 is a block diagram showing a timer circuit according to an embodiment of the present invention.

【図2】図1の主要部の動作を示すタイミングチャート
である。
FIG. 2 is a timing chart showing an operation of a main part of FIG.

【図3】入力信号制御回路の具体的構成を示す論理回路
図である。
FIG. 3 is a logic circuit diagram showing a specific configuration of an input signal control circuit.

【図4】従来のタイマ回路を示すブロック図である。FIG. 4 is a block diagram showing a conventional timer circuit.

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

1 カウンタ回路 3 リロードレジスタ 7 選択回路 8 入力信号制御回路 1 counter circuit 3 reload register 7 selection circuit 8 input signal control circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 イベント入力信号に同期してカウントす
るカウンタ回路と、上記カウンタ回路のオーバーフロー
信号により、格納された値をそのカウンタ回路に設定出
力するリロードレジスタとを備えたタイマ回路におい
て、上記カウンタ回路のオーバーフロー信号と外部入力
信号とのどちらか一方を選択し上記リロードレジスタに
出力する選択回路と、イベント入力信号と外部入力信号
との論理積に応じた信号をカウンタ回路に出力する入力
信号制御回路とを備えたことを特徴とするタイマ回路。
1. A timer circuit comprising: a counter circuit that counts in synchronization with an event input signal; and a reload register that sets and outputs a stored value to the counter circuit according to an overflow signal of the counter circuit. A selection circuit that selects either the circuit overflow signal or the external input signal and outputs it to the reload register, and the input signal control that outputs a signal according to the logical product of the event input signal and the external input signal to the counter circuit. And a timer circuit.
JP4181543A 1992-06-17 1992-06-17 Timer circuit Pending JPH066210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4181543A JPH066210A (en) 1992-06-17 1992-06-17 Timer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4181543A JPH066210A (en) 1992-06-17 1992-06-17 Timer circuit

Publications (1)

Publication Number Publication Date
JPH066210A true JPH066210A (en) 1994-01-14

Family

ID=16102627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4181543A Pending JPH066210A (en) 1992-06-17 1992-06-17 Timer circuit

Country Status (1)

Country Link
JP (1) JPH066210A (en)

Similar Documents

Publication Publication Date Title
US4583008A (en) Retriggerable edge detector for edge-actuated internally clocked parts
US5539337A (en) Clock noise filter for integrated circuits
JPH0381327B2 (en)
US5107523A (en) Processor clock governor
JPH0821844B2 (en) Semiconductor integrated circuit
US4282488A (en) Noise eliminator circuit
US5454018A (en) Counter circuit with automatic reset
US5221906A (en) Program control digital pulse generator
EP0839424B1 (en) Extended chip select reset apparatus and method
JPH066210A (en) Timer circuit
US5506533A (en) Apparatus for generating a monostable signal
US5175751A (en) Processor static mode disable circuit
JPH08139575A (en) Pulse output circuit
US4771405A (en) Hidden control bits in a control register
US6445753B1 (en) Method and circuit configuration for processing digital signals
US4164712A (en) Continuous counting system
JPH08167692A (en) Semiconductor device
JPH02170616A (en) Logical integrated circuit
JPH0227854B2 (en)
US6459752B1 (en) Configuration and method for determining whether the counter reading of a counter has reached a predetermined value or not
JPH05268020A (en) Clock switching circuit
JPH0923148A (en) Control circuit for simultaneous operation
JPH06177723A (en) Pulse width modulation circuit
JPH05243923A (en) Noise elimination circuit
JPH0417489B2 (en)