JP2639248B2 - Communication interface device - Google Patents

Communication interface device

Info

Publication number
JP2639248B2
JP2639248B2 JP3228566A JP22856691A JP2639248B2 JP 2639248 B2 JP2639248 B2 JP 2639248B2 JP 3228566 A JP3228566 A JP 3228566A JP 22856691 A JP22856691 A JP 22856691A JP 2639248 B2 JP2639248 B2 JP 2639248B2
Authority
JP
Japan
Prior art keywords
communication
program
transfer
data
master cpu
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
Application number
JP3228566A
Other languages
Japanese (ja)
Other versions
JPH05130165A (en
Inventor
要一 菊川
高明 松本
正寿 永墓
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.)
Motorola Solutions Japan Ltd
Original Assignee
Nippon Motorola 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 Nippon Motorola Ltd filed Critical Nippon Motorola Ltd
Priority to JP3228566A priority Critical patent/JP2639248B2/en
Publication of JPH05130165A publication Critical patent/JPH05130165A/en
Application granted granted Critical
Publication of JP2639248B2 publication Critical patent/JP2639248B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、データの送受信を行な
う通信インターフェイス装置に関し、さらに詳しくはマ
スタCPUから送られた通信手順を記憶しその手順に従
って、データの送受信を実行する通信インターフェイス
装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication interface device for transmitting and receiving data, and more particularly to a communication interface device for storing a communication procedure sent from a master CPU and executing data transmission and reception in accordance with the procedure.

【0002】[0002]

【従来の技術】 従来からモデムと呼ばれるインターフ
ェイスが装置と通信回線との間に介在し、装置で発生し
たデータを通信回線へ送出し、あるいはその逆を行う。
このようなインターフェイスを必要とするのは、最も効
率よくデータの伝送を行うために通信回線の特性に合致
した伝送条件を実現するためである。
2. Description of the Related Art Conventionally, an interface called a modem intervenes between a device and a communication line to send data generated by the device to the communication line or vice versa.
Such an interface is required to realize transmission conditions that match the characteristics of the communication line in order to transmit data most efficiently.

【0003】インターフェイスを構成するために、たと
えばマイクロプロセッサと通信用周辺ICが組み合わさ
れて使用されることが多い。通信用周辺ICはマイクロ
プロセッサから送られたデータを一時的に記憶し、その
通信用周辺IC予め定める手順に従った信号を外部通信
回線上に送出する。このような通信用周辺ICとして、
たとえばインテル社の8251あるいはザイログ社のZ
80ーSI0などがある。
In order to configure an interface, for example, a microprocessor and a peripheral IC for communication are often used in combination. The communication peripheral IC temporarily stores the data sent from the microprocessor, and sends out a signal on an external communication line according to a procedure predetermined by the communication peripheral IC. As such a peripheral IC for communication,
For example, Intel's 8251 or Zilog's Z
80-SI0.

【0004】[0004]

【発明が解決しようとする課題】マイクロプロセッサと
組み合わせて外部装置と通信を行う通信用周辺ICを使
用するためには、そのICに予め定める仕様に従わなけ
ればならない。たとえば、通信ポート数、通信速度、ポ
ートのピン割当て、ハンドシェイク条件などに従ってイ
ンターフェイス装置を設計する必要がある。このように
従来の通信用周辺ICを使用する限り、インターフェイ
スの設計に大きな制約が加わる。前述した仕様からの制
約を考察すると、通信ポートは従来の通信用周辺ICで
は通常1ないし2組が用意されており、それ以上の通信
ポートを必要とするシステムでは通信用周辺ICを増設
する必要が生じる。通信速度を切り換えるためには、外
部にディップスイッチを設けるか、またはマイクロプロ
セッサ側から設定するには専用の制御線を設ける必要が
ある。また、ポートのピン割当てについては、通信用周
辺ICが通信プロコトルとしてRS232Cを用いる場
合、通信のための制御線、たとえばRS,CS,DR,
ERなどの信号は予め決められており、その制御の内
容、制御線の本数あるいはピンの配置を変更することは
不可能である。さらに、ハンドシェイク条件もその通信
用周辺ICに予め定められており変更して使用すること
はできない。したがって、新しいプロコトルを使用して
通信を行うことはできない。
In order to use a peripheral IC for communication that communicates with an external device in combination with a microprocessor, it is necessary to follow a specification predetermined for the IC. For example, it is necessary to design an interface device according to the number of communication ports, communication speed, pin assignment of ports, handshake conditions, and the like. As described above, as long as the conventional peripheral IC for communication is used, a great restriction is imposed on the design of the interface. Considering the restrictions from the above specifications, one or two sets of communication ports are usually prepared for the conventional communication peripheral IC, and it is necessary to add the communication peripheral IC for a system requiring more communication ports. Occurs. In order to switch the communication speed, it is necessary to provide a dip switch externally, or to provide a dedicated control line for setting from the microprocessor side. Regarding port pin assignment, when the communication peripheral IC uses RS232C as a communication protocol, control lines for communication, for example, RS, CS, DR,
Signals such as ER are determined in advance, and it is impossible to change the content of control, the number of control lines, or the arrangement of pins. Further, the handshake condition is also predetermined in the peripheral IC for communication and cannot be changed and used. Therefore, communication cannot be performed using the new protocol.

【0005】以上のように、従来の通信用周辺ICはさ
まざまな仕様に従って設計される必要があり、設計内容
によっては使用しない制御線や機能を残したまま通信イ
ンタフェースを構成しなければならない結果となる。
As described above, conventional communication peripheral ICs need to be designed in accordance with various specifications, and depending on the design contents, the result is that a communication interface must be configured while leaving unused control lines and functions. Become.

【0006】したがって、本発明は上記課題を解決する
ためになされたもので、マスタCPUから転送される通
信手順に従う汎用性の高い通信インタフェース装置を提
供することを目的とする。
SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a highly versatile communication interface device that follows a communication procedure transferred from a master CPU.

【0007】[0007]

【課題を解決するための手段】本発明は、マスタCPU
から送出されたシリアルのデータを受信し予め定める通
信手順に従って前記データを外部通信線へ送出し、およ
び、外部通信線上のデータを受信し予め定める通信手順
に従ってシリアルの前記データをマスタCPUへ送出す
る通信インターフェイス装置において、前記通信手順を
実行する通信プログラムを記憶するための通信プログラ
ム記憶手段と、前記マスタCPUに格納された前記通信
プログラムを前記通信インターフェイス装置に転送する
転送プログラムを記憶するための転送プログラム記憶手
段と、前記マスタCPUからの開始信号の受信に応答し
て、前記マスタCPUから前記転送プログラムを前記転
送プログラム記憶手段に転送する転送プログラム転送手
段と、前記転送プログラムの前記転送プログラム記憶手
段への転送完了後における前記転送プログラムの実行に
より、前記マスタCPUに格納されている前記通信プロ
グラムを通信プログラム記憶手段に転送する通信プログ
ラム転送手段とから構成され、前記通信プログラムの実
行により、前記通信インターフェイス装置から前記外部
通信線へのデータの送出が可能であることをマスタCP
Uが検出した場合は前記マスタCPUから送出されたシ
リアルの前記データに含まれる送信情報に基づく条件に
より前記外部通信線に前記データが送出され、前記外部
通信線から前記マスタCPUへのシリアルのデータの送
出が可能な場合は前記外部通信線から受信したデータの
受信条件がシリアルの前記データに付加されて前記マス
タCPUに送出される1チップの半導体集積回路よりな
る通信インターフェイス装置である。
The present invention provides a master CPU.
And transmits the data to an external communication line according to a predetermined communication procedure, and receives data on the external communication line and transmits the serial data to the master CPU according to a predetermined communication procedure. In the communication interface device, a communication program storage means for storing a communication program for executing the communication procedure, and a transfer for storing a transfer program for transferring the communication program stored in the master CPU to the communication interface device. Program storage means, transfer program transfer means for transferring the transfer program from the master CPU to the transfer program storage means in response to reception of a start signal from the master CPU, and transfer program storage means for the transfer program After the transfer to And a communication program transfer means for transferring the communication program stored in the master CPU to a communication program storage means by executing the transfer program in the communication interface device. Master CP confirms that data can be sent to communication line
When U is detected, the data is transmitted to the external communication line under a condition based on transmission information included in the serial data transmitted from the master CPU, and serial data from the external communication line to the master CPU is transmitted. Is a communication interface device composed of a one-chip semiconductor integrated circuit that transmits the reception condition of data received from the external communication line to the serial data when the transmission condition is possible.

【0008】[0008]

【作用】通信インターフェイス装置は、マスタCPUと
外部通信線との間に介在し、それらの間のデータの通信
を行う。マスタCPUからシリアルのデータが通信イン
ターフェイス装置に送られ、予め定める通信手順に従っ
て外部通信線へ前記データを送出する。また、外部通信
線を介して送られたデータは、予め定める通信手順に従
って、マスタCPUへシリアルのデータが送出される。
通信インターフェイス装置は通信プログラム記憶手段,
転送プログラム記憶手段,転送プログラム記憶手段およ
び通信プログラム転送手段を含み、転送プログラム転送
手段はマスタCPUからの開始信号の受信に応答して、
転送プログラムをマスタCPUから通信インターフェイ
ス装置に転送する。転送プログラムは、通信プログラム
をマスタCPUから通信インタフェイス装置へ転送する
ためのプログラムで、転送プログラム記憶手段に格納さ
れる。転送プログラムが転送プログラム記憶手段に格納
されると、転送プログラムが実行され、通信プログラム
転送手段は通信プログラをがマスタCPUから通信プロ
グラム記憶手段に格納する。
The communication interface device is interposed between the master CPU and an external communication line, and performs data communication between them. Serial data is sent from the master CPU to the communication interface device, and the data is sent to an external communication line according to a predetermined communication procedure. The data transmitted via the external communication line is transmitted to the master CPU according to a predetermined communication procedure.
The communication interface device is a communication program storage means,
Transfer program storage means, transfer program storage means, and communication program transfer means, wherein the transfer program transfer means responds to the reception of the start signal from the master CPU;
The transfer program is transferred from the master CPU to the communication interface device. The transfer program is a program for transferring the communication program from the master CPU to the communication interface device, and is stored in the transfer program storage unit. When the transfer program is stored in the transfer program storage means, the transfer program is executed, and the communication program transfer means stores the communication program from the master CPU in the communication program storage means.

【0009】マスタCPUは外部通信線にデータを送出
する場合、通信インタフェイス装置が外部通信線にデー
タを送出することができることを確認し、マスタCPU
からシリアルのデータが通信インタフェイス装置へ出力
される。通信インタフェイス装置は通信プログラムの実
行により、シリアルのデータに含まれる送信情報に従っ
てデータを外部通信線へ送出する。また、マスタCPU
が外部通信線上のデータを受信する場合、通信インター
フェイスは受信したデータをマスタCPUに出力するに
際し、受信条件がシリアルのデータに付加される。
When sending data to the external communication line, the master CPU confirms that the communication interface device can send data to the external communication line,
Output serial data to the communication interface device. The communication interface device transmits the data to the external communication line according to the transmission information included in the serial data by executing the communication program. Also, the master CPU
When receiving data on an external communication line, the communication interface adds reception conditions to serial data when outputting the received data to the master CPU.

【0010】[0010]

【実施例】図1は本発明の一実施例を説明するための通
信インターフェイスおよびその周辺のブロック図であ
る。マイクロプロセッサ1はバス2を介してROM(リ
ードオンリメモリ)3およびRAM(ランダムアクセス
メモリ)4などを含んで接続され、マスタCPUを構成
する。マスタCPUは1チップの集積回路であってもよ
く、複数の集積回路によって構成されてもよい。ROM
3は読み出し専用メモリであり、マイクロプロセッサ1
を動作させるためのプログラムやデータの他、通信イン
ターフェイス5に転送される転送プログラムおよび通信
プログラムが格納されている。
FIG. 1 is a block diagram of a communication interface and its periphery for explaining an embodiment of the present invention. The microprocessor 1 is connected via a bus 2 including a ROM (read only memory) 3 and a RAM (random access memory) 4 to constitute a master CPU. The master CPU may be a one-chip integrated circuit, or may be configured by a plurality of integrated circuits. ROM
Reference numeral 3 denotes a read-only memory;
In addition to a program and data for operating the program, a transfer program and a communication program to be transferred to the communication interface 5 are stored.

【0011】通信インタフェース5はマスタCPUと外
部通信線との間のデータの送受信を行うための装置であ
る。マイクロプロセッサ1と通信インターフェイス5と
の間には各種の通信線、制御線が接続されている。制御
線6は通信インターフェイス5の初期設定を開始するた
めの開始信号を送出するための制御線である。
The communication interface 5 is a device for transmitting and receiving data between the master CPU and an external communication line. Various communication lines and control lines are connected between the microprocessor 1 and the communication interface 5. The control line 6 is a control line for sending a start signal for starting the initial setting of the communication interface 5.

【0012】シリアル通信線7,8はセレクタ・スイッ
チS1,S2を介して接続されており、セレクタ・スイ
ッチS1,S2が接点1に接続されている場合にマイク
ロプロセッサ1からのシリアル・データが通信インタフ
ェース5に転送される。セレクタ・スイッチS1,S2
が接点2に接続されると、マイクロプロセッサ1からの
シリアル・データは通信線9を介して図示しない他の装
置へ送出され、また通信インターフェイス5も通信線
8,10を介して外部装置と通信することができる。セ
レクタ・スイッチS1,S2の接点は切換制御線11を
介して与えられる切換信号によって切り換えられる。
The serial communication lines 7 and 8 are connected via selector switches S1 and S2. When the selector switches S1 and S2 are connected to the contact 1, serial data from the microprocessor 1 communicates. Transferred to interface 5. Selector switch S1, S2
Is connected to the contact 2, the serial data from the microprocessor 1 is transmitted to another device (not shown) via the communication line 9, and the communication interface 5 also communicates with the external device via the communication lines 8 and 10. can do. The contacts of the selector switches S1 and S2 are switched by a switching signal provided via a switching control line 11.

【0013】シリアル通信線12,13はシリアルのデ
ータをマイクロプロセッサ1と通信インターフェイス5
との間の通信を行うための信号線で、各信号線は単方向
で、信号線12はマイクロプロセッサ1から通信インタ
ーフェイス5へのデータ転送に用いられ、信号線13は
マイクロプロセッサ1から通信インターフェイス5への
データ転送に用いられる。信号線12,13は双方向の
信号線として用いるようにしてもよい。
The serial communication lines 12 and 13 transmit serial data to the microprocessor 1 and the communication interface 5.
The signal line 12 is used to transfer data from the microprocessor 1 to the communication interface 5, and the signal line 13 is used to transfer data from the microprocessor 1 to the communication interface 5. 5 is used for data transfer. The signal lines 12 and 13 may be used as bidirectional signal lines.

【0014】シリアル信号線7,8,12,13の送受
信は従来からよく知られているように、送信側および受
信側にはそれぞれ送信データ・レジスタおよび受信デー
タ・レジスタが設けられ、送信データをシリアル信号線
に送出するためには、まずパラレルの送信データが送信
データ・レジスタに転送される。送信データ・レジスタ
内のデータは最上位ビットあるいは最下位ビットからシ
リアル信号線に順次出力される。このようにして出力さ
れたシリアルのデータは受信側の受信レジスタに取り込
まれる。受信レジスタにすべてのビットが取り込まれる
と、受信したパラレルのデータがデータ・バスに出力さ
れる。シリアル信号線上のデータ形式はスタート・ビッ
トおよびストップ・ビットを含む標準のNRZでよく、
また他のいずれのデータ形式であってもよい。
As is well known, transmission and reception of the serial signal lines 7, 8, 12, and 13 are provided with a transmission data register and a reception data register on the transmission side and the reception side, respectively. In order to send the data to the serial signal line, first, parallel transmission data is transferred to the transmission data register. The data in the transmission data register is sequentially output to the serial signal line from the most significant bit or the least significant bit. The serial data output in this way is taken into the receiving register on the receiving side. When all bits are taken into the reception register, the received parallel data is output to the data bus. The data format on the serial signal line may be standard NRZ including start bit and stop bit,
Also, any other data format may be used.

【0015】通信インターフェイス5と外部装置(図示
せず)とのデータのやりとりを行う外部通信線14はシ
リアル信号線およびパラレル信号線が設けられる。外部
信号線15は単方向通信線で通信インターフェイス5か
ら外部装置へシリアルのデータが伝送される。また、外
部通信線16,17は双方向のシリアル信号線で通信イ
ンターフェイス5と外部装置との間を1本の信号線で送
受信ができる。さらに、外部通信線18,19はパラレ
ルのデータを送受信することができ、一般に通信インタ
ーフェイス5内で用いられるデータ・バスがバッファを
介して外部に出力される。
An external communication line 14 for exchanging data between the communication interface 5 and an external device (not shown) is provided with a serial signal line and a parallel signal line. The external signal line 15 is a unidirectional communication line through which serial data is transmitted from the communication interface 5 to an external device. The external communication lines 16 and 17 are bidirectional serial signal lines, and can transmit and receive between the communication interface 5 and the external device by one signal line. Further, the external communication lines 18 and 19 can transmit and receive parallel data, and a data bus generally used in the communication interface 5 is output to the outside via a buffer.

【0016】以上のように、マイクロプロセッサ1から
出力されたシリアルのデータはシリアル信号線12を介
して通信インターフェイス5で受信され、そのシリアル
のデータに含まれる送信情報に基づく送信条件(送信ボ
ーレート,出力すべき外部通信線など)に従って外部通
信線から外部装置へ出力される。逆に、外部装置から伝
送されたデータは通信インターフェイス5で受信され、
シリアル信号線13を介してマイクロプロセッサ1へ送
られる。
As described above, the serial data output from the microprocessor 1 is received by the communication interface 5 via the serial signal line 12, and the transmission conditions (the transmission baud rate, the transmission baud rate, and the like) based on the transmission information included in the serial data. Output to an external device in accordance with the external communication line to be output). Conversely, data transmitted from the external device is received by the communication interface 5,
The signal is sent to the microprocessor 1 via the serial signal line 13.

【0017】図2は通信インターフェイス5の動作をさ
らに詳しく説明するためのブロック図である。通信イン
ターフェイス5の動作は制御部50によって制御され
る。制御部50はマイクロプロセッサによって構成さ
れ、その動作は通信プログラム・メモリ51および転送
プログラム・メモリ52に格納されている通信プログラ
ムおよび転送プログラムによって制御される。制御部5
0と通信プログラム・メモリ51および転送プログラム
・メモリ52とは内部バス53を介してデータの転送が
行われる。
FIG. 2 is a block diagram for explaining the operation of the communication interface 5 in more detail. The operation of the communication interface 5 is controlled by the control unit 50. The control unit 50 is constituted by a microprocessor, and its operation is controlled by a communication program and a transfer program stored in a communication program memory 51 and a transfer program memory 52. Control unit 5
0, the communication program memory 51 and the transfer program memory 52 transfer data via the internal bus 53.

【0018】シリアル信号線8は受信レジスタ54に接
続され、マイクロプロセッサ1から送られたシリアルの
データは受信レジスタ54に蓄えられる。受信レジスタ
によって受信したデータはパラレルに変換され内部バス
53に出力される。 送受信レジスタ55はシリアル信
号線12を通してマイクロプロセッサ1から送られたシ
リアルのデータを蓄え、パラレルに変換した後内部バス
に出力される。また、内部バス53から送受信レジスタ
55に転送されたデータはシリアルに変換された後シリ
アル通信線13を介してマイクロプロセッサ1へ送られ
る。
The serial signal line 8 is connected to a reception register 54, and serial data sent from the microprocessor 1 is stored in the reception register 54. The data received by the reception register is converted into parallel data and output to the internal bus 53. The transmission / reception register 55 stores serial data transmitted from the microprocessor 1 through the serial signal line 12, converts the data into parallel, and outputs the parallel data to the internal bus. The data transferred from the internal bus 53 to the transmission / reception register 55 is sent to the microprocessor 1 via the serial communication line 13 after being converted into serial data.

【0019】内部バス5と外部通信線14とはポート5
6〜60を介して接続され、マスタCPUからあるいは
マスタCPUへのデータはこれらのポートを通して伝送
される。
The internal bus 5 and the external communication line 14 are connected to the port 5
6 to 60, and data from or to the master CPU is transmitted through these ports.

【0020】モード・コントロール部61は通信インタ
ーフェイス5の初期設定を行わせる動作を行う。制御線
6はモード・コントロール部61に接続され、モード・
コントロール部61の出力はブートストラップ・プログ
ラム・メモリ62に接続される。ブートストラップ・プ
ログラム・メモリ62はROM(リードオンリメモリ)
から構成され、ブートストラップ・プログラムが格納さ
れている。モード・コントロール部56は制御線6上の
開始信号を受信すると、ブートストラップ・プログラム
・メモリ62にブートストラップ信号を出力し、ブート
ストラップが開始する。ブートストラップ・プログラム
はマスタCPUに格納されている転送プログラムをシリ
アル信号線8を介してRAM(ランダムアクセスメモ
リ)から構成される転送プログラム記憶メモリ52へ転
送させる。転送プログラムが転送プログラム記憶メモリ
52に格納されると、ブートストラップ動作は完了す
る。
The mode control section 61 performs an operation for performing an initial setting of the communication interface 5. The control line 6 is connected to the mode control unit 61,
The output of the control unit 61 is connected to a bootstrap program memory 62. The bootstrap program memory 62 is a ROM (read only memory)
And stores a bootstrap program. When receiving the start signal on the control line 6, the mode control unit 56 outputs a bootstrap signal to the bootstrap program memory 62, and the bootstrap is started. The bootstrap program causes the transfer program stored in the master CPU to be transferred to the transfer program storage memory 52 composed of a RAM (random access memory) via the serial signal line 8. When the transfer program is stored in the transfer program storage memory 52, the bootstrap operation is completed.

【0021】ブートストラップ動作が完了すると転送プ
ログラムが実行を開始する。転送プログラムの実行によ
り、マスタCPUのROM2に記憶されている通信プロ
グラムが、転送プログラムと同様シリアル信号線8を介
して通信プログラム記憶メモリ51へ転送される。通信
プログラムは通信条件に従って選択が可能なように複数
用意されていてもよい。通信プログラムが通信プログラ
ム記憶メモリ51に格納されると、通信プログラムが実
行を開始し、マスタCPUと外部装置との間の通信が可
能となる。通信プログラム記憶メモリ51に通信プログ
ラムが格納されると、転送プログラム記憶メモリ52に
記憶されている転送プログラムは消滅してもよい。
When the bootstrap operation is completed, the transfer program starts executing. By executing the transfer program, the communication program stored in the ROM 2 of the master CPU is transferred to the communication program storage memory 51 via the serial signal line 8 like the transfer program. A plurality of communication programs may be prepared so that selection is possible according to communication conditions. When the communication program is stored in the communication program storage memory 51, the communication program starts executing, and communication between the master CPU and the external device becomes possible. When the communication program is stored in the communication program storage memory 51, the transfer program stored in the transfer program storage memory 52 may disappear.

【0022】上述した通信プログラムを通信プログラム
記憶メモリ51に転送する操作についてさらに詳しく説
明する。図3において、マイクロプロセッサ1からの開
始信号をモードコントロール61が受信すると、通信イ
ンターフェイス5はブートストラップ動作(初期設定動
作)を開始する(ブロック101〜ブロック104)。
まず、転送プログラムをマイクロプロセッサ1から通信
インターフェイス5へ転送するための通信回線がシリア
ル信号線8に設定される(ブロック102)。シリアル
信号線8を通して転送プログラムがマイクロプロセッサ
1から転送され、転送プログラム記憶メモリ52に格納
される(ブロック103)。転送プログラムの転送が完
了すると、シリアル通信線8上の通信回線が遮断される
(ブロック104)。
The operation of transferring the above-described communication program to the communication program storage memory 51 will be described in more detail. In FIG. 3, when the mode control 61 receives a start signal from the microprocessor 1, the communication interface 5 starts a bootstrap operation (initial setting operation) (blocks 101 to 104).
First, a communication line for transferring a transfer program from the microprocessor 1 to the communication interface 5 is set to the serial signal line 8 (block 102). The transfer program is transferred from the microprocessor 1 through the serial signal line 8 and stored in the transfer program storage memory 52 (block 103). When the transfer of the transfer program is completed, the communication line on the serial communication line 8 is cut off (block 104).

【0023】転送プログラムが転送プログラム記憶メモ
リ52に格納されると、転送プログラムの実行が開始す
る(ブロック105)。転送プログラムの実行により、
マイクロプロセッサ1はROM2に格納されている通信
プログラムの転送を開始する(ブロック106)。通信
インターフェイス5は転送された通信プログラムを通信
プログラム記憶メモリ51に順次格納する(ブロック1
07)。通信プログラムの全てが通信プログラム記憶メ
モリ51に格納されると、通信プログラムの実行が開始
される(ブロック108)。通信プログラムの実行開始
により、通常の通信処理が開始される(ブロック10
9)。
When the transfer program is stored in the transfer program storage memory 52, execution of the transfer program starts (block 105). By executing the transfer program,
The microprocessor 1 starts transferring the communication program stored in the ROM 2 (block 106). The communication interface 5 sequentially stores the transferred communication programs in the communication program storage memory 51 (block 1).
07). When all of the communication programs are stored in the communication program storage memory 51, execution of the communication program is started (block 108). By starting execution of the communication program, normal communication processing is started (block 10).
9).

【0024】マスタCPUから外部装置へデータを伝送
する場合のマイクロプロセッサ1および通信インターフ
ェイス5内の処理について説明する。図4はマスタCP
U側から通信インターフェイス5側へデータを伝送する
場合の各処理内容を説明するためのフローチャートであ
る。まず、マスタCPU側にデータを外部装置に伝送す
る要求が発生すると(ブロック201)、マイクロプロ
セッサ1は外部装置へ送信可能かどうかを調べるため、
通信インターフェイス5の状態を返送するように要求す
る(ブロック202)。通信インターフェイス5は、マ
イクロプロセッサ1の要求に応じて送信可能状態かどう
かの結果を伝達する(ブロック203)。
The processing in the microprocessor 1 and the communication interface 5 when data is transmitted from the master CPU to an external device will be described. Figure 4 shows the master CP
It is a flowchart for demonstrating each processing content at the time of transmitting data from the U side to the communication interface 5 side. First, when a request to transmit data to an external device occurs on the master CPU side (block 201), the microprocessor 1 checks whether transmission to the external device is possible.
A request is made to return the status of the communication interface 5 (block 202). The communication interface 5 communicates the result of the transmission enable state according to the request of the microprocessor 1 (block 203).

【0025】通信インターフェイス5からの結果を受信
して、通信インターフェイス5が送信不能状態であるこ
とを認識すると(ブロック204)、マイクロプロセッ
サ1は通信インターフェイス5からのデータを受信する
モードになる(ブロック205)。
Upon receiving the result from the communication interface 5 and recognizing that the communication interface 5 is in a transmission disabled state (block 204), the microprocessor 1 enters a mode for receiving data from the communication interface 5 (block 204). 205).

【0026】通信インターフェイス5が外部装置へ送信
可能状態であることを認識すると(ブロック206)、
マイクロプロセッサ1は送信要求を送るとともに送信デ
ータを通信インターフェイス5へ送信する(ブロック2
07)。
Upon recognizing that the communication interface 5 is ready for transmission to an external device (block 206),
The microprocessor 1 sends a transmission request and sends transmission data to the communication interface 5 (block 2).
07).

【0027】通信インターフェイス5はマイクロプロセ
ッサ1からの送信要求を受信すると、マスタCPU側に
送信要求が発生したことを認識し、送信要求とともに伝
送されたデータを通信インターフェイス5内のRAMに
一時的に蓄積する(ブロック208)。送信情報によっ
て指定されるポートから制御ラインをハンドシェークし
ながら、RAMに蓄積されたデータを出力する(ブロッ
ク209)。
When receiving the transmission request from the microprocessor 1, the communication interface 5 recognizes that the transmission request has occurred on the master CPU side, and temporarily stores the data transmitted together with the transmission request in the RAM in the communication interface 5. Store (block 208). The data stored in the RAM is output while handshaking the control line from the port specified by the transmission information (block 209).

【0028】次に、外部装置からマスタCPUへデータ
を伝送する場合の処理について説明する。図5は外部装
置から通信インターフェイスへ伝送されたデータをマス
タCPU側へ伝送する場合の各処理内容を説明するため
のフローチャートである。通常、通信インターフェイス
5は受信状態に設定されているので、外部装置から伝送
されたデータは予め定める通信手順に従って、制御ライ
ンをハンドシェークして、受信されRAMに蓄積される
(ブロック301)。
Next, a process for transmitting data from the external device to the master CPU will be described. FIG. 5 is a flowchart for explaining each processing content when data transmitted from the external device to the communication interface is transmitted to the master CPU side. Normally, since the communication interface 5 is set to the reception state, the data transmitted from the external device is hand-shaked on the control line according to a predetermined communication procedure, received, and stored in the RAM (block 301).

【0029】マイクロプロセッサ1において外部装置か
らのデータを受信できる状態になると(ブロック30
2)、マイクロプロセッサ1は通信インターフェイス5
の受信状況を調べる(ブロック303)。通信インター
フェイス5はマイクロプロセッサ1からの問い合わせを
判断し、RAMへのデータの蓄積状況を調べ、マイクロ
プロセッサ1へ伝達する(ブロック304)。
When the microprocessor 1 is ready to receive data from an external device (block 30)
2) The microprocessor 1 is a communication interface 5
The reception status of is checked (block 303). The communication interface 5 judges the inquiry from the microprocessor 1, checks the accumulation status of the data in the RAM, and transmits it to the microprocessor 1 (block 304).

【0030】通信インターフェイス5から伝達されたデ
ータの蓄積状況により、RAMに蓄積データがある場合
(ブロック305)、マイクロプロセッサ1はRAMに
蓄積されたデータを通信インターフェイス5に伝送する
ように要求する(ブロック306)。通信インターフェ
イス5はマイクロプロセッサ1の要求に応じてRAMに
蓄積されたデータを通信プログラム記憶メモリ51に格
納されている通信手順に従ってマイクロプロセッサ1に
伝送する(ブロック307)。マイクロプロセッサ1は
通信インターフェイス5から伝送されたデータの全てを
受信すると(ブロック308)、外部装置から伝送され
たデータの受信を完了する(ブロック309)。
According to the accumulation state of the data transmitted from the communication interface 5, if there is data stored in the RAM (block 305), the microprocessor 1 requests the data stored in the RAM to be transmitted to the communication interface 5 (block 305). Block 306). The communication interface 5 transmits the data stored in the RAM in response to the request of the microprocessor 1 to the microprocessor 1 in accordance with the communication procedure stored in the communication program storage memory 51 (block 307). When the microprocessor 1 receives all of the data transmitted from the communication interface 5 (block 308), it completes receiving the data transmitted from the external device (block 309).

【0031】RAM内のデータ蓄積状況から、蓄積デー
タがない場合(ブロック309)、マイクロプロセッサ
1は通信インターフェイス5へ送信するデータの有無を
調べ(ブロック310)、送信データがあれば図4のフ
ローに従って送信制御を行なう(ブロック311)。送
信データもない場合(ブロック312)、マイクロプロ
セッサ1は再度通信インターフェイス5が受信データを
蓄積しているかどうかを調べる(ブロック303)。
If there is no stored data from the data storage status in the RAM (block 309), the microprocessor 1 checks whether or not there is data to be transmitted to the communication interface 5 (block 310). The transmission control is performed according to the following (block 311). If there is no transmission data (block 312), the microprocessor 1 checks again whether the communication interface 5 is accumulating the reception data (block 303).

【0032】以上のように、本実施例に従えば通信イン
ターフェイス5の通信プログラムをマイクロプロセッサ
1から伝送し変更することにより、シリアルポートのビ
ットレート,制御線の選択,ハンドシェイクの方法等の
通信手順を自由に変えることができる。
As described above, according to the present embodiment, the communication program of the communication interface 5 is transmitted from the microprocessor 1 and changed, so that the communication such as the bit rate of the serial port, the selection of the control line, the handshake method, etc. The procedure can be changed freely.

【0033】また、マイクロプロセッサ1と通信インタ
ーフェイス5とはシリアル信号線で接続されているの
で、データの伝送先を特定するためのアドレスデコーダ
を必要とせず、回路を簡略化できると共にスペースを節
約することができる。
Further, since the microprocessor 1 and the communication interface 5 are connected by a serial signal line, there is no need for an address decoder for specifying a data transmission destination, so that the circuit can be simplified and the space can be saved. be able to.

【0034】さらに、通信インターフェイスは汎用のマ
イクロプロセッサを使用して構成することができるの
で、コストを下げることができる。
Further, since the communication interface can be configured using a general-purpose microprocessor, the cost can be reduced.

【0035】[0035]

【発明の効果】以上説明したように、本発明に従えばマ
スタCPUから通信インターフェイス装置へ通信プログ
ラムが伝送され、そのプログラムの内容を変更すること
によって通信手順をいかようにも変えることができるの
で、極めて自由度の高い通信インターフェイスを提供す
ることができる。
As described above, according to the present invention, the communication program is transmitted from the master CPU to the communication interface device, and the communication procedure can be changed by changing the contents of the program. Thus, it is possible to provide a communication interface having a very high degree of freedom.

【0036】また、伝送された通信プログラムは通信イ
ンターフェイス装置において、電気的消去可能リードオ
ンリメモリに格納されるので、電力の供給が停止しても
そのプログラムは保存される。
Further, since the transmitted communication program is stored in the electrically erasable read-only memory in the communication interface device, the program is stored even if the power supply is stopped.

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

【図1】本発明の一実施例を説明するための通信インタ
ーフェイスおよびその周辺のブロック図である。
FIG. 1 is a block diagram of a communication interface and its periphery for explaining an embodiment of the present invention.

【図2】通信インターフェイス5の動作をさらに詳しく
説明するためのブロック図である。
FIG. 2 is a block diagram for explaining the operation of the communication interface 5 in further detail.

【図3】通信プログラムを通信プログラム記憶メモリ5
1に転送する操作を説明するためのフローチャートであ
る。
FIG. 3 shows a communication program storage memory 5 for storing a communication program.
6 is a flowchart for explaining an operation of transferring the information to the first device;

【図4】マスタCPU側から通信インターフェイス5側
へデータを伝送する場合の各処理内容を説明するための
フローチャートである。
FIG. 4 is a flowchart for explaining each processing content when data is transmitted from the master CPU to the communication interface 5;

【図5】外部装置から通信インターフェイスへ伝送され
たデータをマスタCPU側へ伝送する場合の各処理内容
を説明するためのフローチャートである。
FIG. 5 is a flowchart for explaining each processing content when data transmitted from the external device to the communication interface is transmitted to the master CPU side.

【符号の説明】 1 マイクロプロセッサ 2 バス 3 ROM 4 RAM 5 通信インターフェイス 6 制御線 7,8,12,13 シリアル通信線 14 外部通信線 51 通信プログラム記憶メモリ 52 転送プログラム記憶メモリ 54 受信レジスタ 55 送受信レジスタ 62 ブートストラッププログラムメモリ[Description of Signs] 1 microprocessor 2 bus 3 ROM 4 RAM 5 communication interface 6 control line 7, 8, 12, 13 serial communication line 14 external communication line 51 communication program storage memory 52 transfer program storage memory 54 reception register 55 transmission / reception register 62 Bootstrap program memory

フロントページの続き (56)参考文献 特開 平1−144839(JP,A) 特開 昭61−30842(JP,A) 特開 昭54−98142(JP,A) 特開 平1−93236(JP,A) 特開 平3−182933(JP,A) 特開 平3−111956(JP,A) 特開 平2−112043(JP,A) 特開 昭58−22430(JP,A)Continuation of the front page (56) References JP-A-1-144839 (JP, A) JP-A-61-30842 (JP, A) JP-A-54-98142 (JP, A) JP-A-1-93236 (JP) JP-A-3-182933 (JP, A) JP-A-3-111956 (JP, A) JP-A-2-112043 (JP, A) JP-A-58-22430 (JP, A)

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 マスタCPUから送出されたシリアルの
データを受信し予め定める通信手順に従って前記データ
を外部通信線へ送出し、および、外部通信線上のデータ
を受信し予め定める通信手順に従ってシリアルの前記デ
ータをマスタCPUへ送出する通信インターフェイス装
置において、 前記通信手順を実行する通信プログラムを記憶するため
の通信プログラム記憶手段と、 前記マスタCPUに格納された前記通信プログラムを前
記通信インターフェイス装置に転送する転送プログラム
を記憶するための転送プログラム記憶手段と、前記マス
タCPUからの開始信号の受信に応答して、前記マスタ
CPUから前記転送プログラムを前記転送プログラム記
憶手段に転送する転送プログラム転送手段と、 前記転送プログラムの前記転送プログラム記憶手段への
転送完了後における前記転送プログラムの実行により、
前記マスタCPUに格納されている前記通信プログラム
を通信プログラム記憶手段に転送する通信プログラム転
送手段とから構成され、 前記通信プログラムの実行により、前記通信インターフ
ェイス装置から前記外部通信線へのデータの送出が可能
であることをマスタCPUが検出した場合は前記マスタ
CPUから送出されたシリアルの前記データに含まれる
送信情報に基づく条件により前記外部通信線に前記デー
タが送出され、前記外部通信線から前記マスタCPUへ
のシリアルのデータの送出が可能な場合は前記外部通信
線から受信したデータの受信条件がシリアルの前記デー
タに付加されて前記マスタCPUに送出されることを特
徴とする1チップの半導体集積回路よりなる通信インタ
ーフェイス装置。
1. A method for receiving serial data transmitted from a master CPU and transmitting the data to an external communication line in accordance with a predetermined communication procedure, and receiving data on the external communication line and performing serial communication in accordance with a predetermined communication procedure. A communication interface device for sending data to a master CPU, a communication program storage means for storing a communication program for executing the communication procedure, and a transfer for transferring the communication program stored in the master CPU to the communication interface device Transfer program storage means for storing a program; transfer program transfer means for transferring the transfer program from the master CPU to the transfer program storage means in response to receiving a start signal from the master CPU; The transfer program of the program By executing the transfer program after the transfer to the RAM storage means is completed,
And a communication program transfer unit for transferring the communication program stored in the master CPU to a communication program storage unit. By executing the communication program, transmission of data from the communication interface device to the external communication line is performed. When the master CPU detects that it is possible, the data is transmitted to the external communication line according to a condition based on transmission information included in the serial data transmitted from the master CPU, and the master is transmitted from the external communication line to the master. A one-chip semiconductor integrated circuit, wherein when serial data can be sent to a CPU, a reception condition of data received from the external communication line is added to the serial data and sent to the master CPU. Communication interface device consisting of circuits.
【請求項2】 前記通信プログラム記憶手段は電気的消
去可能リードオンリメモリからなることを特徴とする請
求項1記載の通信インターフェイス装置。
2. The communication interface device according to claim 1, wherein said communication program storage means comprises an electrically erasable read-only memory.
【請求項3】 前記通信プログラムは前記マスタCPU
に複数格納されていることを特徴とする請求項1記載の
通信インターフェイス装置。
3. The communication program according to claim 1, wherein the communication program is the master CPU.
The communication interface device according to claim 1, wherein a plurality of communication interface devices are stored.
【請求項4】 マスタCPUから送出されたシリアルの
データを受信し予め定める通信手順に従って前記データ
を外部通信線へ送出し、および、外部通信線上のデータ
を受信し予め定める通信手順に従ってシリアルの前記デ
ータをマスタCPUへ送出する通信インターフェイス装
置において、 前記通信手順を実行する通信プログラムを記憶するため
の電気的消去可能リードオンリメモリからなる通信プロ
グラム記憶手段と、 前記マスタCPUに格納された前記通信プログラムを前
記通信インターフェイス装置に転送する転送プログラム
を記憶するためのランダムアクセスメモリからなる転送
プログラム記憶手段と、 前記マスタCPUに格納された前記転送プログラムを前
記通信インターフェイス装置に転送するブートストラッ
ププログラムを記憶するためのリードオンリメモリから
なるブートストラッププログラム記憶手段と、 前記マスタCPUからの開始信号の受信に応答して前記
ブートストラッププログラムが実行し、前記マスタCP
Uから前記転送プログラムを前記転送プログラム記憶手
段に転送する転送プログラム転送手段と、 前記転送プログラムの前記転送プログラム記憶手段への
転送完了後における前記転送プログラムの実行により、
前記マスタCPUに格納されている前記通信プログラム
を通信プログラム記憶手段に転送する通信プログラム転
送手段とから構成され、 前記通信プログラムの実行により、前記通信インターフ
ェイス装置から前記外部通信線へのデータの送出が可能
であることをマスタCPUが検出した場合は前記マスタ
CPUから送出されたシリアルの前記データに含まれる
送信情報に基づく条件により前記外部通信線に前記デー
タが送出され、前記外部通信線から前記マスタCPUへ
のシリアルのデータの送出が可能な場合は前記外部通信
線から受信したデータの受信条件がシリアルの前記デー
タに付加されて前記マスタCPUに送出されることを特
徴とする1チップの半導体集積回路よりなる通信インタ
ーフェイス装置。
4. Receiving serial data transmitted from a master CPU and transmitting the data to an external communication line according to a predetermined communication procedure, and receiving data on the external communication line and performing serial communication according to a predetermined communication procedure. A communication interface device for sending data to a master CPU, a communication program storage means comprising an electrically erasable read-only memory for storing a communication program for executing the communication procedure, and the communication program stored in the master CPU Transfer program storage means comprising a random access memory for storing a transfer program for transferring the transfer program to the communication interface device; and a bootstrap program for transferring the transfer program stored in the master CPU to the communication interface device. A bootstrap program storage means comprising a read-only memory for storing, and the bootstrap program being executed in response to receiving a start signal from the master CPU,
Transfer program transfer means for transferring the transfer program from U to the transfer program storage means, and execution of the transfer program after transfer of the transfer program to the transfer program storage means is completed.
And a communication program transfer unit for transferring the communication program stored in the master CPU to a communication program storage unit. By executing the communication program, transmission of data from the communication interface device to the external communication line is performed. When the master CPU detects that it is possible, the data is transmitted to the external communication line according to a condition based on transmission information included in the serial data transmitted from the master CPU, and the master is transmitted from the external communication line to the master. A one-chip semiconductor integrated circuit, wherein when serial data can be sent to a CPU, a reception condition of data received from the external communication line is added to the serial data and sent to the master CPU. Communication interface device consisting of circuits.
JP3228566A 1991-08-15 1991-08-15 Communication interface device Expired - Lifetime JP2639248B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3228566A JP2639248B2 (en) 1991-08-15 1991-08-15 Communication interface device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3228566A JP2639248B2 (en) 1991-08-15 1991-08-15 Communication interface device

Publications (2)

Publication Number Publication Date
JPH05130165A JPH05130165A (en) 1993-05-25
JP2639248B2 true JP2639248B2 (en) 1997-08-06

Family

ID=16878374

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3228566A Expired - Lifetime JP2639248B2 (en) 1991-08-15 1991-08-15 Communication interface device

Country Status (1)

Country Link
JP (1) JP2639248B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010278897A (en) * 2009-05-29 2010-12-09 Renesas Electronics Corp Communication data processing circuit and communication data processing method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5498142A (en) * 1978-01-20 1979-08-02 Toshiba Corp Communication control system
JPS6130842A (en) * 1984-07-23 1986-02-13 Ricoh Co Ltd Communication terminal equipment
JPH0193236A (en) * 1987-10-02 1989-04-12 Yokogawa Electric Corp Communication system
JPH01144839A (en) * 1987-12-01 1989-06-07 Hitachi Ltd Communication control equipment

Also Published As

Publication number Publication date
JPH05130165A (en) 1993-05-25

Similar Documents

Publication Publication Date Title
US5958024A (en) System having a receive data register for storing at least nine data bits of frame and status bits indicating the status of asynchronous serial receiver
JPS63255759A (en) Control system
EP0427023B1 (en) Data transmission control apparatus for parallel processing system
US20050108454A1 (en) Method and apparatus for providing an inter integrated circuit interface with an expanded address range and efficient priority-based data throughput
EP0097028A2 (en) Multiple-microcomputer communications system
EP0525736B1 (en) Data storing system for a communication control circuit
JP2639248B2 (en) Communication interface device
CN116541329A (en) Data transmission method, device, equipment and medium
US6192409B1 (en) X.25 network connection for X.25 protocol communication used in a full electronic switching system
JPH05300152A (en) Address setter
JPH1027150A (en) Information processor and external device
KR20070102823A (en) Device for controlling address in a i2c protocol
US6112259A (en) Integrated circuit for direct memory access
JPH0234518B2 (en)
KR100962306B1 (en) Bidirectional data transmission apparatus and the method thereof for embedded system
KR100427764B1 (en) Apparatus for Interface between Devices of different Data Bus
KR0141294B1 (en) Processor for connecting electronic electronic switch
JP2573790B2 (en) Transfer control device
JPH11232243A (en) Communication control equipment, its method and communication control system
JPH02189049A (en) Line controller
CN116185936A (en) SPI communication data receiving and transmitting abnormity detection control system and detection method
JP3947223B2 (en) Method and apparatus for reducing waiting time on an interface by overlapping transmission packets
JPH0218623B2 (en)
JPS63128837A (en) Line controller
JPH07319841A (en) Serial control device