JP5350210B2 - Electronic module control program - Google Patents

Electronic module control program Download PDF

Info

Publication number
JP5350210B2
JP5350210B2 JP2009296231A JP2009296231A JP5350210B2 JP 5350210 B2 JP5350210 B2 JP 5350210B2 JP 2009296231 A JP2009296231 A JP 2009296231A JP 2009296231 A JP2009296231 A JP 2009296231A JP 5350210 B2 JP5350210 B2 JP 5350210B2
Authority
JP
Japan
Prior art keywords
electronic module
computer
program
control program
module control
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 - Fee Related
Application number
JP2009296231A
Other languages
Japanese (ja)
Other versions
JP2011139140A (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.)
Fujikura Ltd
Original Assignee
Fujikura 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 Fujikura Ltd filed Critical Fujikura Ltd
Priority to JP2009296231A priority Critical patent/JP5350210B2/en
Publication of JP2011139140A publication Critical patent/JP2011139140A/en
Application granted granted Critical
Publication of JP5350210B2 publication Critical patent/JP5350210B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、電子モジュールに搭載された電子素子の制御をコンピュータに実行させるための電子モジュール制御プログラムに関する。 The present invention relates to an electronic module control program for executing a control of the electronic device mounted on the electronic module to the computer.

コンピュータによって制御される電子素子、例えば光素子を用いて電気信号と光信号とを相互に変換する電子モジュールが開発されている。この電子モジュールは、光ファイバを伝送路としてデータの送受信を行う通信機器に内蔵されている(例えば、特許文献1から3を参照。)。電子モジュールは単体で使用する場合もあるが、複数の電子モジュールを一体化して使用する場合もある。この場合は、それぞれの電子モジュールに、光素子の制御を行うコンピュータを備える必要がある。   2. Description of the Related Art Electronic modules that mutually convert electrical signals and optical signals using electronic elements controlled by a computer, such as optical elements, have been developed. This electronic module is built in a communication device that transmits and receives data using an optical fiber as a transmission path (see, for example, Patent Documents 1 to 3). The electronic module may be used alone, or a plurality of electronic modules may be used in an integrated manner. In this case, it is necessary to provide a computer for controlling the optical element in each electronic module.

特許第4135016号公報Japanese Patent No. 4135016 特開2008−026375号公報JP 2008-026375 A 特開2008−244047号公報JP 2008-244047 A

電子モジュールに搭載された電子素子をコンピュータで制御させるためには、電子モジュールのコンピュータに電子モジュール制御プログラムを書き込む必要がある。複数の電子モジュールを一体化して使用する場合には、電子素子を制御するそれぞれのコンピュータに対して、同じ電子モジュール制御プログラムをそれぞれ書き込む必要があった。   In order to control the electronic elements mounted on the electronic module with a computer, it is necessary to write an electronic module control program in the computer of the electronic module. When a plurality of electronic modules are used in an integrated manner, it is necessary to write the same electronic module control program to each computer that controls the electronic elements.

そこで、本発明では、一の電子モジュールのコンピュータへ電子モジュール制御プログラムを書き込んだ後に、この一の電子モジュールのコンピュータから他の電子モジュールのコンピュータへ電子モジュール制御プログラムを順次転送することで、複数のコンピュータに電子モジュール制御プログラムを効率的に書き込むことができる電子モジュール制御プログラム及び電子モジュール製造方法を提供することを目的とする。   Therefore, in the present invention, after writing the electronic module control program to the computer of one electronic module, the electronic module control program is sequentially transferred from the computer of this one electronic module to the computer of the other electronic module, so that a plurality of An object of the present invention is to provide an electronic module control program and an electronic module manufacturing method capable of efficiently writing an electronic module control program to a computer.

上記課題を解決するために、一の電子モジュールに搭載された電子素子を制御するコンピュータに電子モジュール制御プログラムが書き込まれた後、一の電子モジュールに搭載された電子素子を制御するコンピュータが電子モジュール制御プログラムに従って動作を開始する。次に、電子モジュール制御プログラムを書き込み可能にするリセット信号及び電子モジュール制御プログラムを他の電子モジュールのコンピュータに転送する。そして、電子モジュール制御プログラム転送完了後、一の電子モジュールに搭載された電子素子を制御するコンピュータの電子モジュール制御プログラムの転送を禁止することとした。   In order to solve the above problem, after an electronic module control program is written in a computer that controls an electronic element mounted on one electronic module, the computer that controls the electronic element mounted on the one electronic module is an electronic module. Start operation according to the control program. Next, a reset signal for enabling writing of the electronic module control program and the electronic module control program are transferred to a computer of another electronic module. Then, after the transfer of the electronic module control program is completed, the transfer of the electronic module control program of the computer that controls the electronic elements mounted on the one electronic module is prohibited.

具体的には、本発明に係る電子モジュール制御プログラムは、電子モジュールに搭載された電子素子の制御をコンピュータを用いて実行させるための電子モジュール制御プログラムであって、前記電子モジュール制御プログラムの他の電子モジュールのコンピュータへの転送の許可状態又は禁止状態を表す自己のプログラム転送フラグを判定する転送フラグ判定ステップと、前記プログラム転送フラグが許可状態であれば、前記電子モジュール制御プログラムを制御するプログラムコマンドを入力可能にするリセット信号を、前記他の電子モジュールのコンピュータに出力するリセット信号出力ステップと、前記リセット信号を出力した後、前記コンピュータが記憶している前記電子モジュール制御プログラムを前記他の電子モジュールのコンピュータに転送するプログラム転送ステップと、前記電子モジュール制御プログラムの転送が完了すると、自己の前記プログラム転送フラグを禁止状態に設定する転送フラグ設定ステップとを順に有する。   Specifically, an electronic module control program according to the present invention is an electronic module control program for executing control of an electronic element mounted on an electronic module using a computer, A transfer flag determination step for determining its own program transfer flag indicating a permission state or a prohibition state of transfer of the electronic module to the computer, and a program command for controlling the electronic module control program if the program transfer flag is in a permission state A reset signal output step for outputting a reset signal enabling the input to the computer of the other electronic module; and after outputting the reset signal, the electronic module control program stored in the computer is stored in the other electronic module. Module And program transfer step of transferring the computer, the transfer of the electronic module control program is completed, and a transfer flag setting step of setting a self said program transfer flag of the disabled state in order.

この方法によれば、一の電子モジュールのコンピュータは、電子モジュール制御プログラムが書き込まれた後、書き込まれた電子モジュール制御プログラムに従って動作を開始し、電子モジュール制御プログラムは、他の電子モジュールのコンピュータにも書き込まれる。また、コンピュータは書き込み完了後に電子モジュール制御プログラムの転送を禁止される。このため、一の電子モジュールのコンピュータは、他の電子モジュールのコンピュータへ、電子モジュール制御プログラムを不用意に書き込むことがなく、他の電子モジュールのコンピュータは電子モジュール制御プログラムを不用意に書き込まれることがない。   According to this method, after the electronic module control program is written, the computer of one electronic module starts operation according to the written electronic module control program, and the electronic module control program is transferred to the computer of the other electronic module. Is also written. Further, the computer is prohibited from transferring the electronic module control program after the writing is completed. Therefore, the computer of one electronic module does not inadvertently write the electronic module control program to the computer of another electronic module, and the computer of the other electronic module is inadvertently written with the electronic module control program. There is no.

また、本発明に係る電子モジュール制御プログラムは、初期条件として、前記プログラム転送フラグが許可状態であることを特徴とする。   The electronic module control program according to the present invention is characterized in that the program transfer flag is in a permitted state as an initial condition.

この方法によれば、一の電子モジュールのコンピュータは、複数の電子モジュールのそれぞれのコンピュータへ電子モジュール制御プログラムを縦続的に書き込むことができる。   According to this method, the computer of one electronic module can write the electronic module control program in a cascade manner to each computer of the plurality of electronic modules.

また、本発明に係る電子モジュール制御プログラムは、前記プログラム転送ステップの後において、前記プログラム転送フラグが許可状態であり、かつ、前記他の電子モジュールのコンピュータが無応答であるときは、自己の前記プログラム転送フラグを禁止状態にすることを特徴とする。   In addition, the electronic module control program according to the present invention, after the program transfer step, when the program transfer flag is in a permitted state and the computer of the other electronic module is not responding, The program transfer flag is set to a prohibited state.

この方法によれば、電子モジュール制御プログラムを継続的に書き込む回数について、電子モジュール制御プログラムにおける指定は不要となるため、電子モジュール制御プログラムを、電子モジュールの数に依存しない電子モジュール制御プログラムとすることができる。   According to this method, it is not necessary to specify the number of times the electronic module control program is continuously written in the electronic module control program, so the electronic module control program is an electronic module control program that does not depend on the number of electronic modules. Can do.

また、本発明に係るいずれかの電子モジュール制御プログラムは、コンピュータにプログラムとして実行させることができ、コンピュータ読み取り可能な記録媒体に記録される。   In addition, any one of the electronic module control programs according to the present invention can be executed as a program by a computer and recorded on a computer-readable recording medium.

さらに、本発明に係るいずれかの電子モジュールは、コンピュータに実行させるための電子モジュール制御プログラムを書き込みしたコンピュータと、前記コンピュータを用いて制御される電子素子と、を搭載する。   Furthermore, any one of the electronic modules according to the present invention includes a computer in which an electronic module control program to be executed by a computer is written, and an electronic element that is controlled using the computer.

また、本発明に係る電子モジュール製造方法は、電子素子を制御するコンピュータを備えた電子モジュールの製造方法であって、前記電子素子の制御を前記コンピュータを用いて実行させるための電子モジュール制御プログラムを記憶したホストコンピュータと第一の前記電子モジュールとを電気的に接続し、前記第一の電子モジュールと第二の前記電子モジュールとを電気的に接続する電子モジュール接続工程と、前記ホストコンピュータが、前記第一の前記電子モジュールのコンピュータに、前記電子モジュール制御プログラムを書き込む第一のプログラム書き込み工程と、前記第一の電子モジュールのコンピュータが、前記第二の電子モジュールのコンピュータに、前記書き込まれた前記電子モジュール制御プログラムを転送して書き込む第二のプログラム書き込み工程とを順に有する。   An electronic module manufacturing method according to the present invention is an electronic module manufacturing method including a computer that controls an electronic element, and an electronic module control program for executing control of the electronic element using the computer. An electronic module connection step of electrically connecting the stored host computer and the first electronic module, and electrically connecting the first electronic module and the second electronic module, and the host computer, A first program writing step of writing the electronic module control program to the first electronic module computer; and the first electronic module computer is written to the second electronic module computer. Transfer and write the electronic module control program And a free second program writing process in order.

この製造方法によれば、一の電子モジュールのコンピュータに、電子モジュール制御プログラムが書き込まれることで、他の電子モジュールの他の電子モジュールのコンピュータにも自動的に書き込まれる。よって、複数の電子モジュールにそれぞれコンピュータが搭載されていても、電子モジュール制御プログラムの書き込みには手間がかからない。   According to this manufacturing method, when the electronic module control program is written in the computer of one electronic module, it is automatically written in the computers of other electronic modules of other electronic modules. Therefore, even if a computer is mounted on each of the plurality of electronic modules, it does not take time to write the electronic module control program.

また、本発明に係る電子モジュール製造方法は、前記電子モジュールのコンピュータは、プログラムの転送の可否を決定するプログラム転送フラグを備え、前記第二のプログラム書き込み工程において、前記第一の電子モジュールのコンピュータは、前記プログラム転送フラグが許可状態である場合に、前記第二の電子モジュールのコンピュータにリセット信号を出力して前記プログラムコマンドの入力待ちの状態とし、前記電子モジュール制御プログラムを転送することを特徴とする。   In the electronic module manufacturing method according to the present invention, the computer of the electronic module includes a program transfer flag that determines whether or not the program can be transferred, and the computer of the first electronic module in the second program writing step. When the program transfer flag is in a permission state, a reset signal is output to the computer of the second electronic module to wait for input of the program command, and the electronic module control program is transferred. And

この製造方法によれば、他の電子モジュールのコンピュータは、リセット信号を入力されることで入力可能となるプログラムコマンドに従い、書き込まれた電子モジュール制御プログラムを確認されるため、確実に電子モジュール制御プログラムを書き込むことができる。   According to this manufacturing method, the computer of the other electronic module can check the written electronic module control program according to the program command that can be input when the reset signal is input. Can be written.

また、本発明に係る電子モジュール製造方法は、前記第一の電子モジュールに備えられた、前記プログラム転送フラグを許可状態から禁止状態に変更するプログラム転送フラグ禁止工程を、前記第二のプログラム書き込み工程の後に有することを特徴とする。   Further, in the electronic module manufacturing method according to the present invention, the program transfer flag prohibiting step of changing the program transfer flag from the permitted state to the prohibited state provided in the first electronic module is replaced with the second program writing step. It is characterized by having after.

この製造方法によれば、コンピュータは書き込み完了後に電子モジュール制御プログラムの転送を禁止されてから、書き込まれた電子モジュール制御プログラムに従って動作を開始する。このため、一の電子モジュールのコンピュータは、他の電子モジュールのコンピュータへ電子モジュール制御プログラムを不用意に書き込むことがなく、他の電子モジュールのコンピュータは電子モジュール制御プログラムを不用意に書き込まれることがない。   According to this manufacturing method, after the writing is completed, the computer is prohibited from transferring the electronic module control program, and then starts operating in accordance with the written electronic module control program. Therefore, the computer of one electronic module does not inadvertently write the electronic module control program to the computer of another electronic module, and the computer of the other electronic module may inadvertently write the electronic module control program. Absent.

なお、上記各発明は、可能な限り組み合わせることができる。   The above inventions can be combined as much as possible.

本発明によれば、一の電子モジュールのコンピュータへ電子モジュール制御プログラムを書き込んだ後に、この一の電子モジュールのコンピュータから他の電子モジュールのコンピュータへ電子モジュール制御プログラムを順次転送することで、複数のコンピュータに電子モジュール制御プログラムを効率的に書き込むことができる。   According to the present invention, after writing the electronic module control program to the computer of one electronic module, the electronic module control program is sequentially transferred from the computer of the one electronic module to the computer of the other electronic module, thereby An electronic module control program can be efficiently written in a computer.

本発明に係る電子モジュールシステムの構造図である。1 is a structural diagram of an electronic module system according to the present invention. 本発明に係る電子モジュールシステムの回路構成図である。It is a circuit block diagram of the electronic module system which concerns on this invention. 電子モジュール制御プログラムの制御フローを示したフローチャートである。It is the flowchart which showed the control flow of the electronic module control program. 電子モジュール制御プログラムのリセット信号による例外処理を示したフローチャートである。It is the flowchart which showed the exception process by the reset signal of an electronic module control program. 電子モジュールの製造工程を示したフローチャートである。It is the flowchart which showed the manufacturing process of the electronic module.

添付の図面を参照して本発明の実施の形態を説明する。以下に説明する実施の形態は本発明の構成の例であり、本発明は、以下の実施の形態に制限されるものではない。なお、本明細書及び図面において符号が同じ構成要素は、相互に同一のものを示すものとする。   Embodiments of the present invention will be described with reference to the accompanying drawings. The embodiment described below is an example of the configuration of the present invention, and the present invention is not limited to the following embodiment. In the present specification and drawings, the same reference numerals denote the same components.

図1は、本発明に係る電子モジュールシステム40の構造図である。10は電子モジュールを搭載する筐体、11は電子モジュール、12は光ファイバである。電子モジュール11を搭載する筐体10は、電子モジュール11を単体或いは複数個搭載できる。図1では、例として電子モジュール11及び電子モジュール11と同等の機能を備える電子モジュール101を搭載しているが、搭載数に制限はない。電子モジュール11は、電気信号が入力され、光信号として出力するか、或いは、光信号が入力され電気信号として出力する。光ファイバ12は、電子モジュール11から出力される光信号の伝送路として、或いは、電子モジュール11に入力される光信号の伝送路として通信機器間のデータの送受信等に用いられる。また、電子モジュール11は、光信号の送受信を行う光素子と、この光素子を制御するためのコンピュータを備える。   FIG. 1 is a structural diagram of an electronic module system 40 according to the present invention. Reference numeral 10 denotes a housing for mounting the electronic module, 11 denotes an electronic module, and 12 denotes an optical fiber. The housing 10 on which the electronic module 11 is mounted can mount a single electronic module 11 or a plurality of electronic modules 11. In FIG. 1, as an example, the electronic module 11 and the electronic module 101 having the same function as the electronic module 11 are mounted, but the number of mounted modules is not limited. The electronic module 11 receives an electrical signal and outputs it as an optical signal, or receives an optical signal and outputs it as an electrical signal. The optical fiber 12 is used for transmission / reception of data between communication devices as a transmission path of an optical signal output from the electronic module 11 or as a transmission path of an optical signal input to the electronic module 11. The electronic module 11 includes an optical element that transmits and receives an optical signal and a computer that controls the optical element.

図2は、本発明に係る電子モジュールシステム40のプログラム書き込み工程時の回路構成図である。電子モジュール11は、コンピュータ20、光素子21、リセット端子22、プログラム入力端子24、及びプログラム出力端子25、及びリセット出力端子30を備える。光ファイバ12は、光素子21に接続される。電子モジュールリセット端子50及び電子モジュールデータ入力端子51は、一の電子モジュール11に電子モジュール制御プログラムを転送するホストコンピュータ(不図示)に接続されている。電子モジュールリセット端子50と電子モジュール11のリセット端子22との間には、この間の電気的接続をON又はOFFするためのリセットスイッチ23が設けられている。リセットスイッチ23は、ホストコンピュータ(不図示)から一の電子モジュール11に備えられたコンピュータ20へ電子モジュール制御プログラムを転送する時のみON、すなわち導通される。導通されたときのみ、ホストコンピュータ(不図示)からのリセット信号がリセット端子22に入力される。リセットスイッチ23を導通させるには、冶具を用いてショートしてもよいし、スイッチでショートしてもよい。   FIG. 2 is a circuit configuration diagram in the program writing process of the electronic module system 40 according to the present invention. The electronic module 11 includes a computer 20, an optical element 21, a reset terminal 22, a program input terminal 24, a program output terminal 25, and a reset output terminal 30. The optical fiber 12 is connected to the optical element 21. The electronic module reset terminal 50 and the electronic module data input terminal 51 are connected to a host computer (not shown) that transfers an electronic module control program to one electronic module 11. A reset switch 23 is provided between the electronic module reset terminal 50 and the reset terminal 22 of the electronic module 11 to turn on or off the electrical connection therebetween. The reset switch 23 is turned on, that is, is conducted only when the electronic module control program is transferred from the host computer (not shown) to the computer 20 provided in one electronic module 11. The reset signal from the host computer (not shown) is input to the reset terminal 22 only when the connection is made. In order to make the reset switch 23 conductive, it may be short-circuited using a jig, or may be short-circuited by a switch.

コンピュータ20は、CPU(Central Processing Unit)31、フラッシュメモリ28、RAM(Random Access Memory)29、及び出力端子制御回路32を備える。CPU31は、フラッシュメモリ28やRAM29に記憶される固定値や電子モジュール制御プログラムに従って、電子モジュールの光素子を制御する中央処理装置である。RAM29は、各種のプログラムやデータを一時的に記憶するための書換可能な領域である。フラッシュメモリ28は、CPU31で実行される電子モジュール制御プログラムを記憶する書換可能な不揮発性の領域であり、記憶されたデータは電子モジュールの電源をオフにした後も保持される。また、このフラッシュメモリ28には、プログラム転送フラグ27が設けられている。プログラム転送フラグ27は、コンピュータ20の電子モジュール制御プログラムの転送の許可、禁止状態を決定するフラグである。なお、図1に示す構造図と共通の要素は説明を省略する。   The computer 20 includes a CPU (Central Processing Unit) 31, a flash memory 28, a RAM (Random Access Memory) 29, and an output terminal control circuit 32. The CPU 31 is a central processing unit that controls the optical elements of the electronic module according to fixed values stored in the flash memory 28 and the RAM 29 and an electronic module control program. The RAM 29 is a rewritable area for temporarily storing various programs and data. The flash memory 28 is a rewritable non-volatile area for storing an electronic module control program executed by the CPU 31, and the stored data is retained even after the electronic module is turned off. The flash memory 28 is provided with a program transfer flag 27. The program transfer flag 27 is a flag for determining permission / prohibition of transfer of the electronic module control program of the computer 20. The description of elements common to the structural diagram shown in FIG. 1 is omitted.

なお、電子モジュールリセット端子50は、上記転送時以外には、一の電子モジュール11のリセット端子22以外のデータ入出力端子(不図示)に接続され、電子モジュール11と外部とのデータの入出力を行う。リセット端子22は、コンピュータ20に接続されている。コンピュータ20は、リセット信号を取得すると、動作中の電子モジュール制御プログラムを停止してプログラムコマンドの入力待ち状態とされる。   The electronic module reset terminal 50 is connected to a data input / output terminal (not shown) other than the reset terminal 22 of one electronic module 11 except during the above transfer, and data input / output between the electronic module 11 and the outside is performed. I do. The reset terminal 22 is connected to the computer 20. When the computer 20 acquires the reset signal, the computer 20 stops the electronic module control program in operation and waits for input of a program command.

電子モジュールデータ入力端子51は、一の電子モジュール11に電子モジュール制御プログラムを転送するホストコンピュータ(不図示)に接続されている。電子モジュールデータ入力端子51は、一の電子モジュール11のプログラム入力端子24に接続されている。また、一の電子モジュール11のリセット出力端子30は、他の電子モジュール101のリセット端子22に接続され、一の電子モジュール11のプログラム出力端子25は、他の電子モジュール101のプログラム入力端子24に接続されている。   The electronic module data input terminal 51 is connected to a host computer (not shown) that transfers an electronic module control program to one electronic module 11. The electronic module data input terminal 51 is connected to the program input terminal 24 of one electronic module 11. The reset output terminal 30 of one electronic module 11 is connected to the reset terminal 22 of another electronic module 101, and the program output terminal 25 of one electronic module 11 is connected to the program input terminal 24 of the other electronic module 101. It is connected.

本実施形態においては、一の電子モジュール11及び隣接する他の電子モジュール101を一個ずつ接続し、それぞれに備えられたコンピュータ20に電子モジュール制御プログラムを書き込む例について説明する。ここで、三個以上の電子モジュールに電子モジュール制御プログラムを書き込む場合は、他の電子モジュール101のリセット出力端子30に、他の電子モジュール101に隣接する別の他の電子モジュールのリセット端子22を接続し、他の電子モジュール101のプログラム出力端子25に、他の電子モジュール11に隣接する別の他の電子モジュールのプログラム入力端子24を接続するように電子モジュール11を縦続接続することで、電子モジュール制御プログラムを全ての電子モジュールに書き込むことができる。   In the present embodiment, an example will be described in which one electronic module 11 and another adjacent electronic module 101 are connected one by one and an electronic module control program is written in a computer 20 provided in each electronic module 11. Here, when the electronic module control program is written in three or more electronic modules, the reset terminal 22 of another electronic module adjacent to the other electronic module 101 is connected to the reset output terminal 30 of the other electronic module 101. By connecting and connecting the electronic modules 11 in cascade so that the program input terminal 24 of another electronic module adjacent to the other electronic module 11 is connected to the program output terminal 25 of the other electronic module 101, Module control programs can be written to all electronic modules.

次に電子モジュール11に備えられているコンピュータ20の構成について説明する。コンピュータ20は、電子素子の一つである光素子21を制御するための図示しないレーザー駆動回路に発光側の光素子21の設定情報を転送する。そして、受光側の光素子21が光信号から変換した電気信号を増幅する受信アンプから信号の有無や受光パワー等の情報を取得する。コンピュータ20は、これらの機能を書き込まれた電子モジュール制御プログラムに従って動作する。コンピュータ20は、フラッシュメモリ28からRAM29に光素子21の発光電力等の制御データを含む設定情報を転送する。CPU31はフラッシュメモリ28に書き込まれた電子モジュール制御プログラムに基づいて、フラッシュメモリ28、RAM29、及び入出力端子制御回路32を制御する。入出力端子制御回路32はCPU31からの命令に従って外部と接続されているリセット端子22、プログラム入力端子24、プログラム出力端子25及びリセット出力端子30を制御する。   Next, the configuration of the computer 20 provided in the electronic module 11 will be described. The computer 20 transfers the setting information of the light-emitting side optical element 21 to a laser drive circuit (not shown) for controlling the optical element 21 that is one of the electronic elements. Then, information such as the presence / absence of a signal and light reception power is acquired from a reception amplifier that amplifies an electric signal converted from an optical signal by the light receiving side optical element 21. The computer 20 operates according to the electronic module control program in which these functions are written. The computer 20 transfers setting information including control data such as light emission power of the optical element 21 from the flash memory 28 to the RAM 29. The CPU 31 controls the flash memory 28, the RAM 29, and the input / output terminal control circuit 32 based on the electronic module control program written in the flash memory 28. The input / output terminal control circuit 32 controls the reset terminal 22, the program input terminal 24, the program output terminal 25 and the reset output terminal 30 which are connected to the outside in accordance with a command from the CPU 31.

フラッシュメモリ28に備えられたプログラム転送フラグ27は、コンピュータ20の電子モジュール制御プログラムの転送の許可、禁止状態を決定するフラグである。コンピュータ20は、電子モジュール制御プログラムに基づいて、プログラム転送フラグ27が許可状態であるか、禁止状態であるか判定する。許可状態であるときには、コンピュータ20は、他の電子モジュール101に備えられたコンピュータ20へ電子モジュール制御プログラムを転送できる状態とされる。一方、禁止状態であるときには、コンピュータ20が、他の電子モジュール101に備えられたコンピュータ20へ電子モジュール制御プログラムを転送できない状態とされる。   The program transfer flag 27 provided in the flash memory 28 is a flag for determining permission or prohibition of transfer of the electronic module control program of the computer 20. The computer 20 determines whether the program transfer flag 27 is in a permitted state or a prohibited state based on the electronic module control program. When in the permitted state, the computer 20 is in a state where the electronic module control program can be transferred to the computer 20 provided in the other electronic module 101. On the other hand, when the electronic module control program is in the prohibited state, the electronic module control program cannot be transferred to the computer 20 provided in the other electronic module 101.

コンピュータ20は、電子モジュールデータ入力端子51からプログラム入力端子24を介して電子モジュール制御プログラムを取得する。また、コンピュータ20は、プログラム出力端子25から、他の電子モジュール101のコンピュータ20へ電子モジュール制御プログラムを転送する。この電子モジュール制御プログラムの通信方式としては、1線通信方式の他に、2線通信方式であるI2C(Inter―Integrated Circuit)、3線通信方式であるSPI(Serial Peripheral Interface)等がある。そして、コンピュータ20は、光素子21、プログラム入力端子24、プログラム出力端子25に接続される。光素子21は、コンピュータ20に接続され、入力された電気信号を光信号に変換して出力するか、或いは、入力された光信号を電気信号に変換して出力する。   The computer 20 acquires an electronic module control program from the electronic module data input terminal 51 via the program input terminal 24. Further, the computer 20 transfers the electronic module control program from the program output terminal 25 to the computer 20 of the other electronic module 101. As a communication method of the electronic module control program, there are I2C (Inter-Integrated Circuit) which is a two-wire communication method, SPI (Serial Peripheral Interface) which is a three-wire communication method, and the like. The computer 20 is connected to the optical element 21, the program input terminal 24, and the program output terminal 25. The optical element 21 is connected to the computer 20 and converts an input electrical signal into an optical signal for output, or converts an input optical signal into an electrical signal for output.

次に、図2、図3及び図4を参照して、本発明に係る電子モジュール制御プログラムの書き込み、出力、開始の一連の動作について説明する。まず、ホストコンピュータ(不図示)から一の電子モジュール11への、第一の電子モジュール制御プログラムの書き込み動作について説明する。   Next, a series of operations of writing, outputting and starting the electronic module control program according to the present invention will be described with reference to FIGS. First, the writing operation of the first electronic module control program from the host computer (not shown) to one electronic module 11 will be described.

まず、リセットスイッチ23を導通させ、ホストコンピュータ(不図示)から電子モジュール11のリセット端子22にリセット信号を入力させる。リセット端子22からリセット信号が入力されるとコンピュータ20は、図4に示す例外処理へと移行する。図4は、電子モジュール制御プログラムのリセット信号による例外処理を示したフローチャートである。図4に示すように、本発明に係る電子モジュール制御プログラムのリセット信号による例外処理は、プログラム停止ステップS201と、プログラムコマンド有無判定ステップS202と、プログラムコマンド内容判断ステップS203と、プログラム書き込みステップS204と、プログラム出力ステップS205と、プログラム開始ステップS206とを順に実行する。   First, the reset switch 23 is turned on, and a reset signal is input from the host computer (not shown) to the reset terminal 22 of the electronic module 11. When a reset signal is input from the reset terminal 22, the computer 20 proceeds to exception processing shown in FIG. 4. FIG. 4 is a flowchart showing exception processing by a reset signal of the electronic module control program. As shown in FIG. 4, exception processing by the reset signal of the electronic module control program according to the present invention includes program stop step S201, program command presence / absence determination step S202, program command content determination step S203, and program write step S204. Then, program output step S205 and program start step S206 are executed in order.

コンピュータ20は、リセット信号を取得すると、プログラム停止ステップS201に移行して電子モジュール制御プログラムを停止し、プログラムコマンド有無判定ステップS202に移行し、プログラムコマンドの有無を判定する。コンピュータ20は、プログラムコマンドの存在を確認した場合には、プログラムコマンド内容判断ステップS203へ進み、プログラムコマンドの内容を判断する。プログラムコマンドの存在を確認できなかった場合は、コンピュータ20は、プログラムコマンドの入力待ち状態を維持する。なお、リセット信号は、固有のデータ形式であってもよいし、電圧の高低やアースへのショート/オープンの状態形式であってもよい。   Upon acquiring the reset signal, the computer 20 proceeds to program stop step S201, stops the electronic module control program, proceeds to program command presence / absence determination step S202, and determines the presence / absence of the program command. If the computer 20 confirms the presence of the program command, the computer 20 proceeds to a program command content determination step S203 to determine the content of the program command. If the presence of the program command cannot be confirmed, the computer 20 maintains a state waiting for input of the program command. The reset signal may have a specific data format, or a voltage level or a short / open state format with respect to ground.

次に、ホストコンピュータ(不図示)は、電子モジュールデータ入力端子51からコンピュータ20のプログラム入力端子24を通じて、プログラムコマンドの一つであるプログラム書き込みコマンドを送る。このプログラム書き込みコマンドを取得したコンピュータ20は、プログラム書き込みステップS204において、転送される電子モジュール制御プログラムをコンピュータ20のフラッシュエリア28に書き込む。コンピュータ20は、電子モジュール制御プログラムの書き込みが完了すると、ホストコンピュータ(不図示)にプログラム入力端子24を通じて、プログラム書き込み完了を示す信号を送信する。   Next, a host computer (not shown) sends a program write command, which is one of the program commands, from the electronic module data input terminal 51 through the program input terminal 24 of the computer 20. The computer 20 that has acquired the program write command writes the transferred electronic module control program in the flash area 28 of the computer 20 in the program write step S204. When the writing of the electronic module control program is completed, the computer 20 transmits a signal indicating the completion of the program writing to the host computer (not shown) through the program input terminal 24.

プログラム書き込み完了を示す信号を取得したホストコンピュータ(不図示)は、電子モジュールデータ入力端子51からコンピュータ20のプログラム入力端子24へプログラムコマンドの一つであるプログラム出力コマンドを送る。プログラム入力端子24から、プログラム出力コマンドを取得した場合、コンピュータ20は、プログラム出力ステップS205に進む。プログラム出力ステップS205において、フラッシュエリア28に書き込まれた電子モジュール制御プログラムをプログラム入力端子24から電子モジュールデータ入力端子51を通して、ホストコンピュータ(不図示)へ出力する。ホストコンピュータ(不図示)は、その出力された電子モジュール制御プログラムを取得し、コンピュータ20へ送り込んだ電子モジュール制御プログラムと照合する。電子モジュール制御プログラムが間違いなく書き込まれていることが確認されると、ホストコンピュータ(不図示)は、データ入力端子51からコンピュータ20のプログラム入力端子24へ、電子モジュール制御プログラム転送完了を示す信号を送る。コンピュータ20は、電子モジュール制御プログラム転送完了を示す信号を取得することで、ホストコンピュータ(不図示)から一の電子モジュール11に備えられたコンピュータ20へ電子モジュール制御プログラムの書き込みが完了する。   A host computer (not shown) that has acquired a signal indicating completion of program writing sends a program output command, which is one of the program commands, from the electronic module data input terminal 51 to the program input terminal 24 of the computer 20. When the program output command is acquired from the program input terminal 24, the computer 20 proceeds to the program output step S205. In the program output step S205, the electronic module control program written in the flash area 28 is output from the program input terminal 24 to the host computer (not shown) through the electronic module data input terminal 51. A host computer (not shown) acquires the output electronic module control program and compares it with the electronic module control program sent to the computer 20. When it is confirmed that the electronic module control program has been written without fail, the host computer (not shown) sends a signal indicating completion of transfer of the electronic module control program from the data input terminal 51 to the program input terminal 24 of the computer 20. send. The computer 20 acquires a signal indicating completion of transfer of the electronic module control program, whereby the writing of the electronic module control program is completed from the host computer (not shown) to the computer 20 provided in the one electronic module 11.

次に、ホストコンピュータ(不図示)は、プログラムコマンドの一つであるリセット解除コマンドを電子モジュールデータ入力端子51から送信する。このリセット解除コマンドを取得したコンピュータ20は、電子モジュール制御プログラムを開始するプログラム開始ステップS206を実行する。   Next, a host computer (not shown) transmits a reset release command, which is one of program commands, from the electronic module data input terminal 51. The computer 20 having acquired this reset release command executes a program start step S206 for starting the electronic module control program.

以上の一連の動作で、リセットスイッチ23に接続されている一の電子モジュール11に備えられたコンピュータ20への電子モジュール制御プログラムの書き込み動作が完了する。一の電子モジュール11に備えられたコンピュータ20は、電子モジュール制御プログラムによって、光素子21の制御を実行することができる。   With the above series of operations, the writing operation of the electronic module control program to the computer 20 provided in the one electronic module 11 connected to the reset switch 23 is completed. The computer 20 provided in one electronic module 11 can control the optical element 21 by an electronic module control program.

ここで、電子モジュール制御プログラムの動作について説明する。図3は、電子モジュール制御プログラムの制御フローを示したフローチャートである。電子モジュール制御プログラムは、電子モジュール11に搭載された光素子21の制御をコンピュータ20を用いて実行させるための電子モジュール制御プログラムであって、コンピュータ20の機能の初期設定を行うレジスタ初期化ステップS107と、コンピュータ20に設けられた入出力端子の入出力を設定する入出力端子初期化ステップS108と、プログラム転送フラグ27の許可、禁止状態を判定するプログラム転送フラグ判定ステップS101と、リセット信号出力ステップS102と、プログラム転送ステップS103と、転送フラグ設定ステップS104、プログラム開始ステップS105と、電子素子制御ステップS106とを順に実行する。   Here, the operation of the electronic module control program will be described. FIG. 3 is a flowchart showing a control flow of the electronic module control program. The electronic module control program is an electronic module control program for executing control of the optical element 21 mounted on the electronic module 11 using the computer 20, and is a register initialization step S <b> 107 for initializing the functions of the computer 20. An input / output terminal initialization step S108 for setting input / output of the input / output terminals provided in the computer 20, a program transfer flag determination step S101 for determining whether the program transfer flag 27 is permitted or prohibited, and a reset signal output step. S102, program transfer step S103, transfer flag setting step S104, program start step S105, and electronic element control step S106 are executed in order.

コンピュータ20は、まずレジスタ初期化ステップS107を実行する。例えばコンピュータ20の起動時に、レジスタ初期化ステップS107において、コンピュータ20内のレジスタを初期化することによって、コンピュータ20に備わっている機能の初期設定を行う。レジスタの値はコンピュータ20の起動時に電子モジュール制御プログラムから設定する。   The computer 20 first executes a register initialization step S107. For example, when the computer 20 is started up, in the register initialization step S107, the registers in the computer 20 are initialized to initialize the functions provided in the computer 20. The register value is set from the electronic module control program when the computer 20 is started.

次に、コンピュータ20は、入出力端子初期化ステップS108を実行する。入出力端子初期化ステップS108において、コンピュータ20は、コンピュータ20に備えられた入出力端子の入出力を設定する。出力側に設定する場合は、出力時の信号の値としてHigh状態又はLow状態を設定する。   Next, the computer 20 executes an input / output terminal initialization step S108. In the input / output terminal initialization step S108, the computer 20 sets the input / output of the input / output terminals provided in the computer 20. When setting to the output side, a High state or a Low state is set as a signal value at the time of output.

電子モジュール制御プログラムが起動すると、コンピュータ20は、プログラム転送フラグ判定ステップS101に移行し、自己のプログラム転送フラグ27を判定する。隣接して縦続接続された他の電子モジュール101に備えられたコンピュータ20へのプログラム転送の必要が無い状態であれば、プログラム転送フラグ27が転送禁止となる。電子モジュール11は、光素子21を制御する電子素子制御ステップS106へ移行して、電子モジュール制御プログラムにしたがって通常の信号送受信動作を行う。一方、初期状態において、プログラム転送フラグ27が、初期状態では許可状態と設定されている場合、すなわち、隣接して縦続接続された他の電子モジュール101に備えられたコンピュータ20へのプログラムの転送の必要がある状態であれば、コンピュータ20は、リセット信号出力ステップS102に移行する。   When the electronic module control program is activated, the computer 20 proceeds to a program transfer flag determination step S101 and determines its own program transfer flag 27. If there is no need to transfer a program to the computer 20 provided in another electronic module 101 connected in cascade, the program transfer flag 27 is prohibited. The electronic module 11 proceeds to an electronic element control step S106 for controlling the optical element 21, and performs a normal signal transmission / reception operation according to the electronic module control program. On the other hand, in the initial state, when the program transfer flag 27 is set to the permitted state in the initial state, that is, the program transfer to the computer 20 provided in another electronic module 101 connected in cascade. If necessary, the computer 20 proceeds to a reset signal output step S102.

リセット信号出力ステップS102においては、一の電子モジュール11に備えられたコンピュータ20は、リセット信号を、リセット出力端子30から出力する。リセット端子22からリセット信号を取得した隣接して縦続接続された他の電子モジュール101に備えられたコンピュータ20は、プログラムコマンドの入力待ちの状態となる。このプログラムコマンドの入力待ちの状態は、図4に示すように、電子モジュール制御プログラムの例外処理のスタート工程に該当する。   In the reset signal output step S <b> 102, the computer 20 provided in one electronic module 11 outputs a reset signal from the reset output terminal 30. The computer 20 provided in another electronic module 101 connected in cascade and having acquired a reset signal from the reset terminal 22 is in a state of waiting for input of a program command. This program command input waiting state corresponds to the exception process start process of the electronic module control program, as shown in FIG.

以下、ホストコンピュータ(不図示)から、一の電子モジュール11のコンピュータ20への電子モジュール制御プログラム書き込み工程と同様に、一の電子モジュール11のコンピュータ20から隣接して縦続接続された他の電子モジュール101のコンピュータ20への電子モジュール制御プログラムの書き込みを行う。すなわち、ホストコンピュータ(不図示)の役目を一の電子モジュール11のコンピュータ20が行い、他の電子モジュール101のコンピュータ20へ電子モジュール制御プログラムの書き込みを行う。したがって、プログラム転送ステップS103において、一の電子モジュール11のコンピュータ20は、一の電子モジュール11のフラッシュエリア28に書き込まれている電子モジュール制御プログラムを他の電子モジュール101のコンピュータ20へ転送する。電子モジュール制御プログラムの転送処理については、前述した例外処理と同様の処理であるため、説明を省略する。   Hereinafter, in the same manner as the electronic module control program writing process from the host computer (not shown) to the computer 20 of the one electronic module 11, other electronic modules connected in cascade from the computer 20 of the one electronic module 11 are connected. The electronic module control program is written into the computer 20 of 101. That is, the computer 20 of one electronic module 11 serves as a host computer (not shown), and writes an electronic module control program to the computer 20 of another electronic module 101. Therefore, in the program transfer step S <b> 103, the computer 20 of one electronic module 11 transfers the electronic module control program written in the flash area 28 of one electronic module 11 to the computer 20 of another electronic module 101. The transfer process of the electronic module control program is the same process as the exception process described above, and a description thereof will be omitted.

一の電子モジュール11に備えられたコンピュータ20は、他の電子モジュール101に備えられたコンピュータ20への電子モジュール制御プログラムが完了すると、転送フラグ設定ステップS104へ進む。転送フラグ設定ステップS104では、一の電子モジュール11に備えられたコンピュータ20は、自己のプログラム転送フラグ27を禁止状態にする。この禁止状態は、一の電子モジュール11に備えられたコンピュータ20が、電子モジュール制御プログラムへの転送を不可とするフラグである。さらに、一の電子モジュール11に備えられたコンピュータ20は、他の電子モジュール101に備えられたコンピュータ20の電子モジュール制御プログラムを開始させるリセット解除コマンドをプログラム出力端子25から出力する。一の電子モジュール11に隣接して縦続接続された他の電子モジュール101に備えられたコンピュータ20はリセット解除コマンドをプログラム入力端子24から取得すると電子モジュール制御プログラムを開始する。   When the electronic module control program for the computer 20 provided in the other electronic module 101 is completed, the computer 20 provided in one electronic module 11 proceeds to the transfer flag setting step S104. In the transfer flag setting step S104, the computer 20 provided in one electronic module 11 sets its own program transfer flag 27 to a prohibited state. This prohibited state is a flag that disables transfer of the computer 20 included in one electronic module 11 to the electronic module control program. Further, the computer 20 provided in one electronic module 11 outputs a reset release command for starting the electronic module control program of the computer 20 provided in the other electronic module 101 from the program output terminal 25. When the computer 20 provided in another electronic module 101 connected in cascade adjacent to one electronic module 11 acquires a reset release command from the program input terminal 24, the computer 20 starts an electronic module control program.

以上、一の電子モジュール11及び隣接する他の電子モジュール101を一個ずつ接続し、それぞれに備えられたコンピュータ20に電子モジュール制御プログラムを書き込む例について説明した。ここで、三個以上の電子モジュールのコンピュータ20に電子モジュール制御プログラムを書き込む場合には、他の電子モジュール101のリセット出力端子30に、他の電子モジュール101に隣接する別の他の電子モジュールのリセット端子22を接続する。そして、他の電子モジュール101のプログラム出力端子25に、他の電子モジュールに隣接する別の他の電子モジュール11のプログラム入力端子24を接続する。このように、電子モジュール11を縦続接続し、順次転送することで、電子モジュール制御プログラムを全ての電子モジュールに書き込むことができる。   The example in which one electronic module 11 and another adjacent electronic module 101 are connected one by one and the electronic module control program is written in the computer 20 provided for each has been described above. Here, when the electronic module control program is written in the computer 20 of three or more electronic modules, the reset output terminal 30 of the other electronic module 101 is connected to another electronic module 101 adjacent to the other electronic module 101. Connect the reset terminal 22. Then, the program input terminal 24 of another electronic module 11 adjacent to the other electronic module is connected to the program output terminal 25 of the other electronic module 101. In this way, the electronic module control program can be written in all the electronic modules by connecting the electronic modules 11 in cascade and sequentially transferring them.

なお、ホストコンピュータ(不図示)に対して末端に接続された電子モジュールでは、図4において、プログラム出力ステップS205において、プログラム出力端子25から電子モジュール制御プログラムを取得することがないため、所定時間経過後に自己のプログラム転送フラグ27を禁止状態とする。禁止状態となることで電子モジュール制御プログラム書き込み動作を完了させ、プログラム開始ステップS105へ進み、光素子21を制御する電子素子制御ステップS106へ移行する。すなわち、プログラム転送ステップS103の後の転送フラグ設定ステップS104で、リセット解除コマンドは、プログラム転送フラグ27が許可状態であり、かつ、末端に接続された電子モジュールのコンピュータがプログラム出力コマンドに対して無応答であるときは、自己のコンピュータ20のプログラム転送フラグ27を禁止状態とする。そして、電子モジュール制御プログラムの書き込み動作を完了させ、光素子21を制御するプログラム開始ステップS105を経て、電子素子制御ステップS106へ移行する。この動作によって、電子モジュール制御プログラムを継続的に書き込む回数について、電子モジュール制御プログラムにおける指定は不要となるため、電子モジュール制御プログラムを、電子モジュールの数に依存しない電子モジュール制御プログラムとすることができる。   In the electronic module connected to the end with respect to the host computer (not shown), the electronic module control program is not acquired from the program output terminal 25 in the program output step S205 in FIG. Later, its own program transfer flag 27 is set to a prohibited state. The electronic module control program writing operation is completed by entering the prohibited state, the program proceeds to program start step S105, and the process proceeds to electronic element control step S106 for controlling the optical element 21. That is, in the transfer flag setting step S104 after the program transfer step S103, the reset release command indicates that the program transfer flag 27 is in a permitted state and the computer of the electronic module connected to the end does not accept the program output command. If it is a response, the program transfer flag 27 of its own computer 20 is disabled. Then, the writing operation of the electronic module control program is completed, and the process proceeds to the electronic element control step S106 through the program start step S105 for controlling the optical element 21. With this operation, the number of times the electronic module control program is continuously written does not need to be specified in the electronic module control program, so the electronic module control program can be an electronic module control program that does not depend on the number of electronic modules. .

各電子モジュール11に備えられたコンピュータ20は、各々書き込まれた電子モジュール制御プログラムを実行する。電子モジュール制御プログラムを実行することで、コンピュータ20は、光素子21を制御する図示しないレーザー駆動回路に発光側の光素子21の設定情報を転送する。設定情報を転送したことで、コンピュータ20は、受光側の光素子21が光信号から変換した電気信号を増幅する受信アンプから信号の有無や受光パワー等の情報を取得する。コンピュータ20によって制御されたレーザー駆動回路は、発光側の光素子21の制御を開始し、受光側の光素子21は光信号を受信する。   The computer 20 provided in each electronic module 11 executes the written electronic module control program. By executing the electronic module control program, the computer 20 transfers the setting information of the light-emitting side optical element 21 to a laser drive circuit (not shown) that controls the optical element 21. By transferring the setting information, the computer 20 acquires information such as the presence / absence of a signal and the received light power from a reception amplifier that amplifies the electrical signal converted from the optical signal by the optical element 21 on the light receiving side. The laser drive circuit controlled by the computer 20 starts control of the light-emitting side optical element 21 and the light-receiving side optical element 21 receives the optical signal.

以上説明したように、本実施形態に係る電子モジュール制御プログラムは、複数の電子モジュール11に搭載される光素子21を制御するために用いられる一の電子モジュール11のコンピュータ20に書き込まれることで、隣接した縦続接続された他の電子モジュール101のコンピュータ20にも自動的に書き込まれる。よって、複数の電子モジュール11のそれぞれのコンピュータ20に、電子モジュール制御プログラムを効率的に書き込むことができる。さらに、コンピュータ20は、電子モジュール制御プログラムを転送後、プログラム転送フラグ27を、電子モジュール制御プログラムを転送できない禁止状態に書き換えられる。このため、他の電子モジュール11に備えられたコンピュータ20に不用意に電子モジュール制御プログラムを転送することはない。よって、すでに電子モジュール制御プログラムが書き込まれたコンピュータ20は、接続された最初のコンピュータ20にリセット信号が入力されない限り、書き込まれた電子モジュール制御プログラムが変更されることはない。   As described above, the electronic module control program according to the present embodiment is written in the computer 20 of one electronic module 11 used to control the optical element 21 mounted on the plurality of electronic modules 11. The data is automatically written in the computer 20 of another electronic module 101 connected in cascade. Therefore, the electronic module control program can be efficiently written in each computer 20 of the plurality of electronic modules 11. Further, after transferring the electronic module control program, the computer 20 rewrites the program transfer flag 27 to a prohibited state in which the electronic module control program cannot be transferred. For this reason, the electronic module control program is not inadvertently transferred to the computer 20 provided in the other electronic module 11. Therefore, the computer 20 to which the electronic module control program has already been written does not change the written electronic module control program unless a reset signal is input to the first computer 20 connected thereto.

また、本発明に係る電子モジュール制御プログラムは、初期条件として、プログラム転送フラグ27が許可状態であることとした。   In the electronic module control program according to the present invention, the program transfer flag 27 is in the permitted state as an initial condition.

電子モジュール制御プログラムの初期条件において、プログラム転送フラグ27を許可状態とすることによって、電子モジュール制御プログラムを複数のコンピュータ20へ縦続的に書き込むことができる。   In the initial condition of the electronic module control program, the electronic module control program can be written in the plurality of computers 20 in a cascaded manner by setting the program transfer flag 27 to the permitted state.

さらに、本発明に係るいずれかの電子モジュール制御プログラムは、コンピュータ20にプログラムとして実行させることができ、コンピュータ読み取り可能な記録媒体に記録される。   Furthermore, any electronic module control program according to the present invention can be executed by the computer 20 as a program and is recorded on a computer-readable recording medium.

次に、図5を参照して、本発明に係る電子モジュール制御プログラムを書き込む電子モジュールの製造方法ついて説明する。図5は、電子モジュールの製造工程を示したフローチャートである。図5において、第一のプログラム書き込み工程S302は、ホストコンピュータ(不図示)を書き込み元コンピュータとして、一の電子モジュール11のコンピュータ20との間の工程を示している。また、第二のプログラム書き込み工程S303は、他の電子モジュール101のコンピュータ20を書き込み先コンピュータとして、書き込み元コンピュータと、書き込み先コンピュータとの間の工程を示している。   Next, with reference to FIG. 5, the manufacturing method of the electronic module which writes the electronic module control program based on this invention is demonstrated. FIG. 5 is a flowchart showing the manufacturing process of the electronic module. In FIG. 5, a first program writing step S302 shows a step with the computer 20 of one electronic module 11 using a host computer (not shown) as a writing source computer. The second program writing step S303 is a step between the writing source computer and the writing destination computer, with the computer 20 of the other electronic module 101 as the writing destination computer.

まず、電子モジュール接続工程S301において、電子モジュールリセット端子50及び電子モジュールデータ入力端子51を、一の電子モジュール11に電子モジュール制御プログラムを転送するホストコンピュータ(不図示)に接続する。電子モジュールリセット端子50を、一の電子モジュール11のリセット端子22に接続し、電子モジュールデータ入力端子51は、一の電子モジュール11のプログラム入力端子24に接続する。また、一の電子モジュール11のリセット出力端子30を、他の電子モジュール101のリセット端子22に接続する。そして、一の電子モジュール11のプログラム出力端子25を、他の電子モジュール101のプログラム入力端子24に接続する。さらにプログラムの書き込みが必要な電子モジュールがある場合には、同様に縦続接続を行う。   First, in the electronic module connection step S301, the electronic module reset terminal 50 and the electronic module data input terminal 51 are connected to a host computer (not shown) that transfers an electronic module control program to one electronic module 11. The electronic module reset terminal 50 is connected to the reset terminal 22 of one electronic module 11, and the electronic module data input terminal 51 is connected to the program input terminal 24 of one electronic module 11. Further, the reset output terminal 30 of one electronic module 11 is connected to the reset terminal 22 of another electronic module 101. Then, the program output terminal 25 of one electronic module 11 is connected to the program input terminal 24 of another electronic module 101. Further, when there is an electronic module that needs to be programmed, cascade connection is performed in the same manner.

次に、第一のプログラム書き込み工程S302において、ホストコンピュータ(不図示)は、リセット信号を電子モジュールリセット端子50から出力する。リセット信号を取得した一の電子モジュール11に備えられたコンピュータ20は、電子モジュール制御プログラムの動作を停止する。また、一の電子モジュール11に備えられたコンピュータ20は、プログラムコマンドの入力待ち状態となる。そして、ホストコンピュータ(不図示)は、プログラムコマンドとしてプログラム書き込みコマンドを電子モジュールデータ入力端子51から出力する。プログラム書き込みコマンドを取得した一の電子モジュール11に備えられたコンピュータ20は、リセット信号を入力されたことで、プログラムコマンドの入力待ち状態となる。   Next, in the first program writing step S <b> 302, the host computer (not shown) outputs a reset signal from the electronic module reset terminal 50. The computer 20 provided in the one electronic module 11 that has acquired the reset signal stops the operation of the electronic module control program. In addition, the computer 20 provided in one electronic module 11 waits for input of a program command. Then, a host computer (not shown) outputs a program write command from the electronic module data input terminal 51 as a program command. The computer 20 provided in the one electronic module 11 that has acquired the program write command enters a program command input waiting state when the reset signal is input.

そして、ホストコンピュータ(不図示)は、プログラムコマンドとしてプログラム書き込みコマンドを電子モジュールデータ入力端子51から出力する。一の電子モジュール11に備えられたコンピュータ20は、プログラム書き込みコマンドを取得すると、電子モジュール制御プログラムを書き込みできる状態となる。引き続き、ホストコンピュータ(不図示)は、電子モジュールデータ入力端子51から電子モジュール制御プログラムのデータを出力する。電子モジュール制御プログラムのデータを取得した一の電子モジュール11に備えられたコンピュータ20は、電子モジュール制御プログラムをコンピュータ20のフラッシュエリア28に書き込む。   Then, a host computer (not shown) outputs a program write command from the electronic module data input terminal 51 as a program command. When the computer 20 provided in one electronic module 11 obtains the program write command, the electronic module control program can be written. Subsequently, the host computer (not shown) outputs the electronic module control program data from the electronic module data input terminal 51. The computer 20 provided in the one electronic module 11 that has acquired the data of the electronic module control program writes the electronic module control program in the flash area 28 of the computer 20.

なお、電子モジュール制御プログラムが書き込まれていない新規の電子モジュールに対して電子モジュール制御プログラムを書き込む場合は、電子モジュール接続工程S301から、第一のプログラム書き込み工程S302におけるホストコンピュータの電子モジュール制御プログラムの停止を省略し、電子モジュール制御プログラムの書き込みへ移行する。   When writing an electronic module control program to a new electronic module to which no electronic module control program is written, the electronic module control program of the host computer in the first program writing step S302 is started from the electronic module connection step S301. The stop is omitted, and the process proceeds to writing of the electronic module control program.

次に、ホストコンピュータ(不図示)は、電子モジュールデータ入力端子51からプログラムコマンドとしてプログラム出力コマンドを出力する。プログラム出力コマンドを取得した一の電子モジュール11に備えられたコンピュータ20は、書き込まれた電子モジュール制御プログラムのデータをプログラム入力端子24から出力する。そして、ホストコンピュータ(不図示)は、一の電子モジュール11のコンピュータ20から取得した電子モジュール制御プログラムのデータを、出力した電子モジュール制御プログラムのデータと照合し、一致していることを確認する。   Next, a host computer (not shown) outputs a program output command as a program command from the electronic module data input terminal 51. The computer 20 provided in the one electronic module 11 that has acquired the program output command outputs the written electronic module control program data from the program input terminal 24. Then, the host computer (not shown) collates the data of the electronic module control program acquired from the computer 20 of one electronic module 11 with the data of the output electronic module control program, and confirms that they match.

両データが一致していれば、一の電子モジュール11のコンピュータ20への電子モジュール制御プログラムの書き込みが完了する。そして、ホストコンピュータ(不図示)は、電子モジュールデータ入力端子51からリセット解除コマンドを出力する。リセット解除コマンドを取得した電子モジュール制御プログラムが書き込まれた一の電子モジュール11に備えられたコンピュータ20は、電子モジュール制御プログラムを開始する。両データが一致していない場合は、ホストコンピュータ(不図示)は、第一のプログラム書き込み工程S302の実行に戻り、再度プログラムの転送を行う。   If the two data match, the writing of the electronic module control program to the computer 20 of one electronic module 11 is completed. Then, the host computer (not shown) outputs a reset release command from the electronic module data input terminal 51. The computer 20 provided in one electronic module 11 in which the electronic module control program that has acquired the reset release command is written starts the electronic module control program. If the two data do not match, the host computer (not shown) returns to the execution of the first program writing step S302 and transfers the program again.

次に、第二のプログラム書き込み工程S303において、一の電子モジュール11のコンピュータ20から、一の電子モジュール11に縦続接続された他の電子モジュール101のコンピュータ20へ、電子モジュール制御プログラムを書き込む。まず、一の電子モジュール11に備えられたコンピュータ20は、リセット出力端子30からリセット信号を出力する。他の電子モジュール101のコンピュータ20は、リセット信号を取得することで、電子モジュール制御プログラムの動作を停止し、プログラムコマンドの入力待ち状態となる。   Next, in the second program writing step S303, the electronic module control program is written from the computer 20 of the one electronic module 11 to the computer 20 of the other electronic module 101 connected in cascade to the one electronic module 11. First, the computer 20 provided in one electronic module 11 outputs a reset signal from the reset output terminal 30. The computer 20 of the other electronic module 101 acquires the reset signal, stops the operation of the electronic module control program, and enters a program command waiting state.

次に、一の電子モジュール11に備えられたコンピュータ20はプログラム出力端子25からプログラムコマンドとしてプログラム書き込みコマンドを出力する。プログラム書き込みコマンドを取得した他の電子モジュール101のコンピュータ20は、電子モジュール制御プログラムを書き込みできる状態となる。そして、一の電子モジュール11のコンピュータ20は、プログラム出力端子25から電子モジュール制御プログラムのデータを出力する。電子モジュール制御プログラムのデータを取得した他の電子モジュール101のコンピュータ20は、電子モジュール制御プログラムをコンピュータ20のフラッシュエリア28に書き込む。   Next, the computer 20 provided in one electronic module 11 outputs a program write command as a program command from the program output terminal 25. The computers 20 of the other electronic modules 101 that have acquired the program write command are ready to write the electronic module control program. Then, the computer 20 of one electronic module 11 outputs data of the electronic module control program from the program output terminal 25. The computer 20 of the other electronic module 101 that has acquired the data of the electronic module control program writes the electronic module control program in the flash area 28 of the computer 20.

さらに、一の電子モジュール11のコンピュータ20は、プログラム出力端子25からプログラムコマンドとしてプログラム出力コマンドを出力する。プログラム出力コマンドを取得した他の電子モジュール101のコンピュータ20は、書き込まれた電子モジュール制御プログラムのデータをプログラム入力端子24から出力する。次に、一の電子モジュール11のコンピュータ20は、他の電子モジュール101のコンピュータ20から取得した電子モジュール制御プログラムのデータを、出力した電子モジュール制御プログラムのデータと照合し、一致していることを確認する。   Further, the computer 20 of one electronic module 11 outputs a program output command as a program command from the program output terminal 25. The computer 20 of the other electronic module 101 that has acquired the program output command outputs the written electronic module control program data from the program input terminal 24. Next, the computer 20 of one electronic module 11 compares the data of the electronic module control program acquired from the computer 20 of the other electronic module 101 with the data of the output electronic module control program, and confirms that they match. Check.

確認を終えた後に、ホストコンピュータ(不図示)は、プログラム転送フラグ禁止工程S304において、他の電子モジュール101に備えられたコンピュータ20のプログラム転送フラグ27を禁止状態に設定する。そして、ホストコンピュータ(不図示)から、他の電子モジュール101に備えられたコンピュータ20への電子モジュール制御プログラムの書き込みを完了する。   After the confirmation, the host computer (not shown) sets the program transfer flag 27 of the computer 20 provided in the other electronic module 101 to the prohibited state in the program transfer flag prohibiting step S304. Then, the writing of the electronic module control program from the host computer (not shown) to the computer 20 provided in the other electronic module 101 is completed.

続いて、一の電子モジュール11のコンピュータ20は、プログラム出力端子25からリセット解除コマンドを出力する。リセット解除コマンドを取得した、他の電子モジュール101のコンピュータ20は、電子モジュール制御プログラムを開始する。以下同様に、縦続接続された電子モジュールのコンピュータ20へ、連続して電子モジュール制御プログラムを書き込むことができる。   Subsequently, the computer 20 of one electronic module 11 outputs a reset release command from the program output terminal 25. The computer 20 of another electronic module 101 that has acquired the reset release command starts an electronic module control program. Similarly, the electronic module control program can be continuously written to the computer 20 of the electronic modules connected in cascade.

以上説明したように、本発明に係る電子モジュール製造方法は、一の電子モジュール11のコンピュータ20に、電子モジュール制御プログラムを書き込まれることで、他の電子モジュール101のコンピュータ20にも電子モジュール制御プログラムを自動的に書き込むことができる。よって、複数の電子モジュールにそれぞれコンピュータ20が搭載されていても、電子モジュール制御プログラムの書き込みには手間がかからない。また、一の電子モジュール11のコンピュータ20は、リセット信号を入力されることで入力可能となるプログラムコマンドに従い、電子モジュール制御プログラムの書き込み、又は出力を行うため、電子モジュール制御プログラムの書き込み、又は出力について、手間がかからない。そして、コンピュータ20は電子モジュール制御プログラムの書き込み完了後に転送フラグ27を禁止状態にするため、一の電子モジュール11のコンピュータ20は、他の電子モジュール11のコンピュータ20へ電子モジュール制御プログラムを不用意に書き込むことがなく、他の電子モジュール11のコンピュータ20は電子モジュール制御プログラムを不用意に書き込まれることがない。   As described above, in the electronic module manufacturing method according to the present invention, an electronic module control program is written in the computer 20 of another electronic module 101 by writing the electronic module control program in the computer 20 of one electronic module 11. Can be automatically written. Therefore, even if the computer 20 is mounted on each of the plurality of electronic modules, it does not take time to write the electronic module control program. Further, the computer 20 of one electronic module 11 writes or outputs an electronic module control program in order to write or output the electronic module control program in accordance with a program command that can be input when a reset signal is input. About hassle-free. Then, since the computer 20 sets the transfer flag 27 to the prohibited state after the writing of the electronic module control program is completed, the computer 20 of one electronic module 11 carelessly sends the electronic module control program to the computer 20 of the other electronic module 11. The computer 20 of the other electronic module 11 does not write the electronic module control program carelessly.

本発明の電子モジュール制御プログラムは、例えば、電子モジュールのコンピュータに実行させることができる。また、本発明の電子モジュール製造方法は、複数の電子モジュール全てに電子モジュール制御プログラムを書き込む製造工程に適用することができる。   The electronic module control program of the present invention can be executed by a computer of the electronic module, for example. The electronic module manufacturing method of the present invention can be applied to a manufacturing process in which an electronic module control program is written in all of a plurality of electronic modules.

10:筐体
11,101:電子モジュール
12:光ファイバ
20:コンピュータ
21:光素子
22:リセット端子
23:リセットスイッチ
24:プログラム入力端子
25:プログラム出力端子
27:プログラム転送フラグ
28:フラッシュメモリ
29:RAM
30:リセット出力端子
31:CPU
32:入出力端子制御回路
40:電子モジュールシステム
50:電子モジュールリセット端子
51:電子モジュールデータ入力端子
S101:プログラム転送フラグ判定ステップ
S102:リセット信号出力ステップ
S103:プログラム転送ステップ
S104:転送フラグ設定ステップ
S105:プログラム開始ステップ
S106:電子素子制御ステップ
S107:レジスタ初期化ステップ
S108:入出力端子初期化ステップ
S201:プログラム停止ステップ
S202:プログラムコマンド有無判定ステップ
S203:プログラムコマンド内容判断ステップ
S204:プログラム書き込みステップ
S205:プログラム出力ステップ
S206:プログラム開始ステップ
S301:電子モジュール接続工程
S302:第一のプログラム書き込み工程
S303:第二のプログラム書き込み工程
S304:プログラム転送フラグ禁止工程
10: Housing 11, 101: Electronic module 12: Optical fiber 20: Computer 21: Optical element 22: Reset terminal 23: Reset switch 24: Program input terminal 25: Program output terminal 27: Program transfer flag 28: Flash memory 29: RAM
30: Reset output terminal 31: CPU
32: Input / output terminal control circuit 40: Electronic module system 50: Electronic module reset terminal 51: Electronic module data input terminal S101: Program transfer flag determination step S102: Reset signal output step S103: Program transfer step S104: Transfer flag setting step S105 : Program start step S106: Electronic element control step S107: Register initialization step S108: Input / output terminal initialization step S201: Program stop step S202: Program command presence / absence determination step S203: Program command content determination step S204: Program write step S205: Program output step S206: Program start step S301: Electronic module connection step S302: First program document Inclusive Step S303: second program writing step S304: Program transfer flag prohibiting step

Claims (5)

電子モジュールに搭載された電子素子の制御をコンピュータを用いて実行させるための電子モジュール制御プログラムであって、
前記電子モジュール制御プログラムの他の電子モジュールのコンピュータへの転送の許可状態又は禁止状態を表す自己のプログラム転送フラグを判定する転送フラグ判定ステップと、
前記プログラム転送フラグが許可状態であれば、前記電子モジュール制御プログラムを制御するプログラムコマンドを入力可能にするリセット信号を、前記他の電子モジュールのコンピュータに出力するリセット信号出力ステップと、
前記リセット信号を出力した後、前記コンピュータが記憶している前記電子モジュール制御プログラムを前記他の電子モジュールのコンピュータに転送するプログラム転送ステップと、
前記電子モジュール制御プログラムの転送が完了すると、自己の前記プログラム転送フラグを禁止状態に設定する転送フラグ設定ステップと、を順に有するコンピュータに実行させるための電子モジュール制御プログラム。
An electronic module control program for executing control of electronic elements mounted on an electronic module using a computer,
A transfer flag determination step for determining its own program transfer flag indicating a permission state or a prohibition state of transfer of the electronic module control program to the computer of the other electronic module;
If the program transfer flag is in a permitted state, a reset signal output step for outputting a reset signal enabling input of a program command for controlling the electronic module control program to a computer of the other electronic module;
A program transfer step of transferring the electronic module control program stored in the computer to the computer of the other electronic module after outputting the reset signal;
When the transfer of the electronic module control program is completed, an electronic module control program for causing a computer to sequentially execute a transfer flag setting step for setting its own program transfer flag to a prohibited state.
初期条件として、前記プログラム転送フラグが許可状態であることを特徴とする請求項1に記載のコンピュータに実行させるための電子モジュール制御プログラム。   2. The electronic module control program for causing a computer to execute according to claim 1, wherein the program transfer flag is in a permitted state as an initial condition. 前記プログラム転送ステップの後において、前記プログラム転送フラグが許可状態であり、かつ、前記他の電子モジュールのコンピュータが無応答であるときは、自己の前記プログラム転送フラグを禁止状態とすることを特徴とする請求項1に記載のコンピュータに実行させるための電子モジュール制御プログラム。   After the program transfer step, when the program transfer flag is in a permitted state and the computer of the other electronic module is not responding, the program transfer flag is set to a prohibited state. An electronic module control program for causing a computer according to claim 1 to execute. 請求項1から3のいずれかに記載のコンピュータに実行させるための電子モジュール制御プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium in which an electronic module control program to be executed by a computer according to any one of claims 1 to 3 is recorded. 請求項1から3のいずれかに記載のコンピュータに実行させるための電子モジュール制御プログラムを書き込んだコンピュータと、前記コンピュータを用いて制御される電子素子と、を搭載した電子モジュール。   An electronic module comprising: a computer in which an electronic module control program to be executed by a computer according to any one of claims 1 to 3 is written; and an electronic device controlled using the computer.
JP2009296231A 2009-12-25 2009-12-25 Electronic module control program Expired - Fee Related JP5350210B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009296231A JP5350210B2 (en) 2009-12-25 2009-12-25 Electronic module control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009296231A JP5350210B2 (en) 2009-12-25 2009-12-25 Electronic module control program

Publications (2)

Publication Number Publication Date
JP2011139140A JP2011139140A (en) 2011-07-14
JP5350210B2 true JP5350210B2 (en) 2013-11-27

Family

ID=44350165

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009296231A Expired - Fee Related JP5350210B2 (en) 2009-12-25 2009-12-25 Electronic module control program

Country Status (1)

Country Link
JP (1) JP5350210B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0498557A (en) * 1990-08-17 1992-03-31 Toyota Motor Corp File transfer method
JP2000339284A (en) * 1999-05-28 2000-12-08 Fujitsu Ltd Multiprocessor system and activation method therefor
JP2006268107A (en) * 2005-03-22 2006-10-05 Denso Corp Electronic controller

Also Published As

Publication number Publication date
JP2011139140A (en) 2011-07-14

Similar Documents

Publication Publication Date Title
KR102138936B1 (en) Power supply device and power supply method using the same
US20100064036A1 (en) Peripheral device operation method, peripheral device and host
JP2009188445A (en) Image processing apparatus, serial bus control method and program, and recording medium
US7930535B1 (en) Method and apparatus for loading configuration data
JP2009176152A (en) Information processing apparatus
JP2010140266A (en) Electronic device system and electronic device
US20130040702A1 (en) Sd switch box in a cellular handset
JP2006190132A (en) Control program download device
US7354278B2 (en) Recovery apparatus for BIOS chip in a computer system
KR20080078977A (en) Method and system for interfacing a plurality of memory devices using mmc or sd protocol
KR20020036717A (en) Microcomputer and method for controlling the same
JP2008158991A (en) Control system for nand type flash memory
JP6047033B2 (en) LSI and information processing system
JP5350210B2 (en) Electronic module control program
US20120092044A1 (en) Circuit for swapping a memory card in an electronic device
EP1394682B1 (en) Data transfer control device, program and method of fabricating an electronic instrument
US20140292384A1 (en) Methods of multi-protocol system and integrated circuit for multi-protocol communication on single wire
CN111143898A (en) Data protection method for pluggable memory device
CN111414322B (en) Method, system, equipment and storage medium for adapting Nand flash interface working protocol
US7549594B2 (en) Electronic device having plurality of functional units and controller for controlling registers according to status of functional units
US10318463B2 (en) Interface controller, external electronic device, and external electronic device control method
TWI757923B (en) Pre-boot execution environment determination system and method thereof
JP5270180B2 (en) Media reader / writer
KR102154245B1 (en) Software-based reconfiguration unit within the satellite
US20100169545A1 (en) Host system and operating method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120607

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130620

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130625

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130717

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130806

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130821

LAPS Cancellation because of no payment of annual fees