JP2003270367A - Timer circuit - Google Patents

Timer circuit

Info

Publication number
JP2003270367A
JP2003270367A JP2002069159A JP2002069159A JP2003270367A JP 2003270367 A JP2003270367 A JP 2003270367A JP 2002069159 A JP2002069159 A JP 2002069159A JP 2002069159 A JP2002069159 A JP 2002069159A JP 2003270367 A JP2003270367 A JP 2003270367A
Authority
JP
Japan
Prior art keywords
flip
flop
counter
circuit
timer
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.)
Withdrawn
Application number
JP2002069159A
Other languages
Japanese (ja)
Inventor
Motohisa Nakao
元久 中尾
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2002069159A priority Critical patent/JP2003270367A/en
Publication of JP2003270367A publication Critical patent/JP2003270367A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Measurement Of Predetermined Time Intervals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a timer circuit capable of greatly lowering the number of flip-flops within an allowable precision range and reducing a circuit scale as a whole. <P>SOLUTION: This time circuit is provided with a common counter 30 constructed by connecting a plurality of flip-flops 7 in series for counting an input clock CLK, and six separate counters 31-36 constructed by connecting a plurality of flip-flops 7 in series for respectively counting an output of the common counter 30. Six timers 41-46 are constructed of the counters 31-36 individually. <P>COPYRIGHT: (C)2003,JPO

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 configured by using a plurality of counters to form a plurality of timers.

【0002】[0002]

【従来の技術】従来、この種のタイマ回路の一例として
は、図3に示すようなものが知られている。このタイマ
回路は、図3に示すように、例えば6つのタイマ1〜6
により構成されている。
2. Description of the Related Art Conventionally, as an example of this type of timer circuit, a timer circuit as shown in FIG. 3 has been known. As shown in FIG. 3, this timer circuit includes, for example, six timers 1-6.
It is composed by.

【0003】タイマ1は、例えば30分用のタイマであ
り、フリップフロップ7を13段直列に接続したカウン
タ8と、アンド回路9と、フラグレジスタ10とから構
成されている。タイマ2は、例えば30分用のタイマで
あり、フリップフロップ7を13段直列に接続したカウ
ンタ11と、アンド回路12と、フラグレジスタ13と
から構成されている。
The timer 1 is a timer for 30 minutes, for example, and comprises a counter 8 in which 13 stages of flip-flops 7 are connected in series, an AND circuit 9, and a flag register 10. The timer 2 is a timer for 30 minutes, for example, and includes a counter 11 in which 13 stages of flip-flops 7 are connected in series, an AND circuit 12, and a flag register 13.

【0004】タイマ3は、例えば4時間用のタイマであ
り、フリップフロップ7を16個直列に接続したカウン
タ14と、アンド回路15と、フラグレジスタ16とか
ら構成されている。タイマ4は、例えば30分用のタイ
マであり、フリップフロップ7を13段直列に接続した
カウンタ17と、アンド回路18と、フラグレジスタ1
9とから構成されている。
The timer 3 is, for example, a timer for 4 hours and comprises a counter 14 in which 16 flip-flops 7 are connected in series, an AND circuit 15 and a flag register 16. The timer 4 is, for example, a timer for 30 minutes, and includes a counter 17 in which 13 stages of flip-flops 7 are connected in series, an AND circuit 18, and a flag register 1.
It is composed of 9 and 9.

【0005】タイマ5は、例えば1時間用のタイマであ
り、フリップフロップ7を14段直列に接続したカウン
タ20と、アンド回路21と、フラグレジスタ22とか
ら構成されている。タイマ6は、例えば2時間用のタイ
マであり、フリップフロップ7を15段直列に接続した
カウンタ23と、アンド回路24と、フラグレジスタ2
5とから構成されている。
The timer 5 is, for example, a timer for one hour, and comprises a counter 20 in which 14 stages of flip-flops 7 are connected in series, an AND circuit 21, and a flag register 22. The timer 6 is, for example, a timer for 2 hours, and has a counter 23 in which 15 stages of flip-flops 7 are connected in series, an AND circuit 24, and a flag register 2.
It is composed of 5 and.

【0006】アンド回路9、12、15、18、21、
24には、共通の入力クロックCLKが入力されるとと
もに、タイマ起動信号S1〜S6がそれぞれ入力される
ようになっている。フラグレジスタ10、13、16、
19、22、25は、カウンタ8、11、14、17、
20、23の最終段のフリップフロップ7の出力が
「H」レベルになると、それ以降はクロックCLKでは
変化せず、リセットされるまで「H」レベルを維持する
ものである。
AND circuits 9, 12, 15, 18, 21,
A common input clock CLK is input to 24, and timer activation signals S1 to S6 are input to the input 24. Flag registers 10, 13, 16,
19, 22, 25 are counters 8, 11, 14, 17,
When the output of the flip-flop 7 at the final stage of 20 and 23 becomes "H" level, it does not change with the clock CLK after that, and maintains "H" level until it is reset.

【0007】このフラグレジスタ10、13、16、1
9、22、25は、いずれも同一の構成要素からなり、
例えば、ナンド回路26、アンド回路27、およびフリ
ップフロップ28から構成される。フラグレジスタ10
の場合について説明すると、ナンド回路26は、一方の
入力端子がカウンタ8の最終段のフリップフロップ7の
反転出力端子(/Q)に接続され、他方の入力端子がフ
リップフロップ28の反転出力端子(/Q)に接続さ
れ、出力端子がフリップフロップ28の入力端子(D)
に接続されている。
The flag registers 10, 13, 16, 1
9, 22, 25 are all composed of the same components,
For example, it is composed of a NAND circuit 26, an AND circuit 27, and a flip-flop 28. Flag register 10
In the NAND circuit 26, one input terminal of the NAND circuit 26 is connected to the inverting output terminal (/ Q) of the final stage flip-flop 7 of the counter 8 and the other input terminal of the NAND circuit 26 is the inverting output terminal (/ Q) of the flip-flop 28. / Q) and the output terminal is the input terminal (D) of the flip-flop 28.
It is connected to the.

【0008】また、アンド回路27は、一方の入力端子
にタイマ起動信号S1が入力され、他方の入力端子にク
ロックCLKが入力され、出力端子がフリップフロップ
28のクロック端子(C)に接続されている。フリップ
フロップ28の出力端子(Q)から出力を取り出すよう
になっている。次に、このような構成からなる従来のタ
イマ回路の動作について、図3および図4を参照して説
明する。
In the AND circuit 27, the timer start signal S1 is input to one input terminal, the clock CLK is input to the other input terminal, and the output terminal is connected to the clock terminal (C) of the flip-flop 28. There is. An output is taken out from the output terminal (Q) of the flip-flop 28. Next, the operation of the conventional timer circuit having such a configuration will be described with reference to FIGS. 3 and 4.

【0009】タイマ1〜タイマ6では、その動作が基本
的に同じであるので、以下では、タイマ1の動作につい
て説明する。いま、タイマ1を構成するカウンタ8の各
フリップフロップ7の各出力Qが、「L」レベルにリセ
ットされているものとする。そして、アンド回路9に入
力されているタイマ起動信号S1が、図4(B)に示す
ように「L」レベルから「H」レベルになると、カウン
タ8の1段目のフリップフロップ7に入力クロックCL
Kが入力可能となる。
The operations of timers 1 to 6 are basically the same, so the operation of timer 1 will be described below. Now, it is assumed that each output Q of each flip-flop 7 of the counter 8 constituting the timer 1 is reset to the “L” level. When the timer start signal S1 input to the AND circuit 9 changes from the “L” level to the “H” level as shown in FIG. 4B, the input clock is input to the first-stage flip-flop 7 of the counter 8. CL
K can be input.

【0010】このため、1つ目の入力クロックCLKが
入力されると、その1段目のフリップフロップ7の出力
Qは、図4(C)に示すように「L」レベルから「H」
レベルに反転する。次に、2つ目の入力クロックCLK
が入力されると、その1段目のフリップフロップ7の出
力Qは、「H」レベルから「L」レベルに反転する。こ
れと同時に、1段目のフリップフロップ7の反転出力
(/Q)は、「L」レベルから「H」レベルに反転す
る。この反転出力がカウンタ8の2段目のフリップフロ
ップ7に入力されるので、その2段目のフリップフロッ
プ7の出力Qは、図4(D)に示すように「L」レベル
から「H」レベルに反転する。
Therefore, when the first input clock CLK is input, the output Q of the first-stage flip-flop 7 changes from "L" level to "H" as shown in FIG. 4 (C).
Invert to level. Next, the second input clock CLK
Is input, the output Q of the first-stage flip-flop 7 is inverted from the “H” level to the “L” level. At the same time, the inverted output (/ Q) of the first-stage flip-flop 7 is inverted from the “L” level to the “H” level. Since the inverted output is input to the second-stage flip-flop 7 of the counter 8, the output Q of the second-stage flip-flop 7 changes from "L" level to "H" as shown in FIG. Invert to level.

【0011】そして、3つ目の入力クロックCLKが入
力されると、1段目のフリップフロップ7の出力Qは、
図4(C)に示すように、「L」レベルから「H」レベ
ルに反転する。このとき、1段目のフリップフロップ7
の反転出力(/Q)は、「H」レベルから「L」レベル
に反転し、その反転出力が2段目のフリップフロップ7
に入力されても、2段目のフリップフロップ7の出力Q
は、図4(D)に示すよう「H」レベルを維持したまま
で反転しない。
When the third input clock CLK is input, the output Q of the first-stage flip-flop 7 is
As shown in FIG. 4C, the "L" level is inverted to the "H" level. At this time, the first-stage flip-flop 7
The inverted output (/ Q) is inverted from the “H” level to the “L” level, and the inverted output is the second-stage flip-flop 7.
Input to the output Q of the second-stage flip-flop 7
Does not invert while maintaining the "H" level as shown in FIG.

【0012】次に、4つ目の入力クロックCLKが入力
されると、1段目のフリップフロップ7の出力Qは、再
び「H」レベルから「L」レベルに反転する。これと同
時に、1段目のフリップフロップ7の反転出力(/Q)
は、「L」レベルから「H」レベルに反転する。この反
転出力が2段目のフリップフロップ7に入力されるの
で、2段目のフリップフロップ7の出力Qは、図4
(D)に示すように「H」レベルから「L」レベルに反
転する。
Next, when the fourth input clock CLK is input, the output Q of the first-stage flip-flop 7 is inverted again from "H" level to "L" level. At the same time, the inverted output (/ Q) of the first-stage flip-flop 7
Is inverted from the "L" level to the "H" level. Since this inverted output is input to the second-stage flip-flop 7, the output Q of the second-stage flip-flop 7 is as shown in FIG.
As shown in (D), the "H" level is inverted to the "L" level.

【0013】このような動作により、所定個目の入力ク
ロックCLKが1段目のフリップフロップ7に入力され
ると、このときに、カウンタ8の最終段(13段目)の
フリップフロップ7の出力Qは、図4(N)に示すよう
に、「L」レベルから「H」レベルに反転する。このと
き、その最終段のフリップフロップ7の反転出力(/
Q)は、「H」レベルから「L」レベルに反転し、これ
がフラグレジスタ10にも伝えられる。このため、フラ
グレジスタ10の出力は、「H」レベルに固定され、こ
の状態はリセットがあるまで保持される。
When a predetermined number of input clocks CLK are input to the first-stage flip-flop 7 by such an operation, the output of the final-stage (13th) flip-flop 7 of the counter 8 at this time. As shown in FIG. 4N, Q is inverted from the “L” level to the “H” level. At this time, the inverted output of the flip-flop 7 at the final stage (/
Q) is inverted from the “H” level to the “L” level, and this is also transmitted to the flag register 10. Therefore, the output of the flag register 10 is fixed to the "H" level, and this state is held until reset.

【0014】このように、タイマ1では、タイマ起動信
号S1が「H」レベルに立ち上がってからカウンタ8の
最終段のフリップフロップ7が「H」レベルになるまで
の時間は30分となる。このため、タイマ1は30分用
のタイマとして機能することになる。ここで、タイマ1
が30分用のタイマとして機能するためには、クロック
CLKの周期を予め決めておく必要があるので、以下こ
の点について説明する。
As described above, in the timer 1, the time from the rise of the timer start signal S1 to the "H" level until the flip-flop 7 at the final stage of the counter 8 becomes the "H" level is 30 minutes. Therefore, the timer 1 functions as a timer for 30 minutes. Where timer 1
In order to function as a timer for 30 minutes, it is necessary to determine the cycle of the clock CLK in advance, and this point will be described below.

【0015】いま、カウンタ8のフリップフロップ7の
接続段数を例えば13段とすると、クロックCLKの周
期Tは、次のようになる。 T=30分/(213)=(30×60)/8192=
0.219〔秒〕 したがって、このときのクロックCLKの周波数fは、
f=1/T=4.56〔Hz〕となる。
Now, assuming that the number of connection stages of the flip-flops 7 of the counter 8 is 13, for example, the cycle T of the clock CLK is as follows. T = 30 minutes / (2 13 ) = (30 × 60) / 8192 =
0.219 [seconds] Therefore, the frequency f of the clock CLK at this time is
It becomes f = 1 / T = 4.56 [Hz].

【0016】[0016]

【発明が解決しようとする課題】ところで、従来のタイ
マ回路は、上記のように、例えばタイマ1〜6というよ
うに複数のタイマからなり、しかもその各タイマ1〜6
は多数のフリップフロップを直列に接続することを基本
としている。このため、フリップフロップの個数が多く
なって全体の回路規模が大きくなるという不都合があ
り、この不都合はタイマの個数が多い場合には顕著とな
る。
By the way, the conventional timer circuit is composed of a plurality of timers, for example, timers 1 to 6, as described above, and each of the timers 1 to 6 is used.
Is based on connecting many flip-flops in series. Therefore, there is an inconvenience that the number of flip-flops increases and the overall circuit scale increases, and this inconvenience becomes remarkable when the number of timers is large.

【0017】一方、このように複数のタイマからなるタ
イマ回路では、その各タイマにおいて高い計数精度が要
求されない場合がある。そこで、本発明は、上記の点に
鑑み、許容される計数精度の範囲内において、フリップ
フロップの個数を大幅に減少でき、全体として回路規模
を小さくできるタイマ回路を提供することを目的とす
る。
On the other hand, in such a timer circuit including a plurality of timers, high counting accuracy may not be required for each timer. In view of the above points, an object of the present invention is to provide a timer circuit in which the number of flip-flops can be significantly reduced and the circuit scale can be reduced as a whole within the range of allowable counting accuracy.

【0018】[0018]

【課題を解決するための手段】上記の課題を解決し本発
明の目的を達成するために、請求項1および請求項2に
記載の発明は、以下のように構成した。すなわち、請求
項1に記載の発明は、フロップフリップをn段直列に接
続して構成され、入力クロックを計数するnビットの共
通カウンタと、フリップフロップをm段直列に接続して
構成され、前記共通カウンタの出力をそれぞれ計数する
mビットからなる複数の個別カウンタとを備え、前記複
数の個別カウンタにより複数のタイマをそれぞれ構成す
るようにしたことを特徴とするものである。
In order to solve the above problems and achieve the object of the present invention, the inventions described in claims 1 and 2 are configured as follows. That is, the invention according to claim 1 is configured by connecting n stages of flop flips in series, and is configured by connecting an n-bit common counter for counting an input clock and flip-flops in m stages in series. A plurality of m-bit individual counters that respectively count the outputs of the common counters are provided, and a plurality of timers are respectively configured by the plurality of individual counters.

【0019】請求項2に記載の発明は、請求項1に記載
のタイマ回路において、前記複数の個別カウンタはフラ
グレジスタをそれぞれ含み、その各フラグレジスタは、
対応する個別レジスタが計数の終了を示す信号を出力し
たときに、所定の出力を維持するようになっていること
を特徴とするものである。このように、本発明では、入
力クロックを計数する共通カウンタと、この共通カウン
タの出力をそれぞれ計数する複数の個別カウンタを備
え、その個別カウンタにより複数のタイマを構成するよ
うにした。
According to a second aspect of the present invention, in the timer circuit according to the first aspect, each of the plurality of individual counters includes a flag register, and each flag register includes:
It is characterized in that a predetermined output is maintained when the corresponding individual register outputs a signal indicating the end of counting. As described above, in the present invention, the common counter that counts the input clock and the plurality of individual counters that respectively count the outputs of the common counter are provided, and the individual counters form the plurality of timers.

【0020】このため、本発明によれば、許容される計
数精度の範囲内において、フリップフロップの個数を大
幅に減少でき、全体として回路規模が小さなタイマ回路
を実現できる。
Therefore, according to the present invention, the number of flip-flops can be greatly reduced within a range of allowable counting accuracy, and a timer circuit having a small circuit scale as a whole can be realized.

【0021】[0021]

【発明の実施の形態】以下、本発明のタイマ回路の第1
実施形態の構成について、図1を参照して説明する。こ
の第1実施形態に係るタイマ回路は、図1に示すよう
に、フリップフロップ7を複数段直列に接続して構成さ
れ入力クロックCLKを計数する共通カウンタ30と、
フリップフロップ7を複数段直列に接続して構成され共
通カウンタ30の出力をそれぞれ計数する6つの個別カ
ウンタ31〜36とを備えている。さらに、そのカウン
タ31〜36により、後述のように6つのタイマ41〜
46をそれぞれ構成するようにした。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the first embodiment of the timer circuit of the present invention
The configuration of the embodiment will be described with reference to FIG. As shown in FIG. 1, the timer circuit according to the first embodiment includes a common counter 30 configured by connecting a plurality of stages of flip-flops 7 in series and counting an input clock CLK,
There are provided six individual counters 31 to 36 each configured to connect a plurality of flip-flops 7 in series and each counting the output of the common counter 30. Further, by the counters 31 to 36, six timers 41 to 41 as described later are provided.
46 are configured respectively.

【0022】そして、この第1実施形態に係るタイマ回
路は、上記のような構成により、各タイマ41〜46の
各計数精度の許容範囲内で、できるだけ各タイマ41〜
46の構成素子であるフリップフロップ7の個数の低減
化を図り、全体として回路規模を小さくするようにした
ものである。さらに詳述すると、カウンタ30は、フリ
ップフロップ7を例えば8段直列に接続して構成される
256進カウンタである。このカウンタ30を構成する
初段のフリップフロップ7のクロック端子には、入力ク
ロックCLKが供給されるようになっている。
The timer circuit according to the first embodiment is configured as described above, and within the allowable range of the counting accuracy of each of the timers 41 to 46, each of the timers 41 to 46 is as much as possible.
The number of flip-flops 7 which are the constituent elements of 46 is reduced, and the circuit scale is reduced as a whole. More specifically, the counter 30 is a 256-ary counter configured by connecting the flip-flops 7 in series, for example, in eight stages. The input clock CLK is supplied to the clock terminal of the first-stage flip-flop 7 which constitutes the counter 30.

【0023】タイマ41は、例えば30分用のタイマで
あり、図1に示すように、カウンタ31と、アンド回路
48と、フラグレジスタ49とから構成されている。カ
ウンタ31は、フリップフロップ7を例えば5段直列に
接続して構成される32進カウンタである。アンド回路
48は、その一方の入力端子がカウンタ30の終段のフ
リップフロップ7の反転出力端子(/Q)に接続され、
その他方の入力端子にはタイマ起動信号S1が入力され
るようになっている。アンド回路48の出力端子は、カ
ウンタ31の初段のフリップフロップ7のクロック端子
に接続されている。
The timer 41 is, for example, a timer for 30 minutes, and comprises a counter 31, an AND circuit 48 and a flag register 49 as shown in FIG. The counter 31 is a 32-bit counter configured by connecting the flip-flops 7 in series, for example, in five stages. The AND circuit 48 has one input terminal connected to the inverting output terminal (/ Q) of the final stage flip-flop 7 of the counter 30,
The timer activation signal S1 is input to the other input terminal. The output terminal of the AND circuit 48 is connected to the clock terminal of the first-stage flip-flop 7 of the counter 31.

【0024】フラグレジスタ49は、例えばナンド回路
66、アンド回路67、およびフリップフロップ68か
ら構成される。ナンド回路66は、一方の入力端子がカ
ウンタ31の最終段のフリップフロップ7の反転出力端
子(/Q)に接続され、他方の入力端子がフリップフロ
ップ68の反転出力端子(/Q)に接続され、出力端子
がフリップフロップ68の入力端子(D)に接続されて
いる。
The flag register 49 is composed of, for example, a NAND circuit 66, an AND circuit 67, and a flip-flop 68. One input terminal of the NAND circuit 66 is connected to the inverting output terminal (/ Q) of the flip-flop 7 at the final stage of the counter 31, and the other input terminal is connected to the inverting output terminal (/ Q) of the flip-flop 68. The output terminal is connected to the input terminal (D) of the flip-flop 68.

【0025】また、アンド回路67は、一方の入力端子
にタイマ起動信号S1が入力され、他方の入力端子にク
ロックCLKが入力され、出力端子がフリップフロップ
68のクロック端子(C)に接続されている。フリップ
フロップ68の出力端子(Q)から出力を取り出すよう
になっている。タイマ42は、例えば30分用のタイマ
であり、カウンタ32と、アンド回路50と、フラグレ
ジスタ51とから構成されている。
In the AND circuit 67, the timer start signal S1 is input to one input terminal, the clock CLK is input to the other input terminal, and the output terminal is connected to the clock terminal (C) of the flip-flop 68. There is. An output is taken out from the output terminal (Q) of the flip-flop 68. The timer 42 is a timer for 30 minutes, for example, and includes a counter 32, an AND circuit 50, and a flag register 51.

【0026】カウンタ32は、フリップフロップ7を例
えば5段直列に接続して構成される32進カウンタであ
る。アンド回路50は、その一方の入力端子がカウンタ
30の終段のフリップフロップ7の反転出力端子(/
Q)に接続され、その他方の入力端子にはタイマ起動信
号S2が入力されるようになっている。アンド回路50
の出力端子は、カウンタ32の初段のフリップフロップ
7のクロック端子に接続されている。
The counter 32 is a 32-bit counter composed of, for example, five stages of flip-flops 7 connected in series. The AND circuit 50 has one input terminal of which is the inverting output terminal (/ of the final stage flip-flop 7 of the counter 30).
Q), and the timer start signal S2 is input to the other input terminal. AND circuit 50
The output terminal of is connected to the clock terminal of the first-stage flip-flop 7 of the counter 32.

【0027】フラグレジスタ51は、フラグレジスタ4
9と同様に、ナンド回路66、アンド回路67、および
フリップフロップ68から構成される。ただし、ナンド
回路66の一方の入力端子が、カウンタ32の最終段の
フリップフロップ7の反転出力端子(/Q)に接続され
ている点と、アンド回路67の一方の入力端子にタイマ
起動信号S2が入力される点が異なる。
The flag register 51 is the flag register 4
Similar to 9, the NAND circuit 66, the AND circuit 67, and the flip-flop 68 are included. However, one input terminal of the NAND circuit 66 is connected to the inverting output terminal (/ Q) of the flip-flop 7 in the final stage of the counter 32, and one input terminal of the AND circuit 67 has a timer start signal S2. The difference is that is input.

【0028】タイマ43は、例えば4時間用のタイマで
あり、カウンタ33と、アンド回路52と、フラグレジ
スタ53とから構成されている。カウンタ33は、フリ
ップフロップ7を例えば8段直列に接続して構成される
256進カウンタである。アンド回路52は、その一方
の入力端子がカウンタ30の終段のフリップフロップ7
の反転出力端子(/Q)に接続され、その他方の入力端
子にはタイマ起動信号S3が入力されるようになってい
る。アンド回路52の出力端子は、カウンタ33の初段
のフリップフロップ7のクロック端子に接続されてい
る。
The timer 43 is, for example, a timer for 4 hours, and is composed of a counter 33, an AND circuit 52, and a flag register 53. The counter 33 is a 256-ary counter configured by connecting the flip-flops 7 in series in eight stages, for example. The AND circuit 52 has one input terminal of the flip-flop 7 at the final stage of the counter 30.
Is connected to the inverted output terminal (/ Q), and the timer starting signal S3 is input to the other input terminal. The output terminal of the AND circuit 52 is connected to the clock terminal of the first-stage flip-flop 7 of the counter 33.

【0029】フラグレジスタ53は、フラグレジスタ4
9と同様に、ナンド回路66、アンド回路67、および
フリップフロップ68から構成される。ただし、ナンド
回路66の一方の入力端子が、カウンタ33の最終段の
フリップフロップ7の反転出力端子(/Q)に接続され
ている点と、アンド回路67の一方の入力端子にタイマ
起動信号S3が入力される点が異なる。
The flag register 53 is the flag register 4
Similar to 9, the NAND circuit 66, the AND circuit 67, and the flip-flop 68 are included. However, one input terminal of the NAND circuit 66 is connected to the inverting output terminal (/ Q) of the flip-flop 7 at the final stage of the counter 33, and one input terminal of the AND circuit 67 has a timer start signal S3. The difference is that is input.

【0030】タイマ44は、例えば30分用のタイマで
あり、カウンタ34と、アンド回路54と、フラグレジ
スタ55とから構成されている。カウンタ34は、フリ
ップフロップ7を例えば5段直列に接続して構成される
32進カウンタである。アンド回路54は、その一方の
入力端子がカウンタ30の終段のフリップフロップ7の
反転出力端子(/Q)に接続され、その他方の入力端子
にはタイマ起動信号S4が入力されるようになってい
る。アンド回路54の出力端子は、カウンタ34の初段
のフリップフロップ7のクロック端子に接続されてい
る。
The timer 44 is, for example, a timer for 30 minutes, and comprises a counter 34, an AND circuit 54, and a flag register 55. The counter 34 is a 32-bit counter configured by connecting the flip-flops 7 in series, for example, in five stages. One input terminal of the AND circuit 54 is connected to the inverting output terminal (/ Q) of the final stage flip-flop 7 of the counter 30, and the timer start signal S4 is input to the other input terminal. ing. The output terminal of the AND circuit 54 is connected to the clock terminal of the first-stage flip-flop 7 of the counter 34.

【0031】フラグレジスタ55は、フラグレジスタ4
9と同様に、ナンド回路66、アンド回路67、および
フリップフロップ68から構成される。ただし、ナンド
回路66の一方の入力端子が、カウンタ34の最終段の
フリップフロップ7の反転出力端子(/Q)に接続され
ている点と、アンド回路67の一方の入力端子にタイマ
起動信号S4が入力される点が異なる。
The flag register 55 is the flag register 4
Similar to 9, the NAND circuit 66, the AND circuit 67, and the flip-flop 68 are included. However, one input terminal of the NAND circuit 66 is connected to the inverting output terminal (/ Q) of the flip-flop 7 at the final stage of the counter 34, and one input terminal of the AND circuit 67 has a timer start signal S4. The difference is that is input.

【0032】タイマ45は、例えば1時間用のタイマで
あり、カウンタ35と、アンド回路56と、フラグレジ
スタ57とから構成されている。カウンタ35は、フリ
ップフロップ7を例えば6段直列に接続して構成される
64進カウンタである。アンド回路56は、その一方の
入力端子がカウンタ30の終段のフリップフロップ7の
反転出力端子(/Q)に接続され、その他方の入力端子
にはタイマ起動信号S5が入力されるようになってい
る。アンド回路56の出力端子は、カウンタ35の初段
のフリップフロップ7のクロック端子に接続されてい
る。
The timer 45 is, for example, a timer for one hour, and comprises a counter 35, an AND circuit 56, and a flag register 57. The counter 35 is a 64-base counter configured by connecting the flip-flops 7 in series, for example, 6 stages. The AND circuit 56 has one input terminal connected to the inverting output terminal (/ Q) of the flip-flop 7 at the final stage of the counter 30, and the timer start signal S5 is input to the other input terminal. ing. The output terminal of the AND circuit 56 is connected to the clock terminal of the first-stage flip-flop 7 of the counter 35.

【0033】フラグレジスタ57は、フラグレジスタ4
9と同様に、ナンド回路66、アンド回路67、および
フリップフロップ68から構成される。ただし、ナンド
回路66の一方の入力端子が、カウンタ35の最終段の
フリップフロップ7の反転出力端子(/Q)に接続され
ている点と、アンド回路67の一方の入力端子にタイマ
起動信号S5が入力される点が異なる。
The flag register 57 is the flag register 4
Similar to 9, the NAND circuit 66, the AND circuit 67, and the flip-flop 68 are included. However, one input terminal of the NAND circuit 66 is connected to the inverting output terminal (/ Q) of the flip-flop 7 at the final stage of the counter 35, and one input terminal of the AND circuit 67 has a timer start signal S5. The difference is that is input.

【0034】タイマ46は、例えば2時間用のタイマで
あり、カウンタ36と、アンド回路58と、フラグレジ
スタ59とから構成されている。カウンタ36は、フリ
ップフロップ7を例えば7段直列に接続して構成される
128進カウンタである。アンド回路58は、その一方
の入力端子がカウンタ30の終段のフリップフロップ7
の反転出力端子(/Q)に接続され、その他方の入力端
子にはタイマ起動信号S6が入力されるようになってい
る。アンド回路58の出力端子は、カウンタ36の初段
のフリップフロップ7のクロック端子に接続されてい
る。
The timer 46 is, for example, a timer for 2 hours, and is composed of a counter 36, an AND circuit 58, and a flag register 59. The counter 36 is a 128-ary counter configured by connecting the flip-flops 7 in series, for example, 7 stages. The AND circuit 58 has one input terminal of the flip-flop 7 at the final stage of the counter 30.
Is connected to the inverted output terminal (/ Q), and the timer starting signal S6 is input to the other input terminal. The output terminal of the AND circuit 58 is connected to the clock terminal of the first-stage flip-flop 7 of the counter 36.

【0035】フラグレジスタ59は、フラグレジスタ4
9と同様に、ナンド回路66、アンド回路67、および
フリップフロップ68から構成される。ただし、ナンド
回路66の一方の入力端子が、カウンタ36の最終段の
フリップフロップ7の反転出力端子(/Q)に接続され
ている点と、アンド回路67の一方の入力端子にタイマ
起動信号S6が入力される点が異なる。
The flag register 59 is the flag register 4
Similar to 9, the NAND circuit 66, the AND circuit 67, and the flip-flop 68 are included. However, one input terminal of the NAND circuit 66 is connected to the inverting output terminal (/ Q) of the flip-flop 7 at the final stage of the counter 36, and the timer start signal S6 is connected to one input terminal of the AND circuit 67. The difference is that is input.

【0036】次に、このような構成からなる第1実施形
態のタイマ回路の動作について、図1および図2を参照
して説明する。タイマ41〜タイマ46は、その動作が
基本的に同じであるので、以下では、タイマ41の動作
について説明する。いま、カウンタ30を構成する8段
のフリップフロップ7の各出力Qと、カウンタ31を構
成する5段のフリップフロップ7の各出力Qが、「L」
レベルにリセットされているものとする。
Next, the operation of the timer circuit of the first embodiment having such a configuration will be described with reference to FIGS. 1 and 2. Since the operations of the timers 41 to 46 are basically the same, the operation of the timer 41 will be described below. Now, each output Q of the eight-stage flip-flop 7 forming the counter 30 and each output Q of the five-stage flip-flop 7 forming the counter 31 are "L".
It has been reset to the level.

【0037】そして、カウンタ30の1段目のフリップ
フロップ7に対して1つ目の入力クロックCLKが入力
されると、1段目のフリップフロップ7の出力Qは、図
2(B)に示すように「L」レベルから「H」レベルに
反転する。次に、2つ目の入力クロックCLKが入力さ
れると、その1段目のフリップフロップ7の出力Qは、
「H」レベルから「L」レベルに反転する。これと同時
に、1段目のフリップフロップ7の反転出力(/Q)
は、「L」レベルから「H」レベルに反転する。この反
転出力が2段目のフリップフロップ7に入力されるの
で、2段目のフリップフロップ7の出力Qは、図2
(C)に示すように「L」レベルから「H」レベルに反
転する。
When the first input clock CLK is input to the first-stage flip-flop 7 of the counter 30, the output Q of the first-stage flip-flop 7 is shown in FIG. 2 (B). Thus, the "L" level is inverted to the "H" level. Next, when the second input clock CLK is input, the output Q of the first-stage flip-flop 7 is
The "H" level is inverted to the "L" level. At the same time, the inverted output (/ Q) of the first-stage flip-flop 7
Is inverted from the "L" level to the "H" level. Since this inverted output is input to the second-stage flip-flop 7, the output Q of the second-stage flip-flop 7 is as shown in FIG.
As shown in (C), the "L" level is inverted to the "H" level.

【0038】そして、3つ目の入力クロックCLKが入
力されると、1段目のフリップフロップ7の出力Qは、
図2(B)に示すように、「L」レベルから「H」レベ
ルに反転する。このとき、1段目のフリップフロップ7
の反転出力(/Q)は、「H」レベルから「L」レベル
に反転し、反転出力がカウンタ30の2段目のフリップ
フロップ7に入力されても、その2段目のフリップフロ
ップ7の出力Qは、図2(C)に示すよう「H」レベル
を維持したままで反転しない。
When the third input clock CLK is input, the output Q of the first-stage flip-flop 7 is
As shown in FIG. 2B, the "L" level is inverted to the "H" level. At this time, the first-stage flip-flop 7
The inverted output (/ Q) of is inverted from the “H” level to the “L” level, and even if the inverted output is input to the second-stage flip-flop 7 of the counter 30, the second-stage flip-flop 7 of The output Q does not invert while maintaining the "H" level as shown in FIG.

【0039】次に、4つ目の入力クロックCLKが入力
されると、1段目のフリップフロップ7の出力Qは、再
び「H」レベルから「L」レベルに反転する。これと同
時に、1段目のフリップフロップ7の反転出力(/Q)
は、「L」レベルから「H」レベルに反転する。この反
転出力が2段目のフリップフロップ7に入力されるの
で、2段目のフリップフロップ7の出力Qは、図2
(C)に示すように「H」レベルから「L」レベルに反
転する。
Next, when the fourth input clock CLK is input, the output Q of the first-stage flip-flop 7 is inverted again from "H" level to "L" level. At the same time, the inverted output (/ Q) of the first-stage flip-flop 7
Is inverted from the "L" level to the "H" level. Since this inverted output is input to the second-stage flip-flop 7, the output Q of the second-stage flip-flop 7 is as shown in FIG.
As shown in (C), the "H" level is inverted to the "L" level.

【0040】このような動作により、所定個目の入力ク
ロックCLKが1段目のフリップフロップ7に入力され
ると、このときに、カウンタ30の最終段(8段目)の
フリップフロップ7の出力Qは、図2(D)に示すよう
に、「L」レベルから「H」レベルに反転する。以上か
らわかるように、カウンタ30は、入力クロックCLK
を分周させる動作を行ない、この動作を繰り返す。
When a predetermined number of input clocks CLK are input to the first stage flip-flop 7 by such an operation, the output of the final stage (8th stage) of the counter 30 is output at this time. As shown in FIG. 2D, Q is inverted from the “L” level to the “H” level. As can be seen from the above, the counter 30 has the input clock CLK
The frequency division is performed and this operation is repeated.

【0041】ところで、アンド回路48に入力されるタ
イマ起動信号S1が、図2(E)に示すように、「L」
レベルから「H」レベルになったものとする。このと
き、カウンタ30の出力は、図2(D)に示すように
「L」レベルにあるので、カウンタ31の1段目のフリ
ップフロップ7の出力Qは、図2(F)に示すように、
「L」レベルのままである。
By the way, the timer start signal S1 input to the AND circuit 48 is "L" as shown in FIG.
It is assumed that the level has changed to "H" level. At this time, since the output of the counter 30 is at the “L” level as shown in FIG. 2D, the output Q of the first-stage flip-flop 7 of the counter 31 is as shown in FIG. ,
It remains at the “L” level.

【0042】しかし、カウンタ30の出力が、図2
(D)に示すように「L」レベルから「H」レベルに変
化すると、カウンタ31の1段目のフリップフロップ7
の出力Qは、図2(F)に示すように、「L」レベルか
ら「H」レベルに変化する。ここで、カウンタ31の各
フリップフロップ7は、カウンタ30の各フリップフロ
ップ7と同様に動作するので、その詳細な説明は省略す
る。
However, the output of the counter 30 is as shown in FIG.
As shown in (D), when the "L" level changes to the "H" level, the flip-flop 7 of the first stage of the counter 31
Output Q changes from "L" level to "H" level, as shown in FIG. Here, since each flip-flop 7 of the counter 31 operates similarly to each flip-flop 7 of the counter 30, detailed description thereof will be omitted.

【0043】その後、カウンタ31の最終段(5段目)
フリップフロップ7が、図2(G)に示すように、
「L」レベルから「H」レベルに変化する。このとき、
その最終段のフリップフロップ7の反転出力(/Q)
は、「H」レベルから「L」レベルに反転し、これがフ
ラグレジスタ10にも伝えられる。このため、フラグレ
ジスタ49の出力は、「H」レベルに固定され、この状
態はリセットがあるまで保持される。
After that, the final stage of the counter 31 (the fifth stage)
As shown in FIG. 2G, the flip-flop 7 is
The "L" level changes to the "H" level. At this time,
Inverted output (/ Q) of the final stage flip-flop 7
Is inverted from the “H” level to the “L” level, and this is also transmitted to the flag register 10. Therefore, the output of the flag register 49 is fixed to the “H” level, and this state is held until reset.

【0044】このような動作により、タイマ41では、
タイマ起動信号S1が「H」レベルに立ち上がってから
カウンタ31の5段目のフリップフロップ7が「H」レ
ベルになるまでの時間は、ほぼ30分となる(図2参
照)。このため、タイマ41は、30分用のタイマとし
て機能することになる。なお、カウンタ30に入力され
るクロックCLKの周期は、図3の場合に使用されるク
ロックCLKの周期と同一とする。
With the above operation, the timer 41
The time from when the timer activation signal S1 rises to the “H” level until the fifth flip-flop 7 of the counter 31 reaches the “H” level is approximately 30 minutes (see FIG. 2). Therefore, the timer 41 functions as a timer for 30 minutes. The cycle of the clock CLK input to the counter 30 is the same as the cycle of the clock CLK used in the case of FIG.

【0045】以上説明したように、この第1実施形態に
よれば、入力クロックを計数する共通カウンタ30と、
この共通カウンタ30の出力をそれぞれ計数する6つの
個別カウンタ31〜36を備え、その個別カウンタ31
〜36により6つのタイマ41〜46を構成するように
した。このため、この第1実施形態によれば、許容され
る計数精度の範囲内において、フリップフロップの個数
を大幅に減少でき、全体として回路規模が小さなタイマ
回路を実現できる。
As described above, according to the first embodiment, the common counter 30 for counting the input clocks,
Six individual counters 31 to 36 each counting the output of the common counter 30 are provided.
6 to 6 timers 41 to 46 are configured. Therefore, according to the first embodiment, the number of flip-flops can be greatly reduced within the range of the allowable counting accuracy, and a timer circuit having a small circuit scale as a whole can be realized.

【0046】[0046]

【発明の効果】以上説明したように、本発明によれば、
許容される計数精度の範囲内において、フリップフロッ
プの個数を大幅に減少でき、全体として回路規模が小さ
なタイマ回路を実現できる。
As described above, according to the present invention,
Within the range of allowable counting accuracy, the number of flip-flops can be greatly reduced, and a timer circuit having a small circuit scale as a whole can be realized.

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

【図1】本発明の第1実施形態に係るタイマ回路の構成
を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a timer circuit according to a first embodiment of the present invention.

【図2】その第1実施形態の動作の一例を説明するタイ
ムチャートである。
FIG. 2 is a time chart illustrating an example of the operation of the first embodiment.

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

【図4】その従来のタイマ回路の動作を説明するタイム
チャートである。
FIG. 4 is a time chart explaining the operation of the conventional timer circuit.

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

7 フリップフロップ 30 共通カウンタ 31〜36 個別カウンタ 41〜46 タイマ 48、50、52、54、56、58 アンド回路 49、51、53、55、57、59 フラグレジスタ 7 flip-flops 30 common counter 31-36 Individual counter 41-46 timer 48, 50, 52, 54, 56, 58 AND circuit 49, 51, 53, 55, 57, 59 Flag registers

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 フロップフリップをn段直列に接続して
構成され、入力クロックを計数するnビットの共通カウ
ンタと、 フリップフロップをm段直列に接続して構成され、前記
共通カウンタの出力をそれぞれ計数するmビットからな
る複数の個別カウンタとを備え、 前記複数の個別カウンタにより複数のタイマをそれぞれ
構成するようにしたことを特徴とするタイマ回路。
1. An n-bit common counter that is configured by connecting n stages of flop flips in series, and an n-bit common counter that counts an input clock, and is configured by connecting m stages of flip-flops in series, and outputs of the common counters, respectively. A timer circuit, comprising: a plurality of individual counters of m bits for counting, wherein the plurality of individual counters respectively configure a plurality of timers.
【請求項2】 前記複数の個別カウンタはフラグレジス
タをそれぞれ含み、その各フラグレジスタは、対応する
個別レジスタが計数の終了を示す信号を出力したとき
に、所定の出力を維持するようになっていることを特徴
とする請求項1に記載のタイマ回路。
2. The plurality of individual counters each include a flag register, and each flag register maintains a predetermined output when the corresponding individual register outputs a signal indicating the end of counting. The timer circuit according to claim 1, wherein:
JP2002069159A 2002-03-13 2002-03-13 Timer circuit Withdrawn JP2003270367A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002069159A JP2003270367A (en) 2002-03-13 2002-03-13 Timer circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002069159A JP2003270367A (en) 2002-03-13 2002-03-13 Timer circuit

Publications (1)

Publication Number Publication Date
JP2003270367A true JP2003270367A (en) 2003-09-25

Family

ID=29200087

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002069159A Withdrawn JP2003270367A (en) 2002-03-13 2002-03-13 Timer circuit

Country Status (1)

Country Link
JP (1) JP2003270367A (en)

Similar Documents

Publication Publication Date Title
JP2003270367A (en) Timer circuit
JP2000304831A (en) Test circuit
JP4908056B2 (en) Semiconductor device and test execution method for semiconductor device
US7123679B2 (en) Counter having improved counting speed
JP2003037504A (en) Device for generating gray code
JP2647834B2 (en) Counter circuit
JP2748401B2 (en) Error pulse counting circuit
JP3201445B2 (en) Chattering prevention circuit
JP2000174614A (en) High speed counter circuit
JP6721340B2 (en) Semiconductor integrated circuit
JP2001127619A (en) Counter circuit
JPH0422220A (en) Synchronous output circuit
JP2001282384A (en) Timer unit programmable by software
JPH05304255A (en) Mode setting system for integrated circuit employing reset signal
JP2012039296A (en) Counter circuit
JPH0237822A (en) Frequency dividing circuit
JP2008109563A (en) Counter
JP2602404Y2 (en) Counter circuit
JPH09145803A (en) Test mode setting circuit
JP2003168979A (en) Binary code generator
JPH05122032A (en) Oscillation stoppage detection device
JPH03106223A (en) Counter circuit
JPH0331015B2 (en)
JPH09147594A (en) Shift register circuit
JPH0253322A (en) Synchronizing type multi-stage counter

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050607