JPS61288254A - Data transmitting and receiving circuit - Google Patents

Data transmitting and receiving circuit

Info

Publication number
JPS61288254A
JPS61288254A JP13116085A JP13116085A JPS61288254A JP S61288254 A JPS61288254 A JP S61288254A JP 13116085 A JP13116085 A JP 13116085A JP 13116085 A JP13116085 A JP 13116085A JP S61288254 A JPS61288254 A JP S61288254A
Authority
JP
Japan
Prior art keywords
ram
data
write
pointer
chip 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
JP13116085A
Other languages
Japanese (ja)
Inventor
Toshiki Yasui
安井 敏喜
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP13116085A priority Critical patent/JPS61288254A/en
Publication of JPS61288254A publication Critical patent/JPS61288254A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PURPOSE:To make a circuit small-sized and inexpensive by constituting a FIFO with a one-chip microcomputer and a RAM as a buffer provided for data transmission/reception between a CPU and a terminal. CONSTITUTION:When data from a host CPU or terminals 6 and 7 is written in a RAM 3, the write routine of the internal ROM of the one-chip microcomputer 1 is started to write data in the prescribed area of the RAM 3, and the value of a pointer of a write pointer area provided in the internal RAM of the microcomputer 1 is updated by +1. When data to be transmitted to the host CPU or terminals 6 and 7 is read out from the RAM 3, a read routine is started similarly to read out data from a prescribed area of the RAM 3, and the value of a read pointer is simultaneously updated.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はCPUと端末間セデータの送受信を行なうため
のデータ送受信回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data transmitting and receiving circuit for transmitting and receiving data between a CPU and a terminal.

〔従来の技術〕[Conventional technology]

従来、CPUと端末間でデータの送受信を行う際には、
両者の動作速度が異なることから、バッファとして専用
のFIFOデバイスを使用して。
Conventionally, when transmitting and receiving data between a CPU and a terminal,
Since the operating speeds of both are different, a dedicated FIFO device is used as a buffer.

CPUの処理能力を低下させないようにしていた。This was done to avoid reducing the processing power of the CPU.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかしながら、専用のFIFOデバイスをバッファとし
て使用した場合、次のような欠点があった。
However, when a dedicated FIFO device is used as a buffer, there are the following drawbacks.

(1)  1個のFIFOデバイスの容量は84X4 
bit、sで固定であり、後でバッファ容量を変更しよ
うとしても、変更不可能である。すなわちバッファ容量
を自由に増減することができない。
(1) The capacity of one FIFO device is 84x4
It is fixed in bits and s, and even if you try to change the buffer capacity later, it cannot be changed. In other words, the buffer capacity cannot be freely increased or decreased.

(2)データバスの構成、バッファ容量の大きさによっ
ては、複数個の専用FIFOデバイスを2個以上並列に
使用し、それを数段縦続に接続して、使用せざるをえな
くなり、限られた実装スペースを大幅に占有する虞れが
ある。すなわち、特にバッファ容量を増す際には、回路
の実装面積を犠牲にしなければいけず、回路の小型化が
図れない。
(2) Depending on the configuration of the data bus and the size of the buffer capacity, it may be necessary to use two or more dedicated FIFO devices in parallel and connect them in several stages, resulting in limited usage. However, there is a risk that it will occupy a large amount of mounting space. That is, especially when increasing the buffer capacity, the mounting area of the circuit must be sacrificed, making it impossible to miniaturize the circuit.

(3)FIFOデバイスは化デバイスと比較して高価で
あるということから、経済化を図る上で難点がある。
(3) Since FIFO devices are more expensive than FIFO devices, it is difficult to make them economical.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、CPUと端末間でデータの送受信を行う際に
設けるバッファとして、専用のFIFOデバイスを使用
せず、ワンチップマイクロコンピュータとRAMとでF
IFOを構成することにより、回路の小型化、低廉化を
図ったものである。
The present invention does not use a dedicated FIFO device as a buffer provided when transmitting and receiving data between a CPU and a terminal, but instead uses a one-chip microcomputer and RAM.
By configuring an IFO, the circuit can be made smaller and less expensive.

すなわち、本発明のデータ送受信回路は、データのバッ
ファとしての外部RAMと、ROM、RAMを内蔵し、
前記外部RAMにFIFOの機能を持たせる手段を有す
るワンチップマイクロコンピュータとを備えたことを特
徴とする。
That is, the data transmitting/receiving circuit of the present invention includes an external RAM as a data buffer, a ROM, and a RAM.
The present invention is characterized by comprising a one-chip microcomputer having means for providing the external RAM with a FIFO function.

〔実施例〕〔Example〕

以下、本発明の実施例について図面を参照して説明する
Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明のデータ送受信回路のブロック図である
FIG. 1 is a block diagram of a data transmitting/receiving circuit according to the present invention.

S I O(Serial Input 0utput
 ) :17トローラ4は二つのボートを゛有し、R9
−2320信号線51+52を介して端末6.7と双方
向通信を行ない、また、データバス2を介してROM、
RAM内蔵のワンチップマイクロコンピュータ1により
動作モードが決定される。上位cpu(不図示)と端末
6.7間で送受されるデータは、上位CPUと端末6.
7間のバッファである外部RAM3を中継として、SI
Oコントローラ4に対して書込み、読出しが行なわれる
。RAM3において、書込み、読出されるエリアは個別
に、かつ端末6゜7°個々に設けられている。ワンチッ
プマイクロコンピュータlの内部ROMには、RAM3
に上位CPUからのデータまたは端末6.7から送信さ
れてくるデータを書込む際に起動される書込みルーチン
と、RAM3から上位CPUまたは端末6.7に送信す
るデータを読出す際に起動される読出しルーチンが格納
され、また内部RAMにはRAM3へのデータの書込み
を制御する書込みコントロールフラグと、RAM3から
のデータの読出しを制御する読出しコントロールフラグ
と、書込みポインタ、読出しポインタがそれぞれ格納さ
れる書込みポインタエリア、読出しポインタエリアが設
けられている。
SIO(Serial Input 0output
): 17 Troller 4 has two boats, R9
Bidirectional communication is performed with the terminal 6.7 via the -2320 signal lines 51+52, and the ROM,
The operating mode is determined by a one-chip microcomputer 1 with a built-in RAM. Data sent and received between the upper CPU (not shown) and the terminal 6.7 is transmitted and received between the upper CPU and the terminal 6.7.
The external RAM 3, which is a buffer between the SI
Writing to and reading from the O controller 4 is performed. In the RAM 3, areas for writing and reading are provided individually and for each terminal 6° and 7°. The internal ROM of the one-chip microcomputer l includes RAM3.
A write routine is started when writing data from the host CPU or data sent from the terminal 6.7 to the RAM 3, and a write routine is started when reading data to be sent from the RAM 3 to the host CPU or the terminal 6.7. A read routine is stored in the internal RAM, and a write control flag that controls writing of data to RAM3, a read control flag that controls reading of data from RAM3, a write pointer, and a read pointer are stored in the internal RAM. A pointer area and a read pointer area are provided.

次に、RAM3に上位CPUからのデータまたは端末6
,7から送信されてくるデータを書込む際の動作を、第
2図の書込みルーチンのフローチャートを参照して説明
する。
Next, data from the host CPU or terminal 6 is stored in RAM3.
, 7 will be explained with reference to the flowchart of the write routine shown in FIG.

まず、ワンチップマイクロコンピュータ1の内lRAM
エリア内の書込みコントロールフラグにより、データの
書込み可か否かを判定しく処理11)、否であれば他処
理へ移り、可であればRAM3の所定の置載にデータを
書込むと同時に、ワンチップマイクロコンピュータl内
部のRAMに設けられた書込みポインタエリアから読出
されたポインタの値を更新(+1)する(処理12)0
次に、RAM3内の所定の領域を越えてデータが書込ま
れるか否かを判定しく処理13)、否であれば更新され
たポインタの値をワンチップマイクロコンピュータl内
の書込みポインタの領域に格納しく処理!5)、可であ
れば書込みポインタの値をクリアしく処理14)、その
ポインタの値をワンチップマイクロコンピュータl内部
の書込みポインタの領域に格納する(処理15)0次に
、格納された書込みポインタの値とワンチップマイクロ
コンピュータl内部のRAMに別個に設けられた読出し
ポインタの値を比較しく処理IB)、等しければ書込み
コントロールフラグを不可に設定する(処理17)、な
お、このフラグは、初期設定時、可と設定されている。
First, one RAM in the one-chip microcomputer 1
Based on the write control flag in the area, it is determined whether or not data can be written (process 11). If not, the process moves on to other processes; if it is possible, the data is written to a predetermined location in RAM 3, and at the same time Update (+1) the value of the pointer read from the write pointer area provided in the RAM inside the chip microcomputer l (process 12) 0
Next, it is determined whether or not data is written beyond a predetermined area in RAM 3 (step 13), and if not, the updated pointer value is transferred to the area of the write pointer in the one-chip microcomputer l. Store and process! 5) If possible, clear the value of the write pointer. Process 14). Store the pointer value in the write pointer area inside the one-chip microcomputer (Process 15). Next, clear the stored write pointer. Compare the value of the read pointer provided separately in the RAM inside the one-chip microcomputer (processing IB), and if they are equal, set the write control flag to disabled (processing 17). At the time of configuration, it is set as possible.

最後に、ワンチップマイクロコンピュータ1内部のRA
Mに設けられている読出しコントロールフラグを可とす
る(処理18)、すなわち、この読出しコントロールフ
ラグは、データが書込まれたから読出し可とするもので
あり、初期設定時、不可となっている。
Finally, the RA inside the one-chip microcomputer 1
The read control flag provided in M is enabled (process 18). In other words, this read control flag allows reading since data has been written, and is disabled at the time of initial setting.

なお、RAM3から上位CPUへ送信するデータまたは
端末6.7に送信するデータを読出す際は、読出しルー
チンが同様に起動される0本動作は上記書込みルーチン
の説明において、書込みポインタを読出しポインタ、逆
に、読出しポインタを書込みポインタ、書込みコントロ
ールフラグを読出しコントロールフラグ、逆に読出しコ
ントロールフラグを書込みコントロールフラグと読み替
えたものと同様である。
Note that when reading data to be sent from the RAM 3 to the host CPU or data to be sent to the terminal 6.7, the read routine is activated in the same way. Conversely, it is the same as reading the read pointer as the write pointer, the write control flag as the read control flag, and conversely the read control flag as the write control flag.

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

以上説明したように本発明は、SIOの制御および端末
と上位CPUとのデータ送受を、ROM、RAM内蔵の
ワンチップマイクロコンピュータで行い、かつ上位CP
Uと端末間のバッファにFIFOデバイスを使用せずに
、1個のメモリデバイスを設け、このメモリデバイスの
FIFOの機能をワンチップマイクロコンピュータによ
り実現することにより、端末インターフェース回路の小
型化、低廉化、ひいては経済化を実現できるという効果
がある。
As explained above, the present invention controls the SIO and sends and receives data between the terminal and the host CPU using a one-chip microcomputer with built-in ROM and RAM, and the host CPU
By providing one memory device instead of using a FIFO device as a buffer between the U and the terminal, and realizing the FIFO function of this memory device with a one-chip microcomputer, the terminal interface circuit can be made smaller and cheaper. This has the effect of realizing economicization.

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

第1図は本発明のデータ送受信回路の一実施例のブロッ
ク図、第2図は書込みルーチンのフローチャートである
。 1:ワンチップマイクロコンピュータ、2:データパス
、 3:RAM。 4:SIOコントローラ、 51+ s、、  :R9−232G準拠の信号線。 6.7:端末。 特許出願人 日本電気株式会社− 代  理  人   弁理士  内 原   晋1、二
、′ 第1図 第2図
FIG. 1 is a block diagram of an embodiment of the data transmitting/receiving circuit of the present invention, and FIG. 2 is a flowchart of a write routine. 1: One-chip microcomputer, 2: Data path, 3: RAM. 4: SIO controller, 51+s, : R9-232G compliant signal line. 6.7: Terminal. Patent Applicant NEC Corporation - Agent Patent Attorney Susumu Uchihara 1, 2,' Figure 1 Figure 2

Claims (1)

【特許請求の範囲】 CPUと端末間でデータの送受信を行うためのデータ送
受信回路において、 前記データのバッファとしての外部RAMと、ROM、
RAMを内蔵し、前記外部RAMにFIFOの機能を持
たせる手段を有するワンチップマイクロコンピュータと
を備えたことを特徴とするデータ送受信回路。
[Claims] A data transmitting and receiving circuit for transmitting and receiving data between a CPU and a terminal, comprising: an external RAM as a buffer for the data; a ROM;
1. A data transmitting/receiving circuit comprising: a one-chip microcomputer having a built-in RAM and means for providing the external RAM with a FIFO function.
JP13116085A 1985-06-17 1985-06-17 Data transmitting and receiving circuit Pending JPS61288254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13116085A JPS61288254A (en) 1985-06-17 1985-06-17 Data transmitting and receiving circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13116085A JPS61288254A (en) 1985-06-17 1985-06-17 Data transmitting and receiving circuit

Publications (1)

Publication Number Publication Date
JPS61288254A true JPS61288254A (en) 1986-12-18

Family

ID=15051403

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13116085A Pending JPS61288254A (en) 1985-06-17 1985-06-17 Data transmitting and receiving circuit

Country Status (1)

Country Link
JP (1) JPS61288254A (en)

Similar Documents

Publication Publication Date Title
US6742063B1 (en) Method and apparatus for efficient transfer of data packets
JPS63255759A (en) Control system
US5566345A (en) SCSI bus capacity expansion controller using gating circuits to arbitrate DMA requests from a plurality of disk drives
EP0464848B1 (en) Structure for enabling direct memory-to-memory transfer
US5280589A (en) Memory access control system for use with a relatively small size data processing system
JPS61288254A (en) Data transmitting and receiving circuit
US6131133A (en) Data exchange interface that directly transmits control signals either to a microprocessor or a D.M.A. controller via a first and second control line respectively
US20030236960A1 (en) ATAPI device unaligned and aligned parallel I/O data transfer controller
KR0135895B1 (en) Interface device using integrated device electronics port
JPH0343804A (en) Sequence controller
JP2671743B2 (en) Microcomputer
JP2739789B2 (en) Data transmission / reception system
JPS6340956A (en) Data transfer equipment
JPS60142768A (en) Data transfer device
JPS61173555A (en) Connecting method of communication controller
JPH0635841A (en) Bus controller
JPS60114927A (en) Film memory access control system
JPH0113575B2 (en)
JPS62132456A (en) Data transmission equipment
JP2000267776A (en) Centralized bus communication equipment and its method
JPH04273358A (en) One-chip microcomputer containing dmac
JPH04314157A (en) Communication equipment
JPH04333138A (en) Data transfer buffer device and data transfer method
JPH044619B2 (en)
JPH02280258A (en) Dma controller