JPH05119166A - Microcomputer timer - Google Patents

Microcomputer timer

Info

Publication number
JPH05119166A
JPH05119166A JP3306571A JP30657191A JPH05119166A JP H05119166 A JPH05119166 A JP H05119166A JP 3306571 A JP3306571 A JP 3306571A JP 30657191 A JP30657191 A JP 30657191A JP H05119166 A JPH05119166 A JP H05119166A
Authority
JP
Japan
Prior art keywords
timer
reload
register
memory
microcomputer
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
JP3306571A
Other languages
Japanese (ja)
Inventor
Akio Kiji
昭雄 木地
Koji Kitora
孝次 木寅
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 JP3306571A priority Critical patent/JPH05119166A/en
Publication of JPH05119166A publication Critical patent/JPH05119166A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P20/00Technologies relating to chemical industry
    • Y02P20/50Improvements relating to the production of bulk chemicals
    • Y02P20/52Improvements relating to the production of bulk chemicals using catalysts, e.g. selective catalysts

Landscapes

  • Measurement Of Predetermined Time Intervals (AREA)

Abstract

PURPOSE:To sequentially change the timer values of a timer incorporated in a microcomputer without using a CPU. CONSTITUTION:A microcomputer timer comprises a counter/decoder 2 with (n) reload registers 3(0) to 3(n-1) connected to one timer 1 for incrementing within a range of 0 to (n-1) with an overflow signal of the timer 1 and selecting one of the reload registers by decoding the counter value, a ROM file comprising (n) words X (m) for setting the timer value and a memory address instructing means 5 for outputting a ROM address pointer for instructing a ROM file address. Therefore a regular layout method is possible, wherein it is advantageous especially in a layout when numerous timer values are to be set. In addition the CPU load is light even if the timer values are to be sequentially changed.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、タイマに関するもの
で、特にマイクロコンピュータに内蔵した場合にハード
ウエアの構成を小さくでき、またタイマに設定するタイ
マ値を次々と変更していく場合にCPUの負荷が軽減で
きるマイクロコンピュータ用タイマに関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a timer, and particularly when it is incorporated in a microcomputer, the hardware configuration can be reduced, and when the timer value set in the timer is changed one after another, The present invention relates to a microcomputer timer that can reduce the load.

【0002】[0002]

【従来の技術】図2は従来のマイクロコンピュータ用タ
イマの一例を示すブロック図である。1はタイマ、6は
コンペアレジスタ、7はタイマ1とコンペアレジスタ6
からの信号を入力し、これらの入力した信号が一致して
いると一致検出信号を出力する一致検出回路である。
2. Description of the Related Art FIG. 2 is a block diagram showing an example of a conventional microcomputer timer. 1 is a timer, 6 is a compare register, 7 is a timer 1 and a compare register 6
Is a match detection circuit that outputs a match detection signal when these input signals match.

【0003】次に動作について説明する。タイマ1は図
示しないカウントソースの入力によりカウント値が刻々
と変化している。コンペアレジスタ6には、タイマ1と
比較して検出する所定のタイマ値がCPU8により次々
に書込まれている。一致検出回路7は、カウントソース
の入力により変化するタイマ1のカウント値とコンペア
レジスタ6のタイマ値との一致を一致検出回路7によっ
て検出し、一致検出信号を出力する。
Next, the operation will be described. The count value of the timer 1 is changing every moment by the input of a count source (not shown). Predetermined timer values detected by comparison with the timer 1 are successively written in the compare register 6 by the CPU 8. The coincidence detection circuit 7 detects the coincidence between the count value of the timer 1 and the timer value of the compare register 6 which changes depending on the input of the count source, and outputs a coincidence detection signal.

【0004】[0004]

【発明が解決しようとする課題】従来のタイマは、上記
のように構成されているので、コンペアレジスタ6のタ
イマ値を設定する場合、設定できる比較時間数がハード
ウエアが備えているコンペアレジスタ6の数によって決
まってしまう。また、コンペアレジスタのタイマ値を次
々と変化させていく場合には、CPUへの負荷が大き
く、ハードウエアの構成も膨大となるという問題点があ
った。
Since the conventional timer is configured as described above, when the timer value of the compare register 6 is set, the compare register 6 provided in the hardware has a settable number of comparison times. It depends on the number of. Further, when the timer value of the compare register is changed one after another, there is a problem that the load on the CPU is large and the hardware configuration becomes enormous.

【0005】この発明は、上記のような問題点を解決す
るためになされたもので、CPUへの負荷が小さく、高
集積化できるコンピュータ用タイマを得ることを目的と
する。
The present invention has been made to solve the above problems, and an object thereof is to obtain a computer timer which has a small load on the CPU and can be highly integrated.

【0006】[0006]

【課題を解決するための手段】この発明に係るマイクロ
コンピュータ用タイマは、タイマ値を格納する複数のメ
モリ領域より成るROMファイル等のメモリ(ROMフ
ァイル4)と、このメモリを指示するメモリアドレス指
示手段5と、上記タイマ値をそれぞれ保持する複数のリ
ロードレジスタ3(0)〜3(n−1)と、所定のリロ
ードレジスタに保持されているタイマ値がセットされる
と、このタイマ値までの計時を開始し、計時が終了する
とオーバーフロー信号を出力するタイマ1と、上記オー
バーフロー信号を受ける毎にカウントアップしてカウン
トした数値をデコードして上記リロードレジスタを順次
選択していくレジスタ選択手段(カウンタ/デコーダ
2)とから成ることを特徴とするマイクロコンピュータ
用タイマ。
A microcomputer timer according to the present invention includes a memory (ROM file 4) such as a ROM file including a plurality of memory areas for storing timer values, and a memory address instruction for instructing the memory. When the means 5 and a plurality of reload registers 3 (0) to 3 (n-1) respectively holding the timer value and the timer value held in a predetermined reload register are set, the timer values up to this timer value are set. A timer 1 that starts timing and outputs an overflow signal when the timing ends, and a register selection means (counter that sequentially counts up by counting up each time the overflow signal is received and decodes the counted number to select the reload register). / Decoder 2).

【0007】[0007]

【作用】この発明によれば、nワード×mにより構成さ
れる上記メモリにより、リロードレジスタのタイマ値を
n個の上記リロードレジスタに一括転送できるため、設
定できる比較時関数をリロードレジスタの数だけ確保す
ることが可能である。また、リロードレジスタの書換え
はメモリアドレス指示手段で指定されるリロードレジス
タのタイマ値をメモリよりリロードレジスタに一括転送
できるので、メモリアドレス指示手段の示すメモリ領域
のアドレスの書換え時のみCPUが関与するため、CP
Uの負荷が軽減できる。
According to the present invention, since the timer value of the reload register can be collectively transferred to the n reload registers by the memory configured by n words × m, as many comparison time functions as can be set can be set. It is possible to secure. Further, since the reload register timer value of the reload register designated by the memory address designating means can be transferred from the memory to the reload register all at once, the CPU is involved only when rewriting the address of the memory area indicated by the memory address designating means. , CP
The load on U can be reduced.

【0008】[0008]

【実施例】図1は、この発明の一実施例を示すマイクロ
コンピュータ用タイマのブロック図である。図1におい
て、1はタイマ、2はタイマ1のオーバーフロー信号を
インクリメントしデコードするレジスタ選択手段として
のカウンタ/デコーダ、3はタイマ1にタイマ値を出力
するn個(0〜n−1)のリロードレジスタ、4はn個
のリロードレジスタ3のタイマ値を記憶し、一括転送す
るnワード×mにより構成されるメモリとしてのROM
ファイル、5はリロードレジスタ3に一括転送するデー
タが格納されているnワード分のROMファイルのアド
レス(0〜m−1)を指定するROMアドレスポインタ
を出力するメモリアドレス指示手段である。
1 is a block diagram of a microcomputer timer according to an embodiment of the present invention. In FIG. 1, reference numeral 1 is a timer, 2 is a counter / decoder as a register selecting means for incrementing and decoding an overflow signal of the timer 1, and 3 is a reloader of n (0 to n-1) for outputting a timer value to the timer 1. Registers 4 are ROMs that store the timer values of n reload registers 3 and that are collectively transferred by n words × m.
Files 5 are memory address designating means for outputting a ROM address pointer for designating an address (0 to m-1) of an n-word ROM file in which data to be collectively transferred to the reload register 3 is stored.

【0009】メモリアドレス指示手段5は、CPUの指
示により、0〜m−1のROMアドレスポインタをRO
Mファイル4に送出し、メモリ領域を指定する。ROM
ファイル4はメモリアドレス指示手段5で指示されたメ
モリ領域に、リロードレジスタ3(0)〜3(n−1)
に転送するnワード分のタイマ値を記憶している。リロ
ードレジスタ3(0)〜(n−1)は、カウンタ/デコ
ーダ2で指示されたリロードレジスタからタイマ値をタ
イマに送出する。タイマ1は、送られてきたタイマ値ま
でカウントし、そのカウントを終了すると、カウンタ/
デコーダ2に対してオーバーフロー信号を出力する。カ
ウンタ/デコーダ2は、オーバーフロー信号毎にインク
リメントし、現在のカウント値を順次デコードしてリロ
ードレジスタの1つに出力し、そのリロードレジスタを
選択する。
The memory address designating means 5 sets the ROM address pointers 0 to m-1 to RO according to the instruction of the CPU.
Send to M file 4 and specify memory area. ROM
The file 4 is stored in the memory area designated by the memory address designating means 5 in the reload registers 3 (0) to 3 (n-1).
The timer value for n words to be transferred to is stored. The reload registers 3 (0) to (n-1) send the timer value from the reload register designated by the counter / decoder 2 to the timer. The timer 1 counts up to the sent timer value, and when the count is finished, the counter / counter
The overflow signal is output to the decoder 2. The counter / decoder 2 increments for each overflow signal, sequentially decodes the current count value, outputs it to one of the reload registers, and selects the reload register.

【0010】次に動作について説明する。n個のリロー
ドレジスタ3と接続されているタイマ1からのオーバー
フロー信号により、カウンタ/デコーダ2は、0〜n−
1の範囲でインクリメント(0→1→2→…→n−2→
n−1→0→1→…)してカウントする。そして、この
時のカウント値をデコードし、上記n個のリロードレジ
スタ3(0)〜3(n−1)のうち1つのリロードレジ
スタ(例えばリロードレジスタ3(1))を順次指定す
る。その指定されたリロードレジスタ3(1)からタイ
マ1にタイマ値が転送される。また、上記タイマ値はメ
モリアドレス指示手段からROMアドレスポインタによ
り指定されたROMファイル4のk番目(0≦k≦m−
1)のメモリ領域に格納されたnワード×mで構成され
たROMファイル4のメモリ領域からリロードレジスタ
3(0)〜3(n−1)に一括転送される。
Next, the operation will be described. Due to the overflow signal from the timer 1 connected to the n reload registers 3, the counter / decoder 2 has 0-n-
Increment in the range of 1 (0 → 1 → 2 → ... → n-2 →
n-1 → 0 → 1 → ...) and count. Then, the count value at this time is decoded, and one of the n reload registers 3 (0) to 3 (n-1) is sequentially designated (for example, the reload register 3 (1)). The timer value is transferred from the designated reload register 3 (1) to timer 1. Further, the timer value is the k-th (0≤k≤m- of the ROM file 4 designated by the ROM address pointer from the memory address designating means.
The data is collectively transferred from the memory area of the ROM file 4 configured by n words × m stored in the memory area 1) to the reload registers 3 (0) to 3 (n-1).

【0011】[0011]

【発明の効果】以上のように、この発明によれば、メモ
リからの一括転送でリロードレジスタのタイマ値をCP
Uを介さずに書換える構成としたため、書換え動作にC
PUを介していないので、CPUの負荷が軽くなるとい
う効果がある。さらに、規則的なレイアウト方式をとる
ことが可能であり、特に設定するタイマ値が多い時に、
レイアウト上有利となり、高集積化できるという効果も
ある。
As described above, according to the present invention, the timer value of the reload register is set to CP by the batch transfer from the memory.
Since it is configured to rewrite without going through U, the C
Since it does not go through the PU, the load on the CPU is lightened. Furthermore, it is possible to adopt a regular layout method, especially when there are many timer values to set.
This is advantageous in terms of layout and has the effect of achieving high integration.

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

【図1】この発明の一実施例を示すマイクロコンピュー
タ用タイマのブロック図である。
FIG. 1 is a block diagram of a microcomputer timer according to an embodiment of the present invention.

【図2】従来のマイクロコンピュータ用タイマを示す図
である。
FIG. 2 is a diagram showing a conventional microcomputer timer.

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

1 タイマ 2 カウンタ/デコーダ 3 リロードレジスタ 4 ROMファイル 5 メモリアドレス指示手段 6 コンペアレジスタ 7 一致検出回路 1 Timer 2 Counter / Decoder 3 Reload Register 4 ROM File 5 Memory Address Instructing Means 6 Compare Register 7 Match Detection Circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 タイマ値を格納する複数のメモリ領域よ
り成るROMファイル等のメモリと、このメモリを指示
するメモリアドレス指示手段と、上記タイマ値をそれぞ
れ保持する複数のリロードレジスタと、所定のリロード
レジスタに保持されているタイマ値がセットされると、
このタイマ値までの計時を開始し、計時が終了するとオ
ーバーフロー信号を出力するタイマと、上記オーバーフ
ロー信号を受ける毎にカウントアップしてカウントした
数値をデコードして上記リロードレジスタを順次選択し
ていくレジスタ選択手段とから成ることを特徴とするマ
イクロコンピュータ用タイマ。
1. A memory such as a ROM file including a plurality of memory areas for storing a timer value, a memory address designating means for designating the memory, a plurality of reload registers for respectively holding the timer values, and a predetermined reload. When the timer value held in the register is set,
A timer that starts counting up to this timer value and outputs an overflow signal when the timing ends, and a register that counts up each time the overflow signal is received and decodes the counted value to sequentially select the reload register. A timer for a microcomputer, comprising a selecting means.
JP3306571A 1991-10-25 1991-10-25 Microcomputer timer Pending JPH05119166A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3306571A JPH05119166A (en) 1991-10-25 1991-10-25 Microcomputer timer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3306571A JPH05119166A (en) 1991-10-25 1991-10-25 Microcomputer timer

Publications (1)

Publication Number Publication Date
JPH05119166A true JPH05119166A (en) 1993-05-18

Family

ID=17958663

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3306571A Pending JPH05119166A (en) 1991-10-25 1991-10-25 Microcomputer timer

Country Status (1)

Country Link
JP (1) JPH05119166A (en)

Similar Documents

Publication Publication Date Title
EP0221577B1 (en) Microprogram control unit
JPH0235523A (en) Flexible asic microcomputer
JP3188467B2 (en) Minimum / maximum value search device
EP0054243A2 (en) Memory controlling apparatus
JPH05250305A (en) Data transfer control system
US4446517A (en) Microprogram memory with page addressing and address decode in memory
JP2845433B2 (en) Integrated circuit device
EP0229734A2 (en) Microprogram control device
EP0730219A2 (en) Method and apparatus for generating a zero bit status flag in a microprocessor
US5467454A (en) Bus use request adjusting apparatus allowing changing priority levels
US4827405A (en) Data processing apparatus
JPH05119166A (en) Microcomputer timer
US5454097A (en) Cascadable peripheral data interface including a shift register, counter, and randomly-accessed registers of different bit length
US5640548A (en) Method and apparatus for unstacking registers in a data processing system
EP0843253A1 (en) A method for reducing the number of bits needed for the representation of constant values in a data processing device
US5463747A (en) Microprogram data processor processing operand address calculation and instruction execution with common hardware
JP2694401B2 (en) Timer circuit
JP2692444B2 (en) Timer device
JPS6230455B2 (en)
JP2918570B2 (en) Central processing unit
JPH02143361A (en) Processing sequence deciding circuit
JP2985201B2 (en) Microcomputer
KR100247062B1 (en) Fifo method and circuit having ring structure
SU758126A1 (en) Interface
JP2913702B2 (en) Access reception control method of multiprocessor system