JPS62131645A - Data communication equipment - Google Patents

Data communication equipment

Info

Publication number
JPS62131645A
JPS62131645A JP60272275A JP27227585A JPS62131645A JP S62131645 A JPS62131645 A JP S62131645A JP 60272275 A JP60272275 A JP 60272275A JP 27227585 A JP27227585 A JP 27227585A JP S62131645 A JPS62131645 A JP S62131645A
Authority
JP
Japan
Prior art keywords
data
character string
special character
mode
mode switching
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
JP60272275A
Other languages
Japanese (ja)
Inventor
Shinichi Kazamaki
風巻 慎一
Nobuo Hara
伸夫 原
Masato Atsume
厚目 正人
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP60272275A priority Critical patent/JPS62131645A/en
Publication of JPS62131645A publication Critical patent/JPS62131645A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

PURPOSE:To discriminate a code for mode switching even when a discrimination code is not included in an escape sequence data or the like by discriminating whether a special character string is transmitted at high speed or not and deciding whether or not an instruction is a mode switching instruction. CONSTITUTION:In applying mode switching, a mode switching key is depressed and a special character string for switching to each mode is fed to a reception buffer at specific speed. On the other hand, when the state sending the same character string as that of the mode switching is generated during the operation not being the object of mode switching, the similar character string is fed to the reception buffer. In this case, since an operation time exists between the special character inputted by the key operation of the operator and characters by an escape key (ESC) and its succeeding key operation, a timer 2 discriminates the specified value. Even when the special key is depressed as the character data, it is discriminated that the key depression is not for the mode switching through the former discrimination. Thus, whether or not the special character for the mode switching is discriminated.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、データ通信方式に係り、特にエスケープシー
ケンスを使用して1ill信を行うデータ通信装置に関
する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a data communication system, and particularly to a data communication device that performs one-ill communication using an escape sequence.

〔従 来 技 術〕[Traditional technique]

マイクロプロセッサ等の発達により各装置間でのデータ
の伝送が多く行われるようになった。現在では英数字を
表わすコードを伝送するばかりではなく、例えばJIS
等で定められζいる漢字コードを送る場合もある。
With the development of microprocessors and the like, data has become increasingly transmitted between devices. Nowadays, not only codes representing alphanumeric characters are transmitted, but also JIS
In some cases, the kanji code specified by ζ is sent.

一般的に漢字コードは2バイトより、また英数字コード
等は例えば1バイトよりなる。2バイトよりなる漢字コ
ードの中には英数字や特殊記号も含まれているが、コン
ピュータ間の伝送やコンピュータと端末等との伝送には
前述した英数字コード伝送の他に漢字コードをも送受信
できることが現在では望まれている。漢字コードを扱え
るシステムにおいては多くは漢字モードと英数モードと
の切り換え機能を有し、送受信装置間では特定コードの
シーケンスデータを伝送してモードを切り換えた後、漢
字コードを伝送している。そのシーケンスデータ(一般
的にはエスケープシーケンスデータが用いられている。
In general, Kanji codes consist of 2 bytes, and alphanumeric codes, for example, consist of 1 byte. The 2-byte kanji code includes alphanumeric characters and special symbols, but in transmission between computers and between computers and terminals, kanji codes are also sent and received in addition to the alphanumeric code transmission described above. It is now hoped that this will be possible. Most systems that can handle kanji codes have a function to switch between kanji mode and alphanumeric mode, and after transmitting sequence data of a specific code between transmitting and receiving devices and switching the mode, the kanji code is transmitted. The sequence data (generally escape sequence data is used).

)を受信した装置はその後は漢字コードデータとして受
信するデータを処理している。このモードの切換によっ
て英数字は1バイトで伝送し、漢字等は2バイトで伝送
することができ、英数字と漢字が混在するシステムでは
高速にデータ伝送を行える。また、一般的には英数字の
みによってO3(オペレーティングシステム)が動作し
、そのO8の管理下のプログラムを実行することによっ
て漢字コードを扱うことができるシステムにおいては、
前述したプログラムを実行した時に、コンピュータや端
末装置に対しモードの変更を行っている。このモードの
変更を行うのがエスケープシーケンス等である。しかし
ながら、バイナリ−データや英数字コードデータ等を伝
送する時に偶然にも前述したモード切り換えのための特
定コードを伝送しなくてはならない場合には伝送ができ
ないという問題を有していた。
) After that, the device that receives the data processes the received data as Kanji code data. By switching this mode, alphanumeric characters can be transmitted in 1 byte, and Kanji characters can be transmitted in 2 bytes, allowing high-speed data transmission in systems where alphanumeric characters and Kanji characters coexist. Additionally, in systems where the O3 (operating system) operates using only alphanumeric characters, and Kanji codes can be handled by running programs under the control of the O8,
When the above-mentioned program is executed, the mode of the computer or terminal device is changed. Escape sequences etc. are used to change this mode. However, there is a problem in that when transmitting binary data, alphanumeric code data, etc., if the above-mentioned specific code for mode switching has to be transmitted by chance, the transmission cannot be performed.

なぜならばモード切り換えのための特定コードすなわち
エスケープシーケンスではなく、そのコードが伝送した
いデータであるにもかかわらず送ってしまった場合には
、受信装置はエスケープシーケンスデータを受信したと
してモードを切り換えてしまっていたからである。その
ために、それ以後に送ったデータが例えば英数字コード
データであるにもかかわらず、漢字コードデータとして
受信されてしまっていた。
This is because if you send a specific code for mode switching, that is, an escape sequence, even though that code is the data you want to transmit, the receiving device will assume that it has received escape sequence data and switch the mode. This is because it was For this reason, even though the data sent thereafter was, for example, alphanumeric code data, it was received as Kanji code data.

このようなモード切り換えの問題を解決するために従来
ではモード切り換えのためのコードすなわち特殊文字列
として通信しているのかそれとも通常英数文字を伝送し
ているかを判定するコードを付加するような方式が用い
られている。この方式により、コンピュータ間の通信は
正常に行われている。しかしながら、コンピュータと端
末装置等におけるデータの伝送においては、モード切り
換えのためのコードであるか否かを判別させるコードを
オペレータのキー操作によって付加させなくてはならな
かった。この場合にはオペレータがその付加させるコー
ドに対応した操作をしなくてはならない問題の他に、更
にオペレータは常にそのモード切り換えであるか否かを
意識して使用しなくてはならない問題を有していた。
In order to solve this problem of mode switching, the conventional method is to add a code for mode switching, that is, a code that determines whether a special character string or normal alphanumeric characters are being transmitted. is used. With this method, communication between computers is performed normally. However, when transmitting data between a computer and a terminal device, etc., a code has to be added by an operator's key operation to determine whether the code is for mode switching or not. In this case, in addition to the problem that the operator must perform operations corresponding to the added code, there is also the problem that the operator must always be aware of whether or not the mode is to be switched. Was.

〔発明の目的〕[Purpose of the invention]

本発明は上記問題点に鑑み、モード切り換え等を表わす
特定コードを含む伝送システムにおいて、特定コードす
なわちエスケープシーケンスデータ等に判別コードを含
まなくてもその特定コードが受信すべきデータであるか
或いはモード切り換えのためのコードであるかを判別し
て受信するデータ通信装置を提供することをl」的とす
る。
In view of the above-mentioned problems, the present invention provides a transmission system that includes a specific code representing mode switching, etc. Even if the specific code, that is, escape sequence data, etc. does not include a discrimination code, the specific code is the data to be received or the mode It is an object of the present invention to provide a data communication device that determines whether the code is for switching and receives the code.

〔発明の要点〕[Key points of the invention]

本発明は上記目的を達成するために、データを受信する
受信手段と、 該受信手段より人力したデータが第1の特定データであ
るか否かを判別する第1の判別手段と、該判別手段によ
って前記第1の特定データであると判別した時より特定
時間内に前記第1の特定データ以後の少なくとも1個の
データが第2の特定データであるかを判別する第2の判
別手段と、該第2の判別手段によって前記第2の特定デ
ータであると判別した時に受信手段のモードを切り換え
るモード切換手段を有することを特徴とする。
In order to achieve the above object, the present invention includes a receiving means for receiving data, a first determining means for determining whether data manually input from the receiving means is first specific data, and the determining means. a second determining means for determining whether at least one piece of data subsequent to the first specific data is the second specific data within a specific time from when it is determined that the data is the first specific data; It is characterized by comprising a mode switching means for switching the mode of the receiving means when the second determining means determines that the data is the second specific data.

そして、その作用は以下の如くである。And its action is as follows.

データを受信する受信手段によって受信したデータが前
記第1の特定データであるか否かを前記第1の判別手段
で判別する。第1の特定データであった時には特定時間
以内に第2の特定データが受信されたか否かを前記第2
の判別手段で判別し、特定時間以内に前記第2の判別手
段で前記第2の特定データであると判別した時に受信手
段のモードを切換える。
The first determining means determines whether the data received by the receiving means for receiving data is the first specific data. If it is the first specific data, the second specific data determines whether or not the second specific data has been received within a specific time.
The mode of the receiving means is switched when the second determining means determines that the data is the second specific data within a specific time.

〔実  施  例〕〔Example〕

以下、図面を用いて本発明の詳細な説明する。 Hereinafter, the present invention will be explained in detail using the drawings.

第1図は本発明の実施例の回路構成図である。FIG. 1 is a circuit diagram of an embodiment of the present invention.

通信回線4には図示しないがオペレータによって操作さ
れる端末装置が接続されている。そして端末装置の操作
によって発生したコードデータが通信回線4を介して受
信BUFFER3に加わる。
Although not shown, a terminal device operated by an operator is connected to the communication line 4. Then, the code data generated by the operation of the terminal device is added to the reception BUFFER 3 via the communication line 4.

受信BUFFER3は例えば通信回線4より加わるシリ
アルデータをパラレルデータに変換し、プロセッサ回路
(CPU)1に出力する回路である。
The reception BUFFER 3 is, for example, a circuit that converts serial data applied from the communication line 4 into parallel data and outputs it to the processor circuit (CPU) 1.

プロセッサ1には状態情報メモリ5.特殊文字列一時記
憶メモリ6、特殊文字列比較情報メモリ7゜受信データ
メモリ8が接続されている。本発明の実施例においては
、漢字モードと通常モードとを有している。漢字モード
は受信したデータが漢字コードであるとして2バイト屯
位で受信後に処理するモードであり、通常モードは英数
字等のコードであるとして受信後に処理するモードであ
る。
The processor 1 includes a state information memory 5. A special character string temporary storage memory 6, a special character string comparison information memory 7, and a received data memory 8 are connected. The embodiment of the present invention has a kanji mode and a normal mode. The kanji mode is a mode in which the received data is treated as a kanji code and processed after reception in 2-byte units, and the normal mode is a mode in which the received data is treated as an alphanumeric code and processed after reception.

このモードは外部装置からのデータ(エスケープシーケ
ンスデータ)に対して切換わり、その状態が状態情報メ
モリ5の漢字モード中フラグKFに記憶される。一方、
本装置は内部的に前述したモード切換のためのデータす
なわち特殊文字列を受信中であるかの判別を行う。特殊
文字列を受信中にはこの判別によって特殊文字列中ソラ
グTFをオンとして特殊文字列の処理を行う。この処理
とは連続して受信BUFFER3を介してプロセッサ1
に加わるデータを特殊文字列単位で比較し、前述したモ
ード切り換えや通常文字モード切り換えを表わす特殊文
字列を受信した時には、前述した漢字モード中ソラグK
Fをオン或いはオフしてモードを切り換える。この比較
するための特殊文字列を記憶しているのが特殊文字列比
較情報メモI77である。特殊文字列中フラグTFがオ
ンの時に、受信中の特殊文字列を1バイト単位で一時記
憶するのが、特殊文字列一時記憶メモリ6である。
This mode is switched in response to data (escape sequence data) from an external device, and its state is stored in the kanji mode flag KF of the status information memory 5. on the other hand,
This device internally determines whether the data for mode switching described above, ie, the special character string, is being received. While receiving a special character string, the special character string TF is turned on based on this determination, and the special character string is processed. This process involves successively receiving data from the processor 1 via the reception BUFFER 3.
When the special character string representing the above-mentioned mode switching or normal character mode switching is received, the data added to the
Switch the mode by turning F on or off. A special character string comparison information memo I77 stores special character strings for comparison. The special character string temporary storage memory 6 temporarily stores the special character string being received in 1-byte units when the special character string medium flag TF is on.

例えば漢字モード切り換えの特殊文字列が力Uわってい
る時には第1番目に“ESC″2次にA″。
For example, when the special character string for switching kanji mode is changed, the first character string is "ESC" and the second character string is "A".

次に“B″が順次特殊文字列一時記憶メモリに記憶され
る。また、特殊文字列受信中に前述した漢字モード切り
換え、通常文字モード切り換えの特殊文字列でないと判
別した時には特殊文字列一時記憶メモリ6の内容を受信
データメモリ8に格納する。
Next, "B" is sequentially stored in the special character string temporary storage memory. Further, when it is determined that the special character string is not a special character string for switching to the above-mentioned kanji mode or normal character mode while receiving the special character string, the contents of the special character string temporary storage memory 6 are stored in the received data memory 8.

前述した通信回[4に接続される図示しない端末装置は
オペレータによって操作されるものであり、例えばモー
ド切り換えを行う時には特定のキーすなわちモード切り
換えキーが押下される。このキーが押下された時には各
モードへの切り換え用の特殊文字列が特定の速度(通信
回線のボーレート等で決まる)で本発明の実施例の受信
バッファに加わる。一方、モード切り換えを目的としな
い操作中にモード切り換えと同じ文字列を送信する状態
が発生した場合にも同様の文字列が受信バッファに加わ
る。この2つの場合において、異なる点はそのコードが
例えばバイト単位で加わる速度が違うことである。すな
わち、モード切り換えのキーを押下した時には自動的に
発生して特定の速度でその特殊文字列がバッファに加わ
るが、オペレータの操作によって発生した特殊文字列と
同じコードのデータは各バイト単位でゆっくりと加わる
。この加わるデータの速度を判別して同じ文字列であっ
てもモード切り換えのための文字列であるか否かを決定
するのが本発明の特徴である。
The terminal device (not shown) connected to the communication circuit [4] is operated by an operator, and for example, when switching modes, a specific key, that is, a mode switching key is pressed. When this key is pressed, a special character string for switching to each mode is added to the receive buffer of the embodiment of the present invention at a specific speed (determined by the baud rate of the communication line, etc.). On the other hand, if a situation occurs in which the same character string as that for mode switching occurs during an operation not intended for mode switching, the same character string is added to the reception buffer. The difference between these two cases is that the code is added at different speeds, for example in bytes. In other words, when a mode switching key is pressed, a special character string is automatically generated and added to the buffer at a specific speed, but data with the same code as the special character string generated by the operator's operation is added slowly in each byte. added. A feature of the present invention is that the speed of this added data is determined to determine whether or not even the same character string is a character string for mode switching.

この判別を行うために時間計測用タイマー(Timer
) 2がプロセッサに接続されている。
To make this determination, a timer (Timer) is used to measure time.
) 2 is connected to the processor.

第2図は本発明の実施例の動作フローチャートである。FIG. 2 is an operational flowchart of the embodiment of the present invention.

以下では前述した各メモリを用いて受信BUFFER3
で受信したデータに対しプロセッサ1がどのような処理
を実行し、モード切り換えがどのようになされるかを詳
細に説明する。
Below, using each memory mentioned above, the reception BUFFER3
The following describes in detail what processing the processor 1 executes on the data received and how the mode is switched.

本発明の実施例が動作を開始S0すると、まず、−9= 受信文字があるか否かの判別S1を行う。動作開始S0
において、受信文字が無い場合Noにはタイマー2が規
定値であるか否かを判別S25する。
When the embodiment of the present invention starts its operation S0, it first performs S1 to determine whether there is a -9=received character. Operation start S0
In the case where there is no received character, if No, it is determined whether or not the timer 2 is at the specified value in step S25.

タイマー2は後述する処理において起動された時より計
時を行うものであり、動作開始S0直後においてはタイ
マー2は起動されていない。これにより、タイマー2は
規定値とはならず(NO)、再度受信文字ありか否かの
判別処理S1より実行する。この動作は順次、データを
受信し、文字コードが受信BUFFEHに格納されるま
で繰り返す。そして、図示しない端末装置より通信回線
4を介して受信BUFFER3に格納されると判別処理
S1において有りと検出され(YES) 、受信BUF
FER3より文字を読出す処理S2を行う。そして、現
在のモードが特殊文字列中であるか否かの判別処理S3
を行う。特殊文字列中でない時には、更に次に受信した
文字が特殊文字列の先頭の文字であるか否かの判別処理
S17を行う。
The timer 2 measures time from the time it is activated in a process to be described later, and the timer 2 is not activated immediately after the start of operation S0. As a result, the timer 2 does not reach the specified value (NO), and the process of determining whether or not there is a received character is executed again from step S1. This operation is repeated until data is sequentially received and the character code is stored in the reception BUFFEH. Then, when it is stored in the reception BUFFER 3 via the communication line 4 from a terminal device (not shown), it is detected as present in the determination process S1 (YES), and the reception BUFF
A process S2 for reading characters from FER3 is performed. Then, determination processing S3 whether the current mode is in a special character string or not
I do. When the character string is not in the special character string, a determination process S17 is performed to determine whether the next received character is the first character of the special character string.

この判別処理317において特殊文字列でない(No)
時には、現在のモードが漢字モード中であるか否かの判
別処理S22を行う。この判別処理S22において漢字
モード中である(YES)ならば受信した文字を漢字コ
ードに変換する処理S23を行う。この処理S23は、
例えば受信するデータが連想かな文字入力等の場合に、
その人力したかな文字を本発明の実施例における漢字コ
ードに変換する処理である。なお、直接漢字コードが1
バイト単位で入力する場合にはこの処理は必要としない
。そして、変換した文字を受信データメモリ8に格納す
る。前述した漢字モード中であるか否かの判別処理32
2において漢字モードで無い(No)であった時には受
信データを受信データメモリ8に格納する処理324を
行う。この処理によって各モードにおりる受信データが
受信データメモリ8に格納される。なお、この漢字モー
ド中であるか否かの判別処理322は前述した第1図に
おける漢字モード中ソラグKFがオンであるかオフであ
るかによってなされる。第3図は通常文字モード中にデ
ータを受信した時の各メモリへどのようにそのデータが
格納されるかを表わすメモリ内容図である。動作開始の
時(第3図(1))には各メモリ5,6.8と受信BU
FFER3には何も記憶されていない。なお、この時に
はフラグもオフとなっており、通常文字モードであり、
更に特殊文字列中ではないとなっている。そして受信B
UFFER3にデータ”A”が加わった(第3図(2)
)以後は前述したように判別処理Sl、S17,322
が行われて、処理S24を実行する。これによって受信
データメモリ8にA”が格納される。更につづいて′B
”。
In this determination process 317, it is not a special character string (No)
Sometimes, a determination process S22 is performed to determine whether the current mode is the kanji mode. If it is in the kanji mode (YES) in this determination process S22, a process S23 is performed to convert the received characters into kanji codes. This process S23 is
For example, if the data to be received is an associative character input, etc.
This is the process of converting the human-written kana characters into kanji codes in the embodiment of the present invention. In addition, the direct kanji code is 1
This process is not necessary when inputting in bytes. Then, the converted characters are stored in the received data memory 8. Process 32 for determining whether or not the kanji mode is in progress as described above.
If the kanji mode is not in step 2 (No), a process 324 is performed in which the received data is stored in the received data memory 8. Through this process, the received data in each mode is stored in the received data memory 8. The process 322 for determining whether or not the kanji mode is in effect is performed depending on whether the SORAG KF in the kanji mode shown in FIG. 1 is on or off. FIG. 3 is a memory content diagram showing how data is stored in each memory when data is received during the normal character mode. At the start of operation (Fig. 3 (1)), each memory 5, 6.8 and reception BU
Nothing is stored in FFER3. At this time, the flag is also off, and the mode is normal character mode.
Furthermore, it is specified that it is not in a special character string. and reception B
Data “A” has been added to UFFER3 (Figure 3 (2)
) After that, as mentioned above, the discrimination processing Sl, S17, 322
is performed, and processing S24 is executed. As a result, A'' is stored in the received data memory 8.Furthermore, 'B
”.

“C”と加わった時には第3図(4)に示すように受信
データメモリ8に“B”、“C”が記憶される。
When "C" is added, "B" and "C" are stored in the received data memory 8 as shown in FIG. 3 (4).

一方、判別処理317において受信したデータすなわち
文字が特殊文字列の先頭であった時(YES)には、ま
ず受信した文字を特殊文字列一時記憶メモリ6に格納す
る処理S19を行う。
On the other hand, if the received data, that is, the character, is the beginning of the special character string in the determination process 317 (YES), a process S19 is performed in which the received character is stored in the special character string temporary storage memory 6.

そして特殊文字列中フリップフロップTFをオンとして
特殊文字列中にする(S20)とともに、タイマー2を
起動(321)する。この処理520によって次に文字
が入力した時には、特殊文字列中であるか否かの判別処
理S3によって判別された次の処理S4を行う。しかし
ながら、この文字が入力する前は判別処理Sl、S25
を繰り返しているので、例えばオペレータのキー操作に
よって入力した特殊文字のエスケープキー(ESC)と
その後のキー操作による文字との間には操作の時間を有
するため、判別処理S25においてタイマー2が規定値
であると(YES)判別される。そして、この時にはタ
イマー2の計時動作を停止させる処理S26を行うとと
もに、特殊文字列中フラグTFをオフとする処理S27
を行う。この判別処理S25によって、特殊文字列の先
頭文字が加わっても特定の時間を有したとして特殊文字
列におけるモード切り換えではないと判断される。オペ
レータによるキー操作で特殊文字が押下されても、この
判別でその特殊キーが文字データとして押下されたもの
であって、モード切り換えのためのものではないと判断
されたので、つづいて特殊文字列一時記憶メモリに格納
された文字データを受信データメモリ8に格納する処理
−13= 32Bを行い、再度受信文字があるか否かの判別処理を
実行する。
Then, the special character string flip-flop TF is turned on to enter the special character string (S20), and the timer 2 is activated (321). When a character is inputted next time through this process 520, the next process S4 determined by the process S3 for determining whether or not it is in a special character string is performed. However, before this character is input, the determination process Sl, S25
is repeated, for example, there is an operation time between the special character escape key (ESC) input by the operator's key operation and the character input by the subsequent key operation. (YES). At this time, a process S26 is performed to stop the time counting operation of the timer 2, and a process S27 is performed to turn off the special character string medium flag TF.
I do. Through this determination process S25, even if the first character of the special character string is added, it is determined that the special character string has a specific time and is not a mode change in the special character string. Even if a special character is pressed by a key operation by the operator, this judgment determines that the special key was pressed as character data and not for mode switching, so the special character string is The process of storing the character data stored in the temporary storage memory in the received data memory 8 -13=32B is performed, and the process of determining whether or not there is a received character is performed again.

特殊文字列を発生するために例えば端末装置のモード切
り換えキーがオペレータによって押下された時には特殊
文字につづいて連続的に発生ずるので、前述したタイマ
ー2が規定値であるか否かの判別によって規定値である
と検出されることはなく、その前に文字が入力するので
、判別処理S1で受信文字列と判別されて、次の判別処
理S 3.が実行される。モード切り換えキーを押下し
て、モードを切り換えるためのエスケープシーケンスの
特殊文字を検出した後の文字の時には、特殊文字列中で
あるか否かの判別S3において特殊文字列中である(Y
ES)と判断される。この時には、つづいて、特殊文字
列一時記憶メモリ6に受信した文字を格納する処理S4
を行う。エスケープシーケンスは1文字で構成されるの
ではなく、複数文字によって構成されるので、モード切
り換えのための特殊文字列であるか或いはそれとは異な
るものであるかを判別するのは一連の特殊文字=14− 列が入力した時に明らかとなるので、それまで受信した
データを記憶する必要がある。
For example, when the mode switching key of a terminal device is pressed by an operator to generate a special character string, special characters are generated consecutively, so the specified character string is determined by determining whether or not the above-mentioned timer 2 is at the specified value. Since it is not detected as a value and a character is input before it, it is determined to be a received character string in the discrimination process S1, and the next discrimination process S3. is executed. When the mode switching key is pressed and the special character of the escape sequence for switching the mode is detected, the character is found to be in the special character string (Y
ES). At this time, the process S4 continues to store the received characters in the special character string temporary storage memory 6.
I do. Since an escape sequence is not made up of one character but multiple characters, it is a series of special characters that determines whether it is a special character string for mode switching or something different. 14- As the column becomes clear when it is entered, it is necessary to remember the data received so far.

この一時記憶するのが、特殊文字列一時記憶メモリであ
る。そして、特殊文字列一時記憶メモリに文字を格納す
る処理S4を行った後、特殊文字列比較情報メモリ7に
格納されている各モード切り換えのデータと入力した文
字すなわち特殊文字列一時記憶メモリ6の内容とを比較
する。一致していない時(No)には、タイマー2を停
止(S6)するとともに特殊文字列中フラグTFをオフ
(S7)とする。比較が一致しない時には、文字列のデ
ータの途中であっても以後の比較は意味をなさないので
、この時点で特殊文字列中フラグをオフとして現在のモ
ードでそのままその文字を受信する動作を行う。そして
、処理328と同様に特殊文字一時記憶メモリ6に格納
されたデータと受信データメモリに格納する処理S8を
行う。
This temporary storage is a special character string temporary storage memory. After performing the process S4 of storing characters in the special character string temporary storage memory, the data for each mode switching stored in the special character string comparison information memory 7 and the input characters, that is, the special character string temporary storage memory 6, are Compare the contents. If they do not match (No), the timer 2 is stopped (S6) and the special character string medium flag TF is turned off (S7). If the comparison does not match, the subsequent comparison will be meaningless even if it is in the middle of the string data, so at this point, turn off the special string middle flag and receive the character as is in the current mode. . Then, similar to process 328, process S8 is performed to store the data stored in the special character temporary storage memory 6 and the received data memory.

また前述した判別処理S5において一致していると判別
した時には、次に受信中のデータが特殊文字列の文字数
となったか否かを判別する。前述の判別処理S5におい
ては単に入力した文字数分の文字が一致しているか否か
を判別しているので、文字列中の途中であってもそこま
での文字の比較が一致した時には、YESとなる。よっ
て、この受信中の文字が特殊文字列の規定の文字数とな
ったか否かを判別S9することによって特殊文字列を一
連にわたって受信したか否かが判別できる。
Further, when it is determined in the above-described determination process S5 that they match, it is then determined whether or not the data being received has reached the number of characters of the special character string. In the above-mentioned determination processing S5, it is simply determined whether or not the number of input characters matches, so even if the characters are in the middle of the string, if the comparison of characters up to that point matches, YES is returned. Become. Therefore, by determining whether or not the number of characters being received has reached the prescribed number of characters of the special character string (S9), it is possible to determine whether or not a series of special character strings have been received.

特定の文字数でない時には更にその後につづく文字によ
って規定されるので、この時点ではモードの切り換えは
行わず、タイマー2を再起動316する。また判別S9
において一致した時(YF、S)には、この特殊文字列
は特殊文字列比較情報メモ+J 7に格納されているデ
ータと一致していたので、以後の処理でモード切り換え
等を行う。まず、タイマー2を停止(S10)し、特殊
文字中ソラグTFをオフとする(Sll)。特殊文字列
を一連にわたって受信し、特殊文字列であると判断され
ているので、この処理S10.S11がなされるのであ
る。そしてこの処理の後に特殊文字列一時記憶メモリ6
の内容をクリアS12する。その時点では特殊文字すな
わちモード切り換えのエスケープシーケンスを検出した
だけであるので、次には漢字モード切り換えの特殊文字
列を検出したか否かの判別処理S13を行う。漢字モー
ド切り換えであった時(YES>には漢字モード中にす
る処理S14すなわち漢字モードフラグK I?をオン
とする処理を行う。また漢字モード切り換えでなかった
時(NO)には、通常文字モード切り換えであるので(
本発明の実施例では漢字モード切り換えESC”、“A
″、B”2通常文字モード切り換えESC″、“C″、
D″の2種類しかない)、漢字モード中でなくする処理
S15すなわち漢字モードフラグKFをオフとする処理
を行う。
If the number of characters is not a specific number, it is determined by the characters that follow, so the mode is not switched at this point, and the timer 2 is restarted 316. Also, discrimination S9
When there is a match (YF, S), this special character string matches the data stored in the special character string comparison information memo +J7, so mode switching is performed in subsequent processing. First, the timer 2 is stopped (S10), and the special character TF is turned off (Sll). Since a series of special character strings have been received and are determined to be special character strings, this process S10. S11 is performed. After this process, the special character string temporary storage memory 6
Clear the contents of S12. At that point, only a special character, that is, an escape sequence for mode switching has been detected, so next a determination process S13 is performed to determine whether or not a special character string for kanji mode switching has been detected. When the kanji mode has been switched (YES>, the process S14 to enter the kanji mode, that is, the process of turning on the kanji mode flag KI?) is performed. When the kanji mode has not been switched (NO), the normal character Since it is a mode switch (
In the embodiment of the present invention, Kanji mode switching ESC", "A
”, B”2 Normal character mode switching ESC”, “C”,
(There are only two types, D''), a process S15 for eliminating the kanji mode flag, that is, a process for turning off the kanji mode flag KF, is performed.

前述した処理S8.S14.S15.S16゜S21.
S24.328が実行した後は全て判別処理S1を行う
ので、1文字車位で受信するデータを常に判別するとと
もに、特殊文字“ESC”を受信した後にはその後につ
づく文字が特殊文字列の文字であるか否かを判別し、更
にその各文字を受信する時間をも検知することができる
。特にオペレータの操作による偶然の一致による特殊文
字列とモード切り換えキーによる特殊文字列とがその受
信する時間によって判別することができる。
The above-mentioned process S8. S14. S15. S16°S21.
After S24.328 is executed, all determination processing S1 is performed, so data received at one character position is always determined, and after receiving the special character "ESC", the following character is a character of a special character string. It is possible to determine whether there is one or not, and also to detect the time at which each character is received. In particular, it is possible to distinguish between a special character string caused by a coincidence caused by an operator's operation and a special character string caused by a mode switching key based on the time at which the character string is received.

第4図、第5図にはモード切り換えが行われる場合と、
モード切り換えが行われずにデータとして受信した場合
を表わすメモリ内容図である。受信データメモリ8にA
、B、Cが格納された後に“ESC″の文字が受信BU
FFER3に入った時(第4図(1))には、状態情報
メモリ4の特殊文字列中フラグがオンとなり、受信BU
FFER3の内容すなわち“ESC”は特殊文字列一時
記憶メモリ6に格納される。そしてつづいて“A”。
Figures 4 and 5 show cases where mode switching is performed,
FIG. 7 is a memory content diagram showing a case where data is received without mode switching; FIG. A to receive data memory 8
, B, and C are stored, the character “ESC” is received in the BU
When entering FFER3 (Fig. 4 (1)), the special character string flag in the status information memory 4 is turned on, and the received BU
The contents of FFER3, ie, “ESC” are stored in special character string temporary storage memory 6. And then “A”.

“B”が受信されて、それぞれ順次特殊文字列一時記憶
メモリ6に格納された後(第4図+31. (41)は
、前述した判別処理S5.S10で検出されるので、第
4図(5)に示すように受信データは読出され、モード
変換すなわち漢字モード中フラグがオンとなる。この後
はつづくデータが漢字に変換される。第5図(11に示
すように“ESC″なる受信バッファに格納され、更に
前述した判別処理S17で検出された時には、!1、〜
外交字列一時記憶メモリ6に“ESC”が格納され、状
態情報メモリ5の特殊文字列中フラグのT Fがオンと
なる(第5図(2))。しかしながら、次につづく文字
が直ちに入力するのではなく 、i¥定時間を過ぎた後
即ちタイマー2が規定値をこした後で入力した場合には
、その前に判別処理S25においてこの時間が検出され
ているので、処理S27,82Bによって特殊文字列中
フラグはオフとなり、特殊文字“ESC”は受信データ
メモリ8に格納される。
After "B" is received and sequentially stored in the special character string temporary storage memory 6 (Fig. 4+31. (41) is detected in the above-mentioned discrimination processing S5 and S10, as shown in Fig. 4 (+31). As shown in Figure 5 (11), the received data is read and the mode conversion, that is, the Kanji mode flag is turned on.After this, the following data is converted to Kanji. When stored in the buffer and further detected in the above-mentioned discrimination process S17, !1, ~
"ESC" is stored in the external character string temporary storage memory 6, and the special character string medium flag TF in the status information memory 5 is turned on (FIG. 5(2)). However, if the next character is not input immediately, but after the fixed time has elapsed, that is, after the timer 2 has exceeded the specified value, this time is detected in the determination process S25 beforehand. Therefore, the special character string medium flag is turned off by processing S27, 82B, and the special character "ESC" is stored in the received data memory 8.

よってつづいて“A”、“B”が受信されても、特殊文
字列中フラグはオフとなっているので、受信データメモ
リ12にそのまま格納される。
Therefore, even if "A" and "B" are subsequently received, since the special character string flag is off, they are stored in the received data memory 12 as they are.

以上、本発明の詳細な説明したが、本発明はコンピュー
タと5:、+i未装置とは限らず、端末装置と端末装置
やコンピュータとコンビ1−夕とのデータの伝送におい
ても同様に行うことができる。
Although the present invention has been described in detail above, the present invention is applicable not only to data transmission between a computer and a computer, but also to data transmission between a terminal device and a computer and a combination device. I can do it.

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

以上述べたように本発明は特殊文字列を高速で伝送され
ているか否かを判別して、モード切り換えの指示である
か否かを決定しているので、本発明によればオペレータ
はそのコードの送出を全く感知せずに操作でき、更に特
定コートすなわちエスケープシーケンスデータ等に判別
コードを含まなくてもその特定コードが受信すべきデー
タであるか或いはモード切り換えのためのコードである
かを判別して受信するデータ通信装置を得ることができ
る。
As described above, the present invention determines whether or not a special character string is being transmitted at high speed to determine whether or not it is an instruction to switch modes. It can be operated without sensing the transmission of the code at all, and even if the specific code, that is, the escape sequence data, etc. does not include a discrimination code, it can be determined whether the specific code is data to be received or a code for mode switching. It is possible to obtain a data communication device for receiving data.

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

第1図は本発明の実施例の回路構成図、第2図は本発明
の実施例の動作フローチャート、第3図〜第5図はメモ
リ内容図である。 1・・・プロセッサ(CPU)、 2・・・タイマー(Timer  )、3・・・受信B
 U F F E R。 5・・・状態情報メモリ、 6・・・特殊文字列一時記憶メモリ、 7・・・特殊文字列比較情報メモリ。 特許 出願人   カシオ計算機株式会社第5図 り一一一一一一一」  し−一一一一一一一1第5図
FIG. 1 is a circuit configuration diagram of an embodiment of the present invention, FIG. 2 is an operation flowchart of the embodiment of the present invention, and FIGS. 3 to 5 are memory content diagrams. 1... Processor (CPU), 2... Timer (Timer), 3... Reception B
U F F E R. 5... Status information memory, 6... Special character string temporary storage memory, 7... Special character string comparison information memory. Patent Applicant Casio Computer Co., Ltd. 5th Figure 1111111 Figure 5

Claims (1)

【特許請求の範囲】 データを受信する受信手段と、 該受信手段より入力したデータが第1の特定データであ
るか否かを判別する第1の判別手段と、該判別手段によ
って前記第1の特定データであると判別した時より特定
時間内に前記第1の特定データ以後の少なくとも1個の
データが第2の特定データであるかを判別する第2の判
別手段と、該第2の判別手段によって前記第2の特定デ
ータであると判別した時に受信手段のモードを切り換え
るモード切換手段を有することを特徴としたデータ通信
装置。
[Scope of Claims] Receiving means for receiving data; first determining means for determining whether or not data input from the receiving means is first specific data; a second determining means for determining whether at least one piece of data subsequent to the first specific data is second specific data within a specific time from when it is determined that the data is specific data; A data communication device comprising mode switching means for switching the mode of the receiving means when the means determines that the received data is the second specific data.
JP60272275A 1985-12-03 1985-12-03 Data communication equipment Pending JPS62131645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60272275A JPS62131645A (en) 1985-12-03 1985-12-03 Data communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60272275A JPS62131645A (en) 1985-12-03 1985-12-03 Data communication equipment

Publications (1)

Publication Number Publication Date
JPS62131645A true JPS62131645A (en) 1987-06-13

Family

ID=17511578

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60272275A Pending JPS62131645A (en) 1985-12-03 1985-12-03 Data communication equipment

Country Status (1)

Country Link
JP (1) JPS62131645A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6322673A (en) * 1986-07-16 1988-01-30 Brother Ind Ltd Printer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6322673A (en) * 1986-07-16 1988-01-30 Brother Ind Ltd Printer

Similar Documents

Publication Publication Date Title
US5241646A (en) Systems for changing hardware parameters using sub-CPU for sensing specialized key inputs and main CPU for changes
JPS62131645A (en) Data communication equipment
US4263658A (en) Electronic apparatus capable of storing operational sequence
JPS6237405B2 (en)
US5600556A (en) Word processor that automatically capitalizes the first letter of sentence
JPH0618023B2 (en) Type control board input control system
JPS63164554A (en) Automatic recognizing system for data speed
JPS6156809B2 (en)
JP2587918Y2 (en) Mobile terminal device
JPS61148556A (en) Control code detector of communication
JPS6226528A (en) Input data discriminating system
JPS5972511A (en) Special code input device using ordinary code
JP2616545B2 (en) Data receiving system
JPH07162479A (en) Device and method for communication control
JPS6226497B2 (en)
JPS6346868B2 (en)
JPH02130611A (en) Command mask circuit for keyboard
JPH0142408B2 (en)
JPS60120453A (en) Processing system of received data
JPH06161624A (en) Interruption controlling method
JPS6324431A (en) Data communication system
JPS62125456A (en) Data processing system for communication control unit
GB2064181A (en) Character Processing in Document Readers
JPS6141013B2 (en)
JPS61251257A (en) Monitoring equipment for serial transmission line