JP2695546B2 - Microcomputer built-in count source automatic change timer - Google Patents

Microcomputer built-in count source automatic change timer

Info

Publication number
JP2695546B2
JP2695546B2 JP3207632A JP20763291A JP2695546B2 JP 2695546 B2 JP2695546 B2 JP 2695546B2 JP 3207632 A JP3207632 A JP 3207632A JP 20763291 A JP20763291 A JP 20763291A JP 2695546 B2 JP2695546 B2 JP 2695546B2
Authority
JP
Japan
Prior art keywords
count
count source
timer
source
value
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
JP3207632A
Other languages
Japanese (ja)
Other versions
JPH0527870A (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.)
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 JP3207632A priority Critical patent/JP2695546B2/en
Publication of JPH0527870A publication Critical patent/JPH0527870A/en
Application granted granted Critical
Publication of JP2695546B2 publication Critical patent/JP2695546B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Microcomputers (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、マイクロコンピュ−
タに関し、特に、そのタイマのカウントソースが自動変
更できるマイクロコンピュータ内蔵カウントソース自動
変更タイマに関するものである。
BACKGROUND OF THE INVENTION This invention relates to a micro computer.
More specifically, the present invention relates to a microcomputer built-in count source automatic changing timer capable of automatically changing the count source of the timer.

【0002】[0002]

【従来の技術】従来のマイクロコンピュータ内蔵のタイ
マでは、図2に示すような回路から構成されている。図
2において、1はカウントソースA入力線、2はカウン
トソースB入力線、3は選択ゲート、4はカウント停止
・許可ゲート、5はカウント停止・許可入力線、6はタ
イマである。
2. Description of the Related Art A conventional timer with a built-in microcomputer comprises a circuit as shown in FIG. In FIG. 2, 1 is a count source A input line, 2 is a count source B input line, 3 is a selection gate, 4 is a count stop / permit gate, 5 is a count stop / permit input line, and 6 is a timer.

【0003】次に動作について説明する。カウントソー
スAで計数を行い、カウントソースBにカウントソース
を変更する場合は、タイマ6のカウント停止信号をソフ
トウェア上で“1”にセットし、カウントを停止してか
ら選択ゲート3をカウントソースB側にセットして、切
替えていた。
Next, the operation will be described. When counting is performed by the count source A and the count source is changed to the count source B, the count stop signal of the timer 6 is set to "1" by software to stop the count and then the selection gate 3 is set to the count source B. It was set to the side and switched.

【0004】[0004]

【発明が解決しようとする課題】従来のタイマのカウン
トソース回路では、上記のように構成されているので、
複数のカウントソースを選択できても、タイマのカウン
トをソフトウェア上で停止しなければならず、ソフトウ
ェア上でタイマのカウントを停止することなくカウント
ソースを変更することが不可能という問題点があった。
Since the count source circuit of the conventional timer is configured as described above,
Even if multiple count sources can be selected, the timer count must be stopped in software, and it is impossible to change the count source without stopping the timer count in software. .

【0005】この発明は上記のような問題点を解消する
ためになされたもので、タイマのカウントソースを切替
えて制御を行う場合、タイマ値と比較するためのタイマ
のカウント値を設定する切替え設定レジスタを使用し
て、タイマのカウントを停止せずにタイマがカウントソ
ースを自動選択できるマイクロコンピュータ内蔵カウン
トソース自動変更タイマを提供することにある。
The present invention has been made to solve the above problems, and when the control is performed by switching the count source of the timer, the switching setting for setting the count value of the timer for comparison with the timer value. An object of the present invention is to provide a count source automatic changing timer with a built-in microcomputer in which a timer can automatically select a count source without stopping counting of the timer by using a register.

【0006】[0006]

【課題を解決するための手段】この発明に係るマイクロ
コンピュータ内蔵カウントソース自動変更タイマでは、
カウントソース切替え値を設定する専用のカウントソー
ス切替え設定手段(カウントソース切替え設定レジスタ
10)と、タイマ6のタイマ値と上記カウントソース切
替え値とを比較し、上記タイマ値が上記カウントソース
切替え値以上であれば、第1のカウントソース(カウン
トソースA)を選択し、上記カウント値が上記カウント
ソース切替え値よりも小さければ、第2のカウントソー
ス(カウントソースB)を選択する比較手段(比較器
9)と、この比較手段の指示により、上記第1のカウン
トソースまたは上記第2のカウントソースを選択して上
記タイマに出力する切替え手段Sとを有する。
SUMMARY OF THE INVENTION In a microcomputer built-in count source automatic change timer according to the present invention,
A dedicated count source switching setting means (count source switching setting register 10) for setting the count source switching value is compared with the timer value of the timer 6 and the count source switching value, and the timer value is equal to or greater than the count source switching value. If so, a first count source (count source A) is selected, and if the count value is smaller than the count source switching value, a second count source (count source B) is selected. 9) and switching means S for selecting the first count source or the second count source and outputting the selected count source to the timer according to an instruction from the comparison means.

【0007】[0007]

【作用】この発明におけるマイクロコンピュータ内蔵カ
ウントソース自動変更タイマでは、上記カウント切替え
設定レジスタ10にあらかじめタイマのカウントソース
切替え値をセットする。上記比較手段は上記タイマのタ
イマ値と上記カウントソース切替え値とを比較し、上記
タイマ値が上記カウントソース切替え値以上であれば、
第1のカウントソースから切替え手段を介して上記タイ
マに信号を供給し、上記カウント値が上記カウントソー
ス切替え値よりも小さければ上記切替え手段を切替え、
第2のカウントソースから上記切替え手段を介して上記
タイマに信号を供給する。このとき、上記比較手段はカ
ウントソース切替えレジスタのカウントソース切替え値
とタイマのカウント値が一致すると、第1のカウントソ
ースから第2のカウントソースに切替える。
In the microcomputer built-in count source automatic changing timer according to the present invention, the count source switching value of the timer is set in the count switching setting register 10 in advance. The comparison means compares the timer value of the timer with the count source switching value, and if the timer value is equal to or greater than the count source switching value,
A signal is supplied from the first count source to the timer through the switching means, and the switching means is switched if the count value is smaller than the count source switching value,
A signal is supplied from a second count source to the timer via the switching means. At this time, the comparison means switches from the first count source to the second count source when the count source switching value of the count source switching register and the count value of the timer match.

【0008】[0008]

【実施例】以下、この発明の一実施例を図について説明
する。図1はこの発明の一実施例のマイクロコンピュー
タ内蔵カウントソース自動変更タイマにおける回路ブロ
ック図である。図1において、1は第1のカウントソー
スとしてのカウントソースAのカウントソース入力線、
2は第2のカウントソースとしてのカウントソースBの
カウントソース入力線、4はカウント停止・許可ゲー
ト、5はカウント停止・許可入力線、6はタイマ、7及
び8は切替え手段Sとしてのゲート、9は比較手段とし
ての比較器、10はカウントソース切替え設定手段とし
てのカウントソース切替え設定レジスタ、11はカウン
トソース切替え制御線、12はタイマ値信号線、13は
カウントソース切替え値信号線である。なお、図1の従
来と同じ機能の部分には、図2の従来例と同一符号を付
し、構成の説明については省略する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a circuit block diagram of a count source automatic changing timer with a built-in microcomputer according to an embodiment of the present invention. In FIG. 1, 1 is a count source input line of a count source A as a first count source,
2 is a count source input line of a count source B as a second count source, 4 is a count stop / permit gate, 5 is a count stop / permit input line, 6 is a timer, 7 and 8 are gates as switching means S, Reference numeral 9 is a comparator as comparison means, 10 is a count source switching setting register as count source switching setting means, 11 is a count source switching control line, 12 is a timer value signal line, and 13 is a count source switching value signal line. It should be noted that parts having the same functions as those of the conventional example of FIG. 1 are denoted by the same reference numerals as those of the conventional example of FIG.

【0009】ゲート7,8は、カウントソースA,Bと
カウントソース入力線1,2を介して、各々接続され、
比較器9の制御によって、カウントソースA,Bからの
信号をカウント停止・許可ゲート4に供給する。比較器
9は、カウントソース切替え制御線11を介してゲート
7,8と接続され、タイマ値信号線12を介してタイマ
6と接続され、カウントソース切替え値信号線13を介
してカウントソース切替え設定レジスタ10と接続され
ている。そして、タイマ6のタイマ値がカウントソース
切替え設定レジスタ10のカウントソース切替え値以上
であれば、ゲート7を制御して、カウントソースAから
ゲート7,カウント停止・許可ゲート4を介してタイマ
6に信号を供給し、タイマ6のタイマ値がカウントソー
ス切替え設定レジスタ10のカウントソース切替え値よ
りも小さければ、ゲート8を制御して、カウントソース
Bからゲート8,カウント停止・許可ゲート4を介して
タイマ6に信号を供給する。カウントソース切替え設定
レジスタ10は上記カウントソース切替え値をあらかじ
め設定するレジスタである。
The gates 7 and 8 are connected to the count sources A and B via the count source input lines 1 and 2, respectively,
Under the control of the comparator 9, the signals from the count sources A and B are supplied to the count stop / permission gate 4. The comparator 9 is connected to the gates 7 and 8 via the count source switching control line 11, is connected to the timer 6 via the timer value signal line 12, and is set to the count source switching setting via the count source switching value signal line 13. It is connected to the register 10. When the timer value of the timer 6 is equal to or larger than the count source switching value of the count source switching setting register 10, the gate 7 is controlled so that the timer 6 is controlled from the count source A through the gate 7 and the count stop / permission gate 4. When a signal is supplied and the timer value of the timer 6 is smaller than the count source switching value of the count source switching setting register 10, the gate 8 is controlled so that the count source B passes through the gate 8 and the count stop / permission gate 4. A signal is supplied to the timer 6. The count source switching setting register 10 is a register for presetting the count source switching value.

【0010】次に、この実施例の動作について説明す
る。カウントソース切替え設定レジスタ10にカウント
ソース切替え値を設定し、最初のカウントソースをゲー
ト7を制御してカウントソースAにしてタイマ6のカウ
ントをスタートする。比較器9は、タイマ6のタイマ値
と上記カウントソース切替え値とをタイマ値信号線1
2,カウントソース切替え値信号線13を介して比較し
ており、上記タイマ値が上記カウントソース切替え値以
上の場合は、カウントソース切替え制御線11に“L”
信号を出力し、カウントソースA選択の状態のままとす
る。また、上記タイマ値が上記カウントソース切替え値
よりも小さい場合は、カウントソース切替え制御線11
に“H”信号を出力し、ゲート8を制御してゲート7か
らゲート8に切替え、カウントソースBを選択する。こ
のように、カウントソース切替えレジスタを持たせるこ
とによりある設定時間を境に、タイマのカウントソース
を自動で切替えて分解能の異なるタイミングを設定する
ことができる。
Next, the operation of this embodiment will be described. A count source switching value is set in the count source switching setting register 10, and the first count source is set to the count source A by controlling the gate 7 to start counting by the timer 6. The comparator 9 compares the timer value of the timer 6 and the count source switching value with the timer value signal line 1
2, the comparison is made via the count source switching value signal line 13, and when the timer value is equal to or more than the count source switching value, the count source switching control line 11 is "L".
The signal is output and the state of the count source A selection is maintained. If the timer value is smaller than the count source switching value, the count source switching control line 11
A "H" signal is output to control gate 8 to switch from gate 7 to gate 8 to select count source B. Thus, by providing the count source switching register, it is possible to automatically switch the count source of the timer at a certain set time and set timings with different resolutions.

【0011】また、マイクロコンピュータにおけるタイ
マの応用範囲が拡大し、さらに、プログラム処理が簡単
化される。なお、上記実施例では、カウントソースが2
つの場合について説明したが、カウントソースが複数の
場合にも応用できる。
Further, the application range of the timer in the microcomputer is expanded, and the program processing is simplified. In the above embodiment, the count source is 2
Although two cases have been described, the present invention can be applied to the case where there are multiple count sources.

【0012】[0012]

【発明の効果】以上のように、この発明によれば、カウ
ントソース切替え値を設定する専用のカウントソース切
替え設定手段と、タイマのタイマ値と上記カウントソー
ス切替え値とを比較し、上記タイマ値が上記カウントソ
ース切替え値以上であれば、第1のカウントソースを選
択し、上記タイマ値が上記カウントソース切替え値より
も小さければ、第2のカウントソースを選択する比較手
段と、この比較手段の指示により上記第1のカウントソ
ースまたは上記第2のカウントソースを選択して上記タ
イマに出力する切替え手段Sとを備える構成としたた
め、タイマのカウントを停止することなく、タイマのカ
ウントソースを自動選択できる効果がある。また、専用
のカウントソース切替え設定手段を備えているので、タ
イマの割り込み信号を発生させる前の、タイマのカウン
ト中にカウントソースを切り換えることができる。つま
り、タイマの割り込み信号には依存せずに全く別のタイ
ミングでカウントソースを切り換えることができる。
As described above, according to the present invention, the dedicated count source switching setting means for setting the count source switching value is compared with the timer value of the timer and the count source switching value, and the timer value is compared. Is equal to or larger than the count source switching value, the first count source is selected, and if the timer value is smaller than the count source switching value, a second count source is selected, and a comparing means for selecting the second count source. Since the switching means S for selecting the first count source or the second count source according to the instruction and outputting to the timer is provided, the count source of the timer is automatically selected without stopping the count of the timer. There is an effect that can be done. Also dedicated
Since it has a count source switching setting means of
Timer count before generating interrupt signal
The count source can be switched during the process. Toes
Therefore, the timer interrupt signal does not depend on
You can switch the count source by minging.

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

【図1】この発明の一実施例を示すマイクロコンピュー
タ内蔵カウントソース自動変更タイマの回路ブロック図
である。
FIG. 1 is a circuit block diagram of a count source automatic changing timer with a microcomputer according to an embodiment of the present invention.

【図2】従来の技術の一例を示すマイクロコンピュータ
内蔵タイマの回路ブロック図である。
FIG. 2 is a circuit block diagram of a timer with a built-in microcomputer showing an example of a conventional technique.

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

1 カウントソースA入力線 2 カウントソースB入力線 4 カウント停止・許可ゲート 5 カウント停止・許可入力線 6 タイマ 7,8 ゲート 9 比較器 10 カウントソース切替え設定レジスタ 11 カウントソース切替え制御線 12 タイマ値信号線 13 カウントソース切替え値信号線 S 切替え手段 1 Count source A input line 2 Count source B input line 4 Count stop / enable gate 5 Count stop / enable input line 6 Timer 7, 8 Gate 9 Comparator 10 Count source switching setting register 11 Count source switching control line 12 Timer value signal Line 13 Count source switching value signal line S switching means

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 計時するもととなる信号を供給する第1
または第2のカウントソースと、これらのカウントソー
スにもとづいて動作するタイマとを備えるマイクロコン
ピュータ内蔵カウントソース自動変更タイマにおいて、
カウントソース切替え値を設定する専用のカウントソー
ス切替え設定手段と、上記タイマのタイマ値と上記カウ
ントソース切替え値とを比較し、上記カウント値が上記
カウントソース切替え値以上であれば、上記第1のカウ
ントソースを選択し、上記タイマ値が上記カウントソー
ス切替え値よりも小さければ、上記第2のカウントソー
スを選択する比較手段と、この比較手段の指示により、
第1のカウントソースまたは第2のカウントソースを選
択して上記タイマに出力する切替え手段Sとを有するこ
とを特徴とするマイクロコンピュータ内蔵カウントソー
ス自動変更タイマ。
1. A first device for supplying a signal from which time is measured.
Alternatively, in a microcomputer built-in count source automatic changing timer including a second count source and a timer that operates based on these count sources,
And dedicated count source switch setting means for setting a count source switching value, compares the timer value and the count source switching value of the timer, the count value is equal to the count source switching value or more, the first If the count source is selected and the timer value is smaller than the count source switching value, the comparing means for selecting the second count source and the instruction of the comparing means
A count source automatic changing timer with a built-in microcomputer, comprising a switching means S for selecting the first count source or the second count source and outputting the selected count source to the timer.
JP3207632A 1991-07-24 1991-07-24 Microcomputer built-in count source automatic change timer Expired - Lifetime JP2695546B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3207632A JP2695546B2 (en) 1991-07-24 1991-07-24 Microcomputer built-in count source automatic change timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3207632A JP2695546B2 (en) 1991-07-24 1991-07-24 Microcomputer built-in count source automatic change timer

Publications (2)

Publication Number Publication Date
JPH0527870A JPH0527870A (en) 1993-02-05
JP2695546B2 true JP2695546B2 (en) 1997-12-24

Family

ID=16543014

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3207632A Expired - Lifetime JP2695546B2 (en) 1991-07-24 1991-07-24 Microcomputer built-in count source automatic change timer

Country Status (1)

Country Link
JP (1) JP2695546B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2803389B2 (en) * 1991-05-15 1998-09-24 日本電気株式会社 Timer device

Also Published As

Publication number Publication date
JPH0527870A (en) 1993-02-05

Similar Documents

Publication Publication Date Title
JP3233553B2 (en) Computer system and computer system stop clock control method
JP2695546B2 (en) Microcomputer built-in count source automatic change timer
KR0174356B1 (en) Personal computer power control method and apparatus
JP2530702B2 (en) Time switch
KR100385454B1 (en) Circuit for preventing malfunction on control system
US5828898A (en) Microcomputer for outputting data to the outside of the microcomputer in real time in response to a RTP output request signal received from outside the microcomputer
JPH0969052A (en) Interruption control circuit
JPS6183082A (en) Control of self-printing in printing apparatus
JPH04349539A (en) Operation control system for microprocessor
JP2597729B2 (en) Microcomputer
JP2663487B2 (en) Digital communication equipment
KR100260408B1 (en) Method for displaying alarm in tv
KR0136480Y1 (en) Compact disk player power control circuit
JPH0738776A (en) Video signal processing circuit
JPH03255511A (en) Computer device
JP2973503B2 (en) Timer using microcomputer
JPS6115217A (en) Cut-off controller for application of power supply
JP2513032B2 (en) Microcomputer input control circuit
JPS61136115A (en) Basic clock generating circuit of microcomputer system
JPH04178713A (en) Microcomputer
JPH06197577A (en) Controller
JPH0469376B2 (en)
JPS6327930A (en) Interruption control circuit
JPH03282626A (en) Interruption selection system
JPH0370014A (en) Reset control system