JPH0626363B2 - Padding control method by bisync protocol - Google Patents
Padding control method by bisync protocolInfo
- Publication number
- JPH0626363B2 JPH0626363B2 JP61017555A JP1755586A JPH0626363B2 JP H0626363 B2 JPH0626363 B2 JP H0626363B2 JP 61017555 A JP61017555 A JP 61017555A JP 1755586 A JP1755586 A JP 1755586A JP H0626363 B2 JPH0626363 B2 JP H0626363B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- transmission
- padding
- interrupt
- trailing
- 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
Links
Landscapes
- Communication Control (AREA)
Description
【発明の詳細な説明】 <産業上の利用分野> 本発明は、RS232Cインターフェースを用いてバイシンク
プロトコルにより、タイマー制御を行なわずにトレーリ
ングパディングを送信する事を可能にしたバイシンクプ
ロトコルによるパディング制御方式に関する。DETAILED DESCRIPTION OF THE INVENTION <Industrial field of application> The present invention is a padding based on a bisync protocol that makes it possible to transmit a trailing padding without performing timer control by a bisync protocol using an RS232C interface. Regarding control method.
<従来の技術> 従来のバイシンクプロトコルによるパディング制御方式
は、通信回線が何もデータを伝送していない状態からデ
ータ伝送状態に移行する際及びこの逆に移行する際、特
にそれぞれの移行状態を安定させる為に送信データの前
後に付加したパディングキャラクタのうち、データの後
ろに付加したトレーリングパディングを送信する場合、
このトレーリングパディングを完全に送出させる為には
タイマー制御による監視ルーチンが必要であった。これ
を具体的に説明すると、例えばこの様なバイシンクプロ
トコルを取り扱う事ができる通信コントローラとして日
本電気製のLSIμPD7201Aを例にとった場合、各データキ
ャラクタを通信回線に送信する為の一般的な方法とし
て、送信割り込みによる送信方法がある。<Prior art> The conventional padding control method by the bisync protocol changes the transition state from the state in which the communication line is not transmitting any data to the data transmission state, and vice versa, especially in each transition state To send trailing padding added after the data, of the padding characters added before and after the transmitted data for stability,
In order to send out the trailing padding completely, a monitoring routine under timer control was necessary. Explaining this concretely, for example, when the NEC μPD7201A manufactured by NEC is used as a communication controller capable of handling such a bisync protocol, a general method for transmitting each data character to a communication line is used. There is a transmission method using a transmission interrupt.
このμPD7201Aに対し、送信割り込みをイネーブルつま
り割り込み可能とした後、最初の送信データをこのLSI
に書き込むと、それ以外はこの書き込まれたデータを送
信するたびに、μPD7201AよりTx Buffer Empty、つま
り送信割り込み要求がかかる。そこでこの割り込み処理
ルーチンでμPD7201Aの送信バッファに順次データを書
き込めば良い。これを繰り返し、最後のデータ(つまり
トレーリング・パディング)をμPD7201Aの送信バッフ
ァに書き込んだ後、次の送信割り込み要求がこのLSIよ
り発生したならば、割り込み処理ルーチン内でこれを判
断し、送信終了処理を行なう。しかしながら、この送信
終了処理は、μPD7201Aより送信割り込み要求が発生し
てからすぐに行なってはならない。For this μPD7201A, after enabling the transmission interrupt, that is, enabling interrupts, the first transmission data is sent to this LSI.
If written to, the Tx Buffer Empty, that is, a transmission interrupt request is issued from the µPD7201A every time the written data is transmitted. Therefore, it suffices to sequentially write data to the transmission buffer of the μPD7201A by this interrupt processing routine. Repeat this to write the last data (that is, trailing padding) to the µPD7201A's transmit buffer, then if the next transmit interrupt request is generated from this LSI, determine this in the interrupt processing routine and end transmission. Perform processing. However, this transmission end processing should not be performed immediately after the transmission interrupt request is generated from the μPD7201A.
なならばμPD7201Aより発生する送信割り込み要求は、
その前の割り込み処理において、このLSIの送信バッフ
ァに書き込まれたデータがまだ完全に送出されていなく
ても発生する為である。これはこのLSIの送信バッファ
が2段構造になっており、1段目のバッファに書き込ま
れたデータが、2段目のバッファに移されて通信回線に
送出開始した時点で、送信割り込み要求が発生する為で
ある。If so, the transmission interrupt request generated from the μPD7201A is
This is because, in the interrupt process before that, it occurs even if the data written in the transmission buffer of this LSI has not been completely transmitted. The transmission buffer of this LSI has a two-stage structure. When the data written in the first-stage buffer is moved to the second-stage buffer and starts to be sent to the communication line, a transmission interrupt request is issued. This is because it occurs.
つまり上記の様な場合、最後のデータ(つまりトレーリ
ングパディング)をμPD7201Aの1段目の送信バッファ
に書き込んだ後、次の送信割り込み要求が発生したなら
ば、上記の割り込み処理ルーチンでタイマー制御により
WAIT処理を行ない、トレーリングパディングが完全に送
信されたのを見越してから、送信終了処理を行なう。こ
れを行なわない場合、トレーリングパディングの完全な
送信は保障されない。In other words, in the above case, after writing the last data (that is, trailing padding) to the first-stage transmission buffer of the μPD7201A, if the next transmission interrupt request occurs, the timer control is performed by the above-mentioned interrupt processing routine.
WAIT processing is performed, and after the trailing padding is completely transmitted, the transmission end processing is performed. If this is not done, the complete transmission of trailing padding is not guaranteed.
第5図は、このタイマー制御によるトレーリングパディ
ングの送信割り込み処理のフローを示す図であるが、最
初に送信残データ数をカウントするデータカウンターに
より、送信データの有無をチェックし、まだ送信データ
が有る場合は、このデータを順次1バイトずつμPD7201
Aの送信バッファに書き込み、データカウンターを1つ
ずつ減らしながら割り込み要求に対する割り込み終了処
理EOI(End Of Interrupt)を行なう。FIG. 5 is a diagram showing the flow of the trailing padding transmission interrupt process by the timer control. First, the data counter for counting the number of remaining transmission data checks the presence of transmission data, and the transmission data still remains. If there is, μPD7201 for each byte of this data sequentially
Write to the transmission buffer of A and perform the interrupt end processing EOI (End Of Interrupt) for the interrupt request while decrementing the data counter by one.
ここでデータカウンターが0となり、送信データを全て
送信した場合はタイマーをスタートさせ、このタイマー
がタイムアウトするまでWAITし、タイムアウトした後、
送信終了処理としてRTS(送信要求)をOFFとし、Tx In
terrupt Disableとして送信割り込みを禁止し、次にTx
Disableとして送信動作を禁止して、その後EOI(End
Of Interrupt)つまり割り込み終了処理を行なう。Here, the data counter becomes 0, and when all the transmission data has been transmitted, the timer is started, WAIT until this timer times out, and after the time out,
As the transmission end processing, RTS (transmission request) is turned off and Tx In
Disable the transmit interrupt as terrupt Disable, then Tx
Disable the transmission operation as Disable, and then EOI (End
Of Interrupt) That is, an interrupt end process is performed.
<発明が解決しようとする問題点> しかしながら、この様な従来のバイシンクプロトコルに
よるパディング制御方式にあっては、割り込み処理にお
いてタイマー制御によるWAIT処理が必要なため、このWA
IT時間はCPUにとってはむだな時間であり、かつ、タイ
マー制御ロジックが必要であるという問題点があった。
また、このタイマー制御を割り込みを使用して処理する
場合は、タイマー割り込み用の制御ロジックを追加する
必要があり、経済的ではないという問題点がある。<Problems to be Solved by the Invention> However, in such a conventional padding control method by the bisync protocol, WAIT processing by timer control is required in interrupt processing.
The IT time is a waste of time for the CPU, and the timer control logic is required.
Further, when this timer control is processed by using an interrupt, it is necessary to add a control logic for the timer interrupt, which is not economical.
本発明の目的は、送信割り込み処理において、CPUによ
るタイマー制御やタイマー割り込みロジックを必要とす
る事なく、バイシンクプロトコルによるトレーリングパ
ディングの送信を可能として、CPUの動作効率を向上し
経済性を高めたバイシンクプロトコルによるパディング
制御方式を提供する事にある。An object of the present invention is to enable transmission of trailing padding by a bisync protocol without requiring timer control and timer interrupt logic by the CPU in the transmission interrupt processing, improving the operating efficiency of the CPU and improving the economical efficiency. It is to provide a padding control method by a bisync protocol.
<問題点を解決するための手段> 本発明は、コンピュータシステムにRS232Cインターフェ
ースを介して変復調器を接続し、この変復調器を介しバ
イシンクプロトコルに基づいて他の機器とデータ通信を
行なうバイシンクプロトコルによる同期送信方法におい
て、データ伝送を行なう通信回線が、データが何も伝送
されていない状態からデータ伝送状態に移行する際及び
この逆の状態において、データの前後に付加するパディ
ングキャラクタに対し、データの後ろ側に付加するトレ
ーリングパディングのデータを余分に付加してバッファ
リングした事を特徴としたものである。<Means for Solving Problems> The present invention relates to a bisync protocol in which a modem is connected to a computer system via an RS232C interface, and data communication is performed with other devices based on the bisync protocol via the modem. In the synchronous transmission method according to, when the communication line for data transmission shifts from the state in which no data is transmitted to the data transmission state and vice versa, the padding character added before and after the data The feature is that the trailing padding data added to the rear side of is added and buffered.
<作用> 上記技術的手段は次の様に作用する。通信処理を行なう
プログラムにおいて送信データをプログラムの内部バッ
ファにバッファリングする際、トレーリングパディング
を1つ(又はそれ以上)多く付加してバッファリングす
る。これをμPD7201Aに対し、順次送信割り込みにより
送出した場合、最後のトレーリングパディングをこのLS
Iの送信バッファに書き込んだ後、次の送信割り込みが
このLSIより発生し、この割り込み処理において、すぐ
に送信終了処理を行なった場合、この最後のトレーリン
グパディングが完全に通信回線に送出されなくても、あ
らかじめトレーリングパディングを1つ(又はそれ以
上)余分にバッファリングしている為、1つ目のトレー
リングパディングは完全に送信される。これにより、タ
イマー制御によるWAIT処理を不用にしたものである。<Operation> The above technical means operates as follows. When buffering the transmission data in the internal buffer of the program in the program which performs communication processing, one more trailing padding (or more) is added and buffered. When this is sent to the μPD7201A by sequential transmission interrupt, the last trailing padding is
If the next transmission interrupt is generated from this LSI after writing to the I transmission buffer and the transmission end processing is immediately performed in this interrupt processing, this last trailing padding will not be completely transmitted to the communication line. However, since one (or more) extra trailing paddings have been buffered beforehand, the first trailing padding is completely transmitted. As a result, the WAIT processing by the timer control is made unnecessary.
<実施例> 以下、本発明を図面に基づいて説明する。<Examples> Hereinafter, the present invention will be described with reference to the drawings.
第2図は本発明のバイシンクプロトコルによるパディン
グ制御方式を実施するコンピュータシステムの一例を示
すブロック図である。このコンピュータシステムは、例
えばマイクロプロセッサ等からなるCPU1を有し、このCP
U1に接続されたバス2にμPD7201Aからなりバイシンク
プロトコルによる同期式通信を達成するための通信コン
トローラ3、一時的にデータを記憶するRAM5、プログラ
ムやデータ等を固定的に記憶するROM6等が接続されてい
る。また、通信コントローラ3にはRS232Cインターフェ
ース(以下、RS232CI/Fと略記する)4が接続され、こ
のRS232CI/F4はRS232Cケーブルを介してモデムインタ
ーフェース(以下、モデムI/Fと略記する)8を備える
モデム7に接続されている。そして、モデム7は通信回
線9を介して他のコンピュータシステム等に接続され、
これにより他のコンピュータシステムとのデータ通信が
可能になっている。FIG. 2 is a block diagram showing an example of a computer system that implements the padding control method according to the bisync protocol of the present invention. This computer system has, for example, a CPU1 including a microprocessor and the like.
Connected to the bus 2 connected to U1 is a μPD7201A communication controller 3 for achieving synchronous communication by the bisync protocol, RAM 5 for temporarily storing data, ROM 6 for fixedly storing programs and data, etc. Has been done. An RS232C interface (hereinafter abbreviated as RS232C I / F) 4 is connected to the communication controller 3, and this RS232C I / F 4 is equipped with a modem interface (hereinafter abbreviated as modem I / F) 8 via an RS232C cable. It is connected to the modem 7. The modem 7 is connected to another computer system or the like via the communication line 9,
This allows data communication with other computer systems.
以上の様に構成されるコンピュータシステムにより、通
信回線9を介して他のコンピュータシステム等とバイシ
ンクプロトコルに従ってデータ送信を行なう場合におけ
る送信データの構成を第3図に示す。尚、第3図は一例
として、バイシンクプロトコルにおける問い合わせ用制
御キャラクタENQを送信する場合のデータ構成である。
第3図においてPADLはリーディングパディング、PADTは
トレーリングパディングを表わし、から順に通信回線
に送出される。FIG. 3 shows the configuration of transmission data when the computer system configured as described above performs data transmission with another computer system or the like via the communication line 9 in accordance with the bisync protocol. Incidentally, FIG. 3 shows, as an example, a data structure in the case of transmitting the inquiry control character ENQ in the bisync protocol.
In FIG. 3, PADL represents leading padding and PADT represents trailing padding, and are sequentially sent to the communication line.
第4図は、本発明によるトレーリングパディングの制御
方式における、送信バッファの状態を示す。この図で示
される様にPADTすなわちトレーリングパディングを1つ
(又はそれ以上)余分にデータに付加してプログラム内
部の送信バッファに設定しておく。この様に設定された
場合においては、第1図の送信フローに示す様にデータ
送信終了時のタイマー制御を行なう事なくトレーリング
パディングの送信を可能にしている。すなわち第1図に
おいては、まず送信データカウンタによりデータの残り
をチェックし、まだ送信データがあればμPD7201Aの送
信バッファにデータを1バイト書き込み、データカウン
タを1つ減らした後、割り込み終了処理EOI(End Of
Interrupt)を行なう。送信データカウンタが0とな
り、全てのデータの送信を終了したならば、RTS(送信
要求信号)をOFFにして出力した後、Tx Int Disable
として送信割り込みを禁止し、Tx Disableとして送信
動作を禁止して、この後割り込み終了処理を行なってい
る。FIG. 4 shows the state of the transmission buffer in the trailing padding control method according to the present invention. As shown in this figure, one extra PADT, that is, trailing padding (or more) is added to the data and set in the transmission buffer inside the program. In such a case, the trailing padding can be transmitted without controlling the timer at the end of data transmission as shown in the transmission flow of FIG. That is, in FIG. 1, first, the transmission data counter checks the rest of the data, and if there is still transmission data, one byte of data is written in the transmission buffer of the μPD7201A, the data counter is decremented by one, and then the interrupt end processing EOI ( End Of
Interrupt). When the transmission data counter reaches 0 and transmission of all data is completed, after turning off RTS (transmission request signal) and outputting, Tx Int Disable
The transmission interrupt is disabled as, and the transmission operation is disabled as Tx Disable, and then the interrupt end processing is performed.
上記実施例においては、通信コントローラ3としてμPD
7201Aを使用した場合について説明したが、このLSIに限
定されるものなく、同様な機能を有する他の素子にも適
用できるものである。In the above embodiment, the communication controller 3 has a μPD.
The case where the 7201A is used has been described, but the present invention is not limited to this LSI and can be applied to other elements having the same function.
<発明の効果> 以上説明した様に、本発明によればバイシンクプロトコ
ルによるトレーリングパディングの送信において、プロ
グラムの内部バッファにトレーリングパディングを1つ
(又はそれ以上)多くバッファリングする事により、送
信割り込み処理におけるタイマー制御によるWAIT動作を
不要にしているので、CPUはその分他の処理を行なう事
ができ効率的であると共に、タイマー割り込みの様な制
御ロジックを追加する必要もないため経済的である。<Effects of the Invention> As described above, according to the present invention, when the trailing padding is transmitted by the bisync protocol, by buffering one (or more) trailing paddings in the internal buffer of the program, Since the WAIT operation by the timer control in the transmission interrupt processing is not required, the CPU can perform other processing correspondingly and is efficient, and it is not necessary to add a control logic such as a timer interrupt, which is economical. Is.
第1図は本発明のバイシンクプロトコルによるパディン
グ制御方式を示すフローチャート、第2図は本発明を実
施する為のコンピュータシステムの一例を示すブロック
図、第3図はバイシンクプロトコルにおける送信データ
の構成を示す図、第4図は本発明におけるトレーリング
パディング制御を行なう為の送信バッファの状態を示す
図、第5図は従来のバイシンクプロトコルによるトレー
リングパディング制御方式を示すフローチャートであ
る。 1……CPU 2……バス 3……通信コントローラ 4……RS232CI/F 5……RAM 6……ROM 7……モデム 8……モデムI/F 9……通信回線FIG. 1 is a flow chart showing a padding control method according to the bisync protocol of the present invention, FIG. 2 is a block diagram showing an example of a computer system for carrying out the present invention, and FIG. 3 is a structure of transmission data in the bisync protocol. FIG. 4 is a diagram showing a state of a transmission buffer for performing trailing padding control in the present invention, and FIG. 5 is a flow chart showing a trailing padding control system by a conventional bisync protocol. 1 …… CPU 2 …… Bus 3 …… Communication controller 4 …… RS232CI / F 5 …… RAM 6 …… ROM 7 …… Modem 8 …… Modem I / F 9 …… Communication line
Claims (1)
ェースを介して変復調器を接続し、この変復調器を介し
バイシンクプロトコルに基づいて他の機器とデータ通信
を行なうバイシンクプロトコルによる同期送信方法にお
いて、データ伝送を行なう通信回線が、データが何も伝
送されていない状態からデータ伝送状態に移行する際、
及びこの逆の状態において、データの前後に付加するパ
ディングキャラクタに対し、データの後ろ側に付加する
トレーリングパディングのデータを余分に付加してバッ
ファリングした事を特徴とするバイシンクプロトコルに
よるパディング制御方式。1. A synchronous transmission method according to a bisync protocol in which a modem is connected to a computer system via an RS232C interface, and data is communicated with other devices based on the bisync protocol via the modem. When the communication line to perform transitions from the state in which no data is transmitted to the data transmission state,
And, in the opposite state, padding control by the bisync protocol is characterized in that extra padding data for trailing padding added to the back of the data is added to the padding character added before and after the data and buffered. method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61017555A JPH0626363B2 (en) | 1986-01-28 | 1986-01-28 | Padding control method by bisync protocol |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP61017555A JPH0626363B2 (en) | 1986-01-28 | 1986-01-28 | Padding control method by bisync protocol |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS62175055A JPS62175055A (en) | 1987-07-31 |
| JPH0626363B2 true JPH0626363B2 (en) | 1994-04-06 |
Family
ID=11947157
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP61017555A Expired - Lifetime JPH0626363B2 (en) | 1986-01-28 | 1986-01-28 | Padding control method by bisync protocol |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0626363B2 (en) |
-
1986
- 1986-01-28 JP JP61017555A patent/JPH0626363B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS62175055A (en) | 1987-07-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH041840A (en) | Data transfer control system | |
| JPH0626363B2 (en) | Padding control method by bisync protocol | |
| JPH01188374A (en) | print system | |
| JPS622747A (en) | Reception control system | |
| JPS6330044A (en) | Mode carrier control system | |
| JP2504062B2 (en) | Intermediary device for general-purpose bus connection of programmable controller | |
| JP2747154B2 (en) | Input/Output Processor | |
| JPS61294506A (en) | High-speed PIO transmission method in programmable controller | |
| JP3585052B2 (en) | Interface control device | |
| JPH03156558A (en) | Method for communication between host cpu and coprocessor | |
| KR0157253B1 (en) | How to control parallel interface of printer | |
| JPH084278B2 (en) | Microcomputer system with serial communication function | |
| JP3844024B2 (en) | Printing device | |
| JPH0625932U (en) | CPU board for parallel processing | |
| JPH0342740B2 (en) | ||
| JPH02136918A (en) | Format overlay output processing system for decentralized process | |
| JPS61233855A (en) | Communication controller | |
| JPS63257856A (en) | Serial communication method | |
| JPS6340955A (en) | Direct memory access controller | |
| JPH0525216B2 (en) | ||
| JPS62298858A (en) | Communication data processor | |
| JPH05233164A (en) | Parallel data processor | |
| JPH02250453A (en) | Data receiver | |
| JPH01219942A (en) | Buffer control system | |
| JPH05265923A (en) | Data transfer equipment |