JPH04175937A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH04175937A
JPH04175937A JP2305497A JP30549790A JPH04175937A JP H04175937 A JPH04175937 A JP H04175937A JP 2305497 A JP2305497 A JP 2305497A JP 30549790 A JP30549790 A JP 30549790A JP H04175937 A JPH04175937 A JP H04175937A
Authority
JP
Japan
Prior art keywords
timer
reload
overflow signal
set values
signal
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
JP2305497A
Other languages
Japanese (ja)
Inventor
Hideo Yamashita
山下 秀夫
Shiyuuji Kumise
修二 久見瀬
Hideo Matsui
秀夫 松井
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 JP2305497A priority Critical patent/JPH04175937A/en
Publication of JPH04175937A publication Critical patent/JPH04175937A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE:To eliminate the need to rewrite the set values of reload registers to be supplied to a timer every time the counted value of the timer reaches a specific value to enter an overflow state and to make time intervals of the output of an overflow signal different by providing the single timer and plural reload registers. CONSTITUTION:The microcomputer is equipped with the single timer 6 and reload registers 5A and 5B. When the set values of the reload registers 5A and 5B are supplied to the timer 6, the timer 6 counts the supplied counted values and outputs the overflow signal Sv when reaching the set values to send the set values of the different reload registers 5A and 5B to the timer. The timer 6 begins to count the set values supplied from the different reload registers every time the overflow signal Sv is outputted. Consequently, every time the timer 6 outputs the overflow signal Sv, the time intervals of the output of the overflow signal Sv by the timer 6 are made different without varying the set values of the reload registers 5A and 5B.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はタイマ及びリロードレジスタを内蔵しているマ
イクロコンピュータに関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcomputer incorporating a timer and a reload register.

〔従来の技術〕[Conventional technology]

第2図はタイマ及びリロードレジスタを内蔵している従
来のマイクロコンピュータのブロック図である。タイマ
6にはカウントソース入力線1を介してカウントソース
C3が与えられ、リロード線2を介してリロードレジス
タ5の設定値が与えられる。タイマ6のオーバフロー信
号たる出力信号S0は、出力信号線3へ出力され、割込
み要求信号SAは割込み信号線4へ出力される。
FIG. 2 is a block diagram of a conventional microcomputer with a built-in timer and reload register. A count source C3 is applied to the timer 6 via a count source input line 1, and a set value of a reload register 5 is applied via a reload line 2. The output signal S0, which is the overflow signal of the timer 6, is output to the output signal line 3, and the interrupt request signal SA is output to the interrupt signal line 4.

次にこのマイクロコンピュータの動作を説明するタイマ
6はカウントソース入力線1から与えられたカウントソ
ースC8を計数し、タイマ6の計数値がそれに与えられ
ている設定値に達してオーバフローすると出力信号線3
の出力信号S0を反転させるとともに、割込み要求信号
線4の割込み要求信号SAを“H”レベルに設定する。
Next, the operation of this microcomputer will be explained. Timer 6 counts the count source C8 given from count source input line 1, and when the count value of timer 6 reaches the set value given to it and overflows, the output signal line 3
At the same time, the interrupt request signal SA on the interrupt request signal line 4 is set to the "H" level.

また同時に、リロードレジスタ5の設定値をタイマ6に
与える。
At the same time, the set value of the reload register 5 is given to the timer 6.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

前述した従来のマイクロコンピュータのタイマは、リロ
ードレジスタから与えられた設定値に応じた所定時間間
隔でオーバフロー信号を出力する。
The conventional microcomputer timer described above outputs an overflow signal at predetermined time intervals according to a set value given from a reload register.

そのためオーバフロー信号を出力する時間間隔を変更す
る場合は、タイマの計数値が所定値に達してオーバフロ
ーした後に、次の設定値をリロードレジスタに与える必
要がある。あるいは設定値が異なるタイマを複数個用い
る必要がある。しかし、マイクロコンピュータに内蔵さ
れているタイマはその数に限度があるため、異なる設定
値を設ける数が限定されるという問題がある。
Therefore, when changing the time interval for outputting the overflow signal, it is necessary to apply the next set value to the reload register after the timer count reaches a predetermined value and overflows. Alternatively, it is necessary to use multiple timers with different set values. However, since there is a limit to the number of timers built into a microcomputer, there is a problem in that the number of different setting values that can be provided is limited.

本発明は斯かる問題に鑑み、タイマの計数値が所定値に
達してオーバフローする都度、タイマに与えるリロード
レジスタの設定値を書換える必要がなく、オーバフロー
信号が出力される時間間隔を異ならせ得るマイクロコン
ピュータを提供することを目的とする。
In view of this problem, the present invention eliminates the need to rewrite the set value of the reload register given to the timer each time the count value of the timer reaches a predetermined value and overflows, and the time interval at which the overflow signal is output can be made different. The purpose is to provide microcomputers.

〔課題を解決するための手段〕[Means to solve the problem]

本発明に係るマイクロコンピュータは、単一のタイマと
複数のリロードレジスタとを備えて構成する。
A microcomputer according to the present invention includes a single timer and a plurality of reload registers.

〔作用〕[Effect]

リロードレジスタの設定値をタイマに与える。 Give the reload register setting value to the timer.

タイマは与えられた設定値を計数し、設定値に達すると
オーバフロー信号を出力する。オーバフロー信号を出力
すると、異なるリロードレジスタの設定値をタイマに与
える。それによりタイマはオーバフロー信号を出力する
都度、異なるリロードレジスタから与えられた設定値の
計数を開始する。
The timer counts the given set value and outputs an overflow signal when the set value is reached. When an overflow signal is output, a different reload register setting value is given to the timer. Thereby, each time the timer outputs an overflow signal, it starts counting the set value given from a different reload register.

よって、タイマがオーバフロー信号を出力する都度、リ
ロードレジスタの設定値を変更せずに、タイマがオーバ
フロー信号を出力する時間間隔を異ならせることができ
る。
Therefore, each time the timer outputs an overflow signal, the time interval at which the timer outputs the overflow signal can be varied without changing the set value of the reload register.

〔実施例〕〔Example〕

以下本発明をその実施例を示す図面により詳述する。 The present invention will be described in detail below with reference to drawings showing embodiments thereof.

第1図は本発明に係るマイクロコンピュータのブロック
図である。タイマ6には、カウントソース入力線1を介
してカウントソースCsが与えられ、タイマ6の計数値
が設定値に達したときにタイマ6が出力するオーバフロ
ー信号Svはフリップフロップ7へ与えられる。フリッ
プフロップ7は出力信号線3へ出力信号S0を出力し、
割込み要求信号線4へ割込み要求信号SAを出力する。
FIG. 1 is a block diagram of a microcomputer according to the present invention. A count source Cs is applied to the timer 6 via the count source input line 1, and an overflow signal Sv outputted from the timer 6 when the count value of the timer 6 reaches a set value is applied to the flip-flop 7. The flip-flop 7 outputs an output signal S0 to the output signal line 3,
An interrupt request signal SA is output to the interrupt request signal line 4.

前記カウントソースC3及び前記オーバフロー信号S0
は、夫々3人カアンド回路(以下アンド回路という)8
,9の入力端子へ入力される。フリップフロップ7の出
力信号S0はアンド回路8の入力端子及びアンド回路9
のローアクティブの入力端子へ入力される。リロードレ
ジスタ5Aのりロード信号SLは3ステートバツフア(
以下バッファというNO及びリロード線2を介して前記
タイマ6へ、リロードレジスタ5Bのりロード信号S。
The count source C3 and the overflow signal S0
are respectively three-person AND circuits (hereinafter referred to as AND circuits) 8
, 9 are input to the input terminals. The output signal S0 of the flip-flop 7 is connected to the input terminal of the AND circuit 8 and the AND circuit 9.
is input to the low active input terminal of The reload register 5A reload signal SL is a 3-state buffer (
A load signal S from the reload register 5B is sent to the timer 6 via the NO and reload lines 2, hereinafter referred to as buffers.

はバッファ11及びリロード線2を介してタイマ6へ与
えられる。バッファ10にはアンド回路8の出力が与え
られ、バッファ11にはアンド回路9の出力が与えられ
る。
is applied to the timer 6 via the buffer 11 and the reload line 2. The output of the AND circuit 8 is applied to the buffer 10, and the output of the AND circuit 9 is applied to the buffer 11.

次にこのように構成したマイクロコンピュータの動作を
説明する。
Next, the operation of the microcomputer configured as described above will be explained.

いま、例えばリロードレジスタ5八に、リロードレジス
タ5Bの設定値より大きい設定値を設定し、初めにリロ
ードレジスタ5Aの設定値のりロード信号S、をバッフ
ァ10及びリロード線2を介してタイマ6に与え、フリ
ップフロップ7をセット状態にするものとする。タイマ
6はカウントソースC8を計数し、計数値が設定値に達
するとタイマ6は“H″レベルオーバフロー信号Svを
出力し、それがフリップフロップ7へ与えられてフリッ
プフロップ7の出力信号S0は“L”レベルに保持され
る。それによりアンド回路8の入力端子には“L”レベ
ルの出力信号S0が入力されて論理が不成立になり、バ
ッファ10はオフ状態になる。−方、アンド回路9のロ
ーアクティブの入力2端子には“L″レベル出力信号S
0が入力されて、論理が成立し、アンド回路9の出力に
よってバッファ11がオン状態になる。そうすると、リ
ロードレジスタ5Bの設定値のりロード信号SLがバッ
ファ11及びリロード線2を介してタイマ6に与えられ
る。そしてタイマ6は新たに与えられた設定値に計数値
が達すると“H”レベルのオーバフロー信号Svをフリ
ップフロップ7へ入力し、その出力は“H”レベルに反
転して保持される。それによりアンド回路9のローアク
ティブの入力端子に“H”レベルの出力信号S0が入力
されて、その論理が不成立になり、一方、アンド回路8
の論理が成立する。そしてアンド回路8の出力がバッフ
ァ10に与えられてバッファ10はオン状態になり、リ
ロードレジスタ5への設定値がタイマ6に与えられる。
Now, for example, a set value larger than the set value of the reload register 5B is set in the reload register 58, and a load signal S with the set value of the reload register 5A is first given to the timer 6 via the buffer 10 and the reload line 2. , the flip-flop 7 is set. The timer 6 counts the count source C8, and when the count value reaches the set value, the timer 6 outputs the "H" level overflow signal Sv, which is applied to the flip-flop 7, and the output signal S0 of the flip-flop 7 becomes " It is held at "L" level. As a result, the "L" level output signal S0 is input to the input terminal of the AND circuit 8, the logic is not established, and the buffer 10 is turned off. - On the other hand, the low active input 2 terminal of the AND circuit 9 receives the "L" level output signal S.
0 is input, the logic is established, and the output of the AND circuit 9 turns the buffer 11 on. Then, a load signal SL with the set value of the reload register 5B is applied to the timer 6 via the buffer 11 and the reload line 2. When the count value reaches the newly given set value, the timer 6 inputs an "H" level overflow signal Sv to the flip-flop 7, and its output is inverted and held at the "H" level. As a result, the "H" level output signal S0 is input to the low active input terminal of the AND circuit 9, and the logic is not established.
The logic holds true. Then, the output of the AND circuit 8 is applied to the buffer 10 to turn the buffer 10 on, and the set value to the reload register 5 is applied to the timer 6.

このようにしてタイマ6がオーバフロー信号Svを出力
する都度、リロードレジスタ5への設定値と、リロード
レジスタ5Bの設定値とが交互にタイマ6に与えられる
。そしてタイマ6がリロードレジスタ論から与えられた
設定値を計数する場合にはオーバフロー信号Svが出力
されるまでの時間が長くなり、リロードレジスタ5Bか
ら与えられた設定値を計数する場合にはオーバフロー信
号Svが出力されるまでの時間が短くなり、オーバフロ
ー信号Svが“H”レベルにある時間と“L”レベルに
ある時間が相異する。それにより、フリップフロップ7
が出力する出力信号S0及び割込み要求信号SAのパル
スのデユティを適宜設定できる。
In this way, each time the timer 6 outputs the overflow signal Sv, the set value to the reload register 5 and the set value to the reload register 5B are alternately given to the timer 6. When the timer 6 counts the set value given from the reload register theory, it takes a long time until the overflow signal Sv is output, and when the timer 6 counts the set value given from the reload register 5B, the overflow signal The time until Sv is output is shortened, and the time the overflow signal Sv is at "H" level and the time it is at "L" level are different. Thereby, flip-flop 7
The duty of the pulses of the output signal S0 and the interrupt request signal SA output by the controller can be set as appropriate.

そして、リロードレジスタ5A、5Bの設定値を書換え
しなくても出力信号S0のデユティ又は割込み要求信号
Saを出力する時間間隔を異ならせることができる。
Furthermore, the duty of the output signal S0 or the time interval for outputting the interrupt request signal Sa can be varied without rewriting the set values of the reload registers 5A and 5B.

なお、リロードレジスタ5A又は5Bの設定値あるいは
リロードレジスタ5A及び5Bの設定値を変更すれば、
出力信号S0のデユティを変更でき、また割込み要求信
号SAを出力する時間間隔を変更することができる。こ
の場合、タイマ6の動作を中止させてリロードレジスタ
5A 、 5Bの設定値を書換えるのが望ましい。
In addition, if you change the setting value of reload register 5A or 5B or the setting value of reload register 5A and 5B,
The duty of the output signal S0 can be changed, and the time interval for outputting the interrupt request signal SA can be changed. In this case, it is desirable to stop the operation of the timer 6 and rewrite the set values of the reload registers 5A and 5B.

本実施例ではりロード4レジスタ5Aの設定値を、リロ
ードレジスタ5Bの設定値より大きくしたが、それは単
なる例示である。またリロードレジスタの数は2個に限
定されるものではない。
In this embodiment, the setting value of the load 4 register 5A is set larger than the setting value of the reload register 5B, but this is merely an example. Further, the number of reload registers is not limited to two.

〔発明の効果〕〔Effect of the invention〕

以上詳述したように本発明は、単一のタイマと、複数の
リロードレジスタとを用いて、リロードレジスタの設定
値を変更せずに出力信号のデユティを適宜に設定できる
。そのためマイクロコンピュータのタイマの使用効率を
高め得るマイクロコンピュータを提供できる優れた効果
を奏する。
As described in detail above, the present invention uses a single timer and a plurality of reload registers to appropriately set the duty of the output signal without changing the set value of the reload register. Therefore, it is possible to provide a microcomputer that can improve the efficiency of using the timer of the microcomputer.

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

第1図は本発明に係るマイクロコンピュータのブロック
図、第2図は従来のマイクロコンピュータのブロック図
である。 5A 、 5B・・・リロードレジスタ 6・・・タイ
マ7・・・フリップフロップ 8.9・・・アンド回路
10.11・・・3ステートバツフア なお、図中、同一符号は同一、又は相当部分を示す。 代理人    大   岩   増  雄S^ 第   2   図
FIG. 1 is a block diagram of a microcomputer according to the present invention, and FIG. 2 is a block diagram of a conventional microcomputer. 5A, 5B... Reload register 6... Timer 7... Flip-flop 8.9... AND circuit 10.11... 3-state buffer Note that in the figures, the same reference numerals are the same or equivalent parts. shows. Agent Masuo Oiwa S^ Figure 2

Claims (1)

【特許請求の範囲】[Claims] (1)リロードレジスタから与えられた設定値を計数す
るタイマの設定値を変更すべく構成してあるマイクロコ
ンピュータにおいて、 単一のタイマと、複数のリロードレジスタとを備え、タ
イマの計数値がそれに与えた設定値に達した場合に、タ
イマがオーバフロー信号を出力し、出力する都度、各リ
ロードレジスタの設定値を順次にタイマに与えるべく構
成してあることを特徴とするマイクロコンピュータ。
(1) In a microcomputer configured to change the setting value of a timer that counts the setting value given from the reload register, it is equipped with a single timer and multiple reload registers, and the count value of the timer is changed accordingly. A microcomputer characterized in that the timer outputs an overflow signal when a given set value is reached, and each time the timer outputs an overflow signal, the set values of each reload register are sequentially given to the timer.
JP2305497A 1990-11-08 1990-11-08 Microcomputer Pending JPH04175937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2305497A JPH04175937A (en) 1990-11-08 1990-11-08 Microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2305497A JPH04175937A (en) 1990-11-08 1990-11-08 Microcomputer

Publications (1)

Publication Number Publication Date
JPH04175937A true JPH04175937A (en) 1992-06-23

Family

ID=17945878

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2305497A Pending JPH04175937A (en) 1990-11-08 1990-11-08 Microcomputer

Country Status (1)

Country Link
JP (1) JPH04175937A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6016521A (en) * 1997-12-01 2000-01-18 Mitsubishi Electric Semiconductor Systems Corporation Communication control device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6016521A (en) * 1997-12-01 2000-01-18 Mitsubishi Electric Semiconductor Systems Corporation Communication control device

Similar Documents

Publication Publication Date Title
US5448743A (en) General I/O port interrupt mechanism
JPH04175937A (en) Microcomputer
JPH06348507A (en) Microcomputer
JPH02125518A (en) Semiconductor integrated circuit
JP2754654B2 (en) Microcomputer output control circuit
JPH0427730B2 (en)
JPH027616A (en) Timer circuit
JP3144811B2 (en) Monitoring timer circuit
KR100256230B1 (en) Timer unit with system watchdog function
JPH0341812A (en) Duty ratio variable pulse generating circuit
JP2002076884A (en) Pulse swallow system pll circuit
JPH01280918A (en) Interval timer
JPH047773A (en) Dma controller
JPS60249417A (en) Gate signal delay circuit
JPH0883242A (en) Arbiter circuit
JPH04150614A (en) Integrated circuit device
JPH0580089A (en) Timer device
JPS6361805B2 (en)
JPH0453450B2 (en)
JPS60258650A (en) Timer device of microcomputer
JPS6010355A (en) Measuring system of activity ratio of central processing unit
JPH03242776A (en) Microcomputer
JPS58103016A (en) Power supply controller for buffer circuit
JPS6393220A (en) Logic integrated circuit
JPH04308909A (en) Pulse generator