JPS6330921A - Timer circuit - Google Patents
Timer circuitInfo
- Publication number
- JPS6330921A JPS6330921A JP61175011A JP17501186A JPS6330921A JP S6330921 A JPS6330921 A JP S6330921A JP 61175011 A JP61175011 A JP 61175011A JP 17501186 A JP17501186 A JP 17501186A JP S6330921 A JPS6330921 A JP S6330921A
- Authority
- JP
- Japan
- Prior art keywords
- counter
- port
- data
- cpu
- timer circuit
- 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.)
- Granted
Links
- 238000010586 diagram Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野〕
本発明は、CPUで制御され、時間管理されたシリアル
信号を送出するタイマー回路に関する。DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a timer circuit that is controlled by a CPU and sends out time-managed serial signals.
第3図はこの種のタイマー回路の従来例を会むマイクロ
コンピュータのブロック図、第4図はCPUIの命令の
シーケンス図、第5図はシリアル信号のフォーマット図
である。FIG. 3 is a block diagram of a microcomputer showing a conventional example of this type of timer circuit, FIG. 4 is a sequence diagram of CPUI commands, and FIG. 5 is a serial signal format diagram.
このタイマー回路は、シリアル信号を構成するパルスの
時間とレベルがそれぞれCPU1からデータバス5によ
り設定されるカウンタ4とポート3から構成されている
。この場合、第5図に示すように、シリアル信号の値“
0″は時間Tのハイレベルとそれに続くロウレベルで表
わされ、値゛1”は時間Tのハイレベルとそれに続く時
間2Tのロウレベルで表わされる。このシリアル信号を
タイマー回路にセットするには、第4図に示すように、
まず最初の命令サイクルで、アドレスバス8.アドレス
デコーダ7を介してポート3を選択し、“1”または“
0”をセットし、次の命令サイクルでカウンタ4を選択
し、Tまたは2Tに相当する値をセットする。This timer circuit is composed of a counter 4 and a port 3, in which the time and level of pulses constituting the serial signal are set by the CPU 1 via a data bus 5, respectively. In this case, as shown in Fig. 5, the value of the serial signal “
0'' is represented by a high level at time T followed by a low level, and a value "1" is represented by a high level at time T and a subsequent low level at time 2T. To set this serial signal in the timer circuit, as shown in Figure 4,
In the first instruction cycle, address bus 8. Select port 3 via address decoder 7 and select “1” or “
0", and in the next instruction cycle select counter 4 and set the value corresponding to T or 2T.
カウンタ4が時間データをπ1数し終ると、制御信号バ
ス6よりCPU1へ割り込み信号を送る。When the counter 4 completes counting the time data by π1, it sends an interrupt signal to the CPU 1 from the control signal bus 6.
これにより、CP(J 1は再び前述した命令を実行し
、ポート3.カウンタ4のデータを更新する。As a result, CP(J1) executes the above-mentioned instruction again and updates the data of port 3.counter 4.
以後この動作を繰り返して、シリアル信号が送出される
。Thereafter, this operation is repeated and a serial signal is sent out.
上述した従来のタイマー回路は、カウンタとポートは別
々に設けdれ″tアドレスが異なり、シリアルデータを
1データ設定するのに2つの命令が必要なため、以下に
示すような欠点がある。The conventional timer circuit described above has the following drawbacks because the counter and the port are provided separately and have different addresses, and two instructions are required to set one piece of serial data.
■ ポートにデータがセットされた時間とカウンタにデ
ータがセットされた時間が1命令分ずれてしまうので、
カウンタに設定される値に補正を加えなければならない
。■ The time when data is set to the port and the time when data is set to the counter are different by one instruction.
Corrections must be made to the values set in the counters.
■ また、ポートとカウンタへ何度もデータをセットし
なければならないため、プログラム容量が大きい場合は
よいが、小さいと必らず問題となって来ると同時に、最
近のマイクロコンピュータ等は高速動作を要求されてい
るためシリアル信号出力のために、それほど時間をかけ
られない。■ Also, since data must be set to ports and counters many times, it is fine if the program capacity is large, but if it is small, it will inevitably become a problem. Since it is required, it does not take much time to output the serial signal.
■ ポートとカウンタはそれぞれ別のアドレスを有する
のでアドレスレコーダが大きくなると同時に、もしポー
トに送るデータとカウンタに送るデータを蓄えておかな
ければならないときには、別々のレジスタが必要となり
、レジスタが増加してしまう。■ Ports and counters each have different addresses, so the address recorder becomes larger, and if you need to store data sent to the port and data sent to the counter, separate registers are required, and the number of registers increases. Put it away.
本発明のタイマー回路は、カウンタとポートが一体化さ
れ、同一アドレスが付与されていることを特徴とする。The timer circuit of the present invention is characterized in that a counter and a port are integrated and assigned the same address.
次に、本発明の実施例について図面を参照して説明する
。Next, embodiments of the present invention will be described with reference to the drawings.
第1図は本発明のタイマー回路の一実施例を含むマイク
ロコンピュータのブロック図、第2図はcpuiの命令
のシーケンス図である。第3図中と同番号のものは同じ
らのを示す。FIG. 1 is a block diagram of a microcomputer including an embodiment of the timer circuit of the present invention, and FIG. 2 is a sequence diagram of CPU instructions. The same numbers as in FIG. 3 indicate the same items.
ポート3とカウンタ4は一体化されタイマー回路2とし
て一つのアドレスを有し、CPIJlから1命令で、シ
リアル信号のレベルデータと時間データがそれぞれ書込
まれる。従来例と同様に、これらのデータはCPU 1
から更新され、ポート3はシリアル信号を出力する。The port 3 and the counter 4 are integrated and have one address as the timer circuit 2, and the level data and time data of the serial signal are respectively written by one command from CPIJ1. Similar to the conventional example, these data are stored in CPU 1
Port 3 outputs a serial signal.
以上説明したように本発明は、カウンタとポートを一体
化し、同一のアドレスを付与することにより、以下に示
す効果がある。As explained above, the present invention has the following effects by integrating a counter and a port and giving them the same address.
■ シリアル信号の時間データと出力データが一命令で
同時に設定されるので、従来のように時間データを補正
する必要がない。■ Since the time data of the serial signal and the output data are set at the same time with one command, there is no need to correct the time data as in the past.
■ データのセットが従来より1命令少ない1命令で済
むためプログラムサイズが小さくなり、その結果必要な
らば他の命令の実行が可能となり、マイクロプロセッサ
の高速動作が可能となる。(2) Since setting data requires only one instruction, which is one less than the conventional method, the program size is reduced, and as a result, other instructions can be executed if necessary, allowing the microprocessor to operate at high speed.
■ ポートとカウンタのアドレスを同じにしたことによ
り、アドレスデコーダの回路規模を小ざくできる。■ By making the port and counter addresses the same, the circuit scale of the address decoder can be reduced.
■ 従来のように、ポートに送るデータとカウンタに送
るデータを別々に蓄えておく必要がなくなり、1つのレ
ジスタに持つこともでき、レジスタを減らすこともでき
る。■ It is no longer necessary to separately store the data sent to the port and the data sent to the counter as in the past; they can be stored in one register, and the number of registers can be reduced.
第1図は本発明のタイマー回路の一実施例を含むマイク
ロコンビ1−タのブロック図、第2図はCP LJ 1
の命令シーケンス図、第3図は従来例のブロック図、第
4図はCPU 1の命令シーケンス図、第5図はシリア
ル信号のフォーマット図である。
1・・・CPU、2・・・タイマー回路、3・・・ポー
ト、4・・・カウンタ、5・・・データバス、6・・・
IIIt[I信号バス、7・・・アドレスデコーダ、8
・・・アドレスバス。
特許出願人 日本電気株式会社
第2図
第3図
第4図
第5図FIG. 1 is a block diagram of a microcombinator including an embodiment of the timer circuit of the present invention, and FIG.
3 is a block diagram of a conventional example, FIG. 4 is an instruction sequence diagram of the CPU 1, and FIG. 5 is a serial signal format diagram. 1...CPU, 2...Timer circuit, 3...Port, 4...Counter, 5...Data bus, 6...
IIIt[I signal bus, 7...address decoder, 8
...address bus. Patent applicant: NEC Corporation Figure 2 Figure 3 Figure 4 Figure 5
Claims (1)
がCPUからそれぞれ設定されるカウンタとポートから
なり、カウンタが設定されたデータを計数し終ると、ポ
ートより順次シリアル信号が出力されるとともにカウン
タとタイマのデータがCPUからそれぞれ更新されるプ
ログラム制御のタイマー回路において、 前記のカウンタとポートが一体化され、同一アドレスが
付与されていることを特徴とするタイマー回路。[Claims] Consisting of a counter and a port to which the time and level data of the pulses constituting the serial signal are respectively set by the CPU, and when the counter finishes counting the set data, the serial signal is sequentially output from the port. 1. A program-controlled timer circuit in which the counter and timer data are respectively updated from a CPU at the same time as the counter and timer data are updated by a CPU, characterized in that the counter and the port are integrated and assigned the same address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61175011A JPS6330921A (en) | 1986-07-24 | 1986-07-24 | Timer circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61175011A JPS6330921A (en) | 1986-07-24 | 1986-07-24 | Timer circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS6330921A true JPS6330921A (en) | 1988-02-09 |
JPH0476127B2 JPH0476127B2 (en) | 1992-12-02 |
Family
ID=15988655
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61175011A Granted JPS6330921A (en) | 1986-07-24 | 1986-07-24 | Timer circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6330921A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5123804A (en) * | 1990-06-15 | 1992-06-23 | Tokyo Electron Sagami Limited | Horizontal/vertical conversion handling apparatus |
-
1986
- 1986-07-24 JP JP61175011A patent/JPS6330921A/en active Granted
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5123804A (en) * | 1990-06-15 | 1992-06-23 | Tokyo Electron Sagami Limited | Horizontal/vertical conversion handling apparatus |
Also Published As
Publication number | Publication date |
---|---|
JPH0476127B2 (en) | 1992-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS6330921A (en) | Timer circuit | |
JPS6242301B2 (en) | ||
JP2536102B2 (en) | Data processing device | |
JP2556083B2 (en) | Complex arithmetic pipeline circuit | |
JP2696811B2 (en) | Electronic preset counter | |
JPH02263256A (en) | Microcomputer and controller | |
JPS5920353U (en) | program storage computer | |
JPH0228834A (en) | Register writing circuit | |
JPH02178837A (en) | Speed governing system for microprogram | |
JPS6230452B2 (en) | ||
JPH03161883A (en) | Microprocessor | |
JPH02100142A (en) | Saving and restoring system for arbitrary register | |
JPH0118456B2 (en) | ||
JPS6120139A (en) | Interruption control system | |
JPH04245333A (en) | Information processor | |
JPH02204861A (en) | Vector data processor | |
JPS63132303A (en) | Microcomputer application controller mounted on vihicle | |
JPS60112140A (en) | Access system of stack | |
JPH01205337A (en) | Instruction control system | |
JPS62251803A (en) | Counter circuit | |
JPS59202545A (en) | Program controller | |
JPH0119168B2 (en) | ||
JPS5953410U (en) | Sequence control device | |
JPH0399321A (en) | Instruction control system | |
JPH0465406B2 (en) |