JP2022119366A - Electronic instrument - Google Patents

Electronic instrument Download PDF

Info

Publication number
JP2022119366A
JP2022119366A JP2021016438A JP2021016438A JP2022119366A JP 2022119366 A JP2022119366 A JP 2022119366A JP 2021016438 A JP2021016438 A JP 2021016438A JP 2021016438 A JP2021016438 A JP 2021016438A JP 2022119366 A JP2022119366 A JP 2022119366A
Authority
JP
Japan
Prior art keywords
switch
switching
substrate
control circuit
control unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2021016438A
Other languages
Japanese (ja)
Inventor
滋 竹岸
Shigeru Takegishi
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.)
Nihon Dempa Kogyo Co Ltd
Original Assignee
Nihon Dempa Kogyo Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nihon Dempa Kogyo Co Ltd filed Critical Nihon Dempa Kogyo Co Ltd
Priority to JP2021016438A priority Critical patent/JP2022119366A/en
Publication of JP2022119366A publication Critical patent/JP2022119366A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Tests Of Electronic Circuits (AREA)

Abstract

To provide an electronic instrument that makes it possible to check if a switch is changed over after performing control to change over the switch.SOLUTION: An electronic instrument 100 comprises: a first substrate 10; a second substrate 20; and a connection part 30 that connects the first substrate 10 and second substrate 20. The first substrate 10 has a control circuit 13 that controls a circuit the second substrate 20 has, and the second substrate 20 has: a switch 22; and an IO expander 23 that controls the switch on the basis of control by a control unit. The switch 22 is a switch in which a state changes over on the basis of a change-over signal the IO expander 23 outputs, and the IO expander 23 has: a first output port that outputs a change-over switch corresponding to a switch change-over command a control unit 13 outputs for causing the switch 22 to be changed over; an input port to which the change-over signal is input; and a second output port that outputs an interruption signal relative to the control unit 13 in response to the input of the change-over signal to the input port.SELECTED DRAWING: Figure 1

Description

本発明は、電子機器に関する。 The present invention relates to electronic equipment.

従来、電気信号の出力又は電力の供給を遮断するか否かを切り替えるスイッチが知られている。特許文献1には、ポート出力信号に基づいて電力の供給と遮断とを切り替える入力装置が開示されている。 2. Description of the Related Art Conventionally, a switch is known that switches whether to cut off the output of an electric signal or the supply of electric power. Japanese Unexamined Patent Application Publication No. 2002-200003 discloses an input device that switches between power supply and power cutoff based on a port output signal.

特開2011-221659号公報JP 2011-221659 A

従来の技術を用いてスイッチを切り替える場合、ポート出力信号を出力した後にスイッチの状態が切り替わったことを確認することができない。したがって、スイッチの状態が適切に切り替わらなかった場合に、スイッチが搭載された装置が誤って動作するという問題が生じていた。 When switching the switch using conventional techniques, it is not possible to confirm that the state of the switch has switched after outputting the port output signal. Therefore, when the state of the switch is not properly switched, there is a problem that the device equipped with the switch operates erroneously.

そこで、本発明はこれらの点に鑑みてなされたものであり、スイッチを制御する装置が、スイッチを切り替える制御をした後にスイッチが切り替わったことを確認できるようにすることを目的とする。 Therefore, the present invention has been made in view of these points, and it is an object of the present invention to enable a device that controls a switch to confirm that the switch has been switched after switching the switch.

本発明の態様に係る電子機器は、第1基板と、第2基板と、前記第1基板と前記第2基板とを接続する接続部とを備え、前記第1基板は、前記第2基板が有する回路を制御する制御部を有し、前記第2基板は、スイッチと、前記制御部の制御に基づいて前記スイッチを制御するスイッチ制御部と、を有し、前記スイッチは、前記スイッチ制御部が出力する切替信号に基づいて状態が切り替わるスイッチであり、前記スイッチ制御部は、前記スイッチを切り替えさせるために前記制御部が出力したスイッチ切替命令に対応する前記切替信号を出力する第1出力ポートと、前記切替信号が入力される入力ポートと、前記入力ポートに前記切替信号が入力されたことに応じて、前記制御部に対する割込み信号を出力する第2出力ポートと、を有する。 An electronic device according to an aspect of the present invention includes a first substrate, a second substrate, and a connection portion that connects the first substrate and the second substrate, wherein the first substrate is connected to the second substrate. the second substrate includes a switch and a switch control unit that controls the switch based on the control of the control unit; the switch controls the switch control unit a switch whose state is switched based on a switching signal output by the first output port for outputting the switching signal corresponding to the switch switching command output by the control unit for switching the switch. and an input port to which the switching signal is input, and a second output port for outputting an interrupt signal to the control unit in response to input of the switching signal to the input port.

前記制御部は、前記割込み信号を取得した場合、前記スイッチが切り替わった状態を確認するためのスイッチ確認命令を前記スイッチ制御部に出力し、前記スイッチ制御部は、前記スイッチ確認命令を取得した場合、前記入力ポートに入力された前記切替信号が示すレベルに対応するデータを前記制御部に出力してもよい。 When the interrupt signal is obtained, the control unit outputs a switch confirmation command for confirming a switched state of the switch to the switch control unit, and the switch control unit receives the switch confirmation command. , data corresponding to a level indicated by the switching signal input to the input port may be output to the control unit.

前記制御部は、前記スイッチ切替命令に対応する前記切替信号が示すレベルと、前記スイッチ確認命令を出力したことにより取得した前記切替信号が示すレベルとが異なる場合、前記スイッチ切替命令を再送信してもよい。 When the level indicated by the switching signal corresponding to the switch switching command is different from the level indicated by the switching signal obtained by outputting the switch confirmation command, the control unit retransmits the switch switching command. may

本発明によれば、スイッチを切り替える制御をした後にスイッチが切り替わったことを確認できるという効果を奏する。 ADVANTAGE OF THE INVENTION According to this invention, it is effective in being able to confirm that the switch was switched after performing control which switches a switch.

本実施形態に係る電子機器100の構成を示す図である。It is a figure which shows the structure of the electronic device 100 which concerns on this embodiment. 制御回路13がスイッチ22の切り替わりの状態を確認する動作を説明するための図である。4 is a diagram for explaining the operation of checking the switching state of the switch 22 by the control circuit 13. FIG. 制御回路13における動作の流れを示すフローチャートである。4 is a flowchart showing the flow of operations in the control circuit 13; 変形例に係る電子機器100の構成を示す図である。It is a figure which shows the structure of the electronic device 100 which concerns on a modification.

[電子機器100の構成]
図1は、本実施形態に係る電子機器100の構成を示す図である。電子機器100は、例えば切替装置であり、受け付けた入力信号を出力するか否かを切り替えるスイッチング機能を有する。電子機器100は、第1基板10と、第2基板20と、接続部30とを備える。第1基板10は、第2基板20が有する回路を制御する制御部を有する基板である。第1基板10は、I2C(Inter-Integrated Circuit)ドライバ11と、IO(Input Output)レジスタ12と、制御回路13とを有する。
[Configuration of electronic device 100]
FIG. 1 is a diagram showing the configuration of an electronic device 100 according to this embodiment. Electronic device 100 is, for example, a switching device, and has a switching function of switching whether to output a received input signal. The electronic device 100 includes a first substrate 10 , a second substrate 20 and a connection section 30 . The first substrate 10 is a substrate having a control section that controls the circuits of the second substrate 20 . The first board 10 has an I2C (Inter-Integrated Circuit) driver 11 , an IO (Input Output) register 12 and a control circuit 13 .

第2基板20は、I2Cドライバ21と、スイッチ22と、IO(Input Output)エキスパンダ23とを有する。接続部30は、例えばフレキシブルケーブルであり、第1基板10と第2基板20とを接続する。第1基板10と第2基板20との通信は、例えばI2Cバス等のシリアル通信又は割込み信号等の信号が用いられる。 The second board 20 has an I2C driver 21 , a switch 22 and an IO (Input Output) expander 23 . The connection part 30 is, for example, a flexible cable, and connects the first substrate 10 and the second substrate 20 . For communication between the first substrate 10 and the second substrate 20, for example, serial communication such as an I2C bus or signals such as interrupt signals are used.

I2Cドライバ11は、I2Cインターフェースを介してデータを送受信するためのI2Cコントローラを有しており、接続部30を介して第2基板20とデータを送受信する。I2Cドライバ11は、制御回路13が出力したデータを第2基板20に送信し、第2基板20が出力したデータを制御回路13に入力する。 The I2C driver 11 has an I2C controller for transmitting/receiving data via the I2C interface, and transmits/receives data to/from the second board 20 via the connection section 30 . The I2C driver 11 transmits data output from the control circuit 13 to the second board 20 and inputs data output from the second board 20 to the control circuit 13 .

IOレジスタ12は、記憶回路を有する。IOレジスタ12は、制御回路13の制御に基づいて、制御回路13が生成したデータ又は制御回路13が取得したデータを記憶する。IOレジスタ12は、例えば制御回路13が第2基板20に送信したデータ又は制御回路13が第2基板20から取得したデータの少なくともいずれかのデータを記憶する。 The IO register 12 has a storage circuit. The IO register 12 stores data generated by the control circuit 13 or data acquired by the control circuit 13 under the control of the control circuit 13 . The IO register 12 stores at least one of data transmitted from the control circuit 13 to the second board 20 and data acquired from the second board 20 by the control circuit 13, for example.

制御回路13は、例えばCPU(Central Processing Unit)を含む回路であり、CPUがプログラムを実行することで、第2基板20が有する回路を制御する。制御回路13は、スイッチ22を切り替えさせるための制御部として機能する。制御回路13は、スイッチ22の状態を切り替えさせるためのスイッチ切替命令を、I2Cドライバ11、I2Cバス、I2Cドライバ21を介して、スイッチ制御部として機能するIOエキスパンダ23に出力する。 The control circuit 13 is a circuit including, for example, a CPU (Central Processing Unit), and the CPU executes a program to control the circuits of the second substrate 20 . The control circuit 13 functions as a control section for switching the switch 22 . The control circuit 13 outputs a switch switching command for switching the state of the switch 22 via the I2C driver 11, the I2C bus, and the I2C driver 21 to the IO expander 23 functioning as a switch control unit.

制御回路13は、IOエキスパンダ23が出力した割込み信号を取得するための端子gを備える。割込み信号は、例えばIOエキスパンダ23が発生させた信号であり、端子gに入力される。制御回路13は、割込み信号を取得した場合、スイッチ22が切り替わった状態を確認するためのスイッチ確認命令を、I2Cドライバ11、I2Cバス、I2Cドライバ21を介して、IOエキスパンダ23に出力してもよい。制御回路13は、スイッチ確認命令をIOエキスパンダ23に出力することにより、IOエキスパンダ23がスイッチ22の状態を制御するために出力する切替信号のレベルを示す切替値を取得する。 The control circuit 13 has a terminal g for acquiring an interrupt signal output by the IO expander 23 . The interrupt signal is a signal generated by the IO expander 23, for example, and is input to the terminal g. When the control circuit 13 acquires the interrupt signal, the control circuit 13 outputs a switch confirmation command for confirming the switched state of the switch 22 to the IO expander 23 via the I2C driver 11, the I2C bus, and the I2C driver 21. good too. The control circuit 13 outputs a switch confirmation command to the IO expander 23 to obtain a switching value indicating the level of the switching signal output by the IO expander 23 to control the state of the switch 22 .

このように、制御回路13は、IOエキスパンダ23が発生させた割込み信号を取得したことに基づいて切替値を取得することで、スイッチ22が適切に切り替わったか否かを速やかに確認することができる。 In this way, the control circuit 13 acquires the switching value based on the acquisition of the interrupt signal generated by the IO expander 23, thereby quickly confirming whether or not the switch 22 has been properly switched. can.

制御回路13は、スイッチ切替命令に対応する切替信号が示すレベルと、スイッチ確認命令を出力したことにより取得した切替信号が示すレベルとが異なる場合、スイッチ切替命令を再送信してもよい。制御回路13は、スイッチ切替命令が示す切替信号のレベルと、スイッチ確認命令を出力したことにより取得した切替値が示すレベルとが異なる場合、スイッチ22の切り替わりの状態が適切ではないと判定する。制御回路13は、スイッチ22の状態が適切ではないと判定した場合に、スイッチ切替命令を再送信する。このように、制御回路13がスイッチ22の切り替わりの状態が適切ではないと判定した場合にスイッチ切替命令を再送信することで、スイッチ22が不適切な状態に維持されることを防げる。 If the level indicated by the switching signal corresponding to the switch switching command is different from the level indicated by the switching signal obtained by outputting the switch confirmation command, the control circuit 13 may retransmit the switch switching command. When the level of the switching signal indicated by the switch switching command differs from the level indicated by the switching value obtained by outputting the switch confirmation command, the control circuit 13 determines that the switching state of the switch 22 is not appropriate. When the control circuit 13 determines that the state of the switch 22 is not appropriate, it retransmits the switch switching command. Thus, by retransmitting the switch switching command when the control circuit 13 determines that the switching state of the switch 22 is not appropriate, it is possible to prevent the switch 22 from being maintained in an inappropriate state.

I2Cドライバ21は、I2Cインターフェースを介してデータを送受信するためのI2Cコントローラを有しており、接続部30を介して第1基板10とデータを送受信する。I2Cドライバ21は、例えば第1基板10が出力したデータをIOエキスパンダ23に送信し、IOエキスパンダ23が出力したデータを第1基板10に送信する。 The I2C driver 21 has an I2C controller for transmitting/receiving data via the I2C interface, and transmits/receives data to/from the first board 10 via the connecting section 30 . The I2C driver 21 , for example, transmits data output by the first board 10 to the IO expander 23 and transmits data output by the IO expander 23 to the first board 10 .

スイッチ22は、スイッチ制御部が出力する切替信号に基づいて状態が切り替わるスイッチである。スイッチ22は、IOエキスパンダ23が出力した切替信号が示すレベルに基づいて入力信号を出力するか否かを切り替える。スイッチ22は、入力信号を受け付ける端子aと、受け付けた入力信号を出力する端子bと、終端抵抗に接続された端子cとを有する。スイッチ22は、入力信号を出力する場合、端子aと端子bとを接続し、入力信号を出力しない場合、端子aと端子cとを接続する。 The switch 22 is a switch whose state is switched based on a switching signal output by the switch control section. The switch 22 switches whether to output the input signal based on the level indicated by the switching signal output by the IO expander 23 . The switch 22 has a terminal a for receiving an input signal, a terminal b for outputting the received input signal, and a terminal c connected to a terminating resistor. The switch 22 connects the terminal a and the terminal b when outputting the input signal, and connects the terminal a and the terminal c when not outputting the input signal.

IOエキスパンダ23は、第1基板10が有する制御回路13の制御に基づいてスイッチ22を制御するスイッチ制御部として機能する。IOエキスパンダ23は、第1基板10及び第2基板20が有する複数の回路それぞれと電気信号を送受信する回路である。IOエキスパンダ23は、端子dと、端子eと、端子fとを備える。 The IO expander 23 functions as a switch control section that controls the switch 22 under the control of the control circuit 13 of the first substrate 10 . The IO expander 23 is a circuit that transmits and receives electrical signals to and from each of the multiple circuits that the first substrate 10 and the second substrate 20 have. The IO expander 23 has a terminal d, a terminal e, and a terminal f.

端子dは、制御回路13が出力したスイッチ切替命令に対応する切替信号を出力する第1出力ポートである。端子eは、第1出力ポートである端子dが出力した切替信号が入力される入力ポートである。端子fは、入力ポートである端子eに切替信号が入力されたことに応じて、制御回路13に対する割込み信号を出力する第2出力ポートである。端子fが出力する割込み信号は、接続部30を介して制御回路13が備える端子gに入力される。 A terminal d is a first output port that outputs a switching signal corresponding to the switch switching command output by the control circuit 13 . A terminal e is an input port to which a switching signal output from the terminal d, which is the first output port, is input. A terminal f is a second output port that outputs an interrupt signal to the control circuit 13 in response to input of a switching signal to a terminal e, which is an input port. An interrupt signal output from the terminal f is input to the terminal g of the control circuit 13 via the connection section 30 .

IOエキスパンダ23は、制御回路13が出力したスイッチ切替命令を取得した場合、スイッチ切替命令に対応する切替信号を端子dから出力することで、スイッチ22を切り替える。例えば、IOエキスパンダ23がハイレベルの切替信号を出力した場合、スイッチ22は、端子aと端子bとを接続することで、入力信号を出力する。一方、IOエキスパンダ23がロウレベルの切替信号を出力した場合、スイッチ22は、端子aと端子cとを接続することで、入力信号を出力しない。 When the IO expander 23 acquires the switch switching command output by the control circuit 13 , the IO expander 23 switches the switch 22 by outputting a switching signal corresponding to the switch switching command from the terminal d. For example, when the IO expander 23 outputs a high level switching signal, the switch 22 connects the terminal a and the terminal b to output the input signal. On the other hand, when the IO expander 23 outputs a low level switching signal, the switch 22 connects the terminal a and the terminal c so as not to output the input signal.

IOエキスパンダ23は、端子dから出力した切替信号が端子eに入力されたことに応じて、制御回路13に対する割込み信号を端子fから出力する。IOエキスパンダ23がこのように動作することで、第2基板20は、制御回路13が出力したスイッチ切替命令に対応する切替信号を出力したタイミングを制御回路13に通知できる。その結果、制御回路13は、スイッチ切替命令を出力したことによりスイッチ22が適切に切り替わったか否かを速やかに確認することができる。 The IO expander 23 outputs an interrupt signal to the control circuit 13 from the terminal f in response to the switching signal output from the terminal d being input to the terminal e. By operating the IO expander 23 in this manner, the second board 20 can notify the control circuit 13 of the timing of outputting the switching signal corresponding to the switch switching command output by the control circuit 13 . As a result, the control circuit 13 can quickly confirm whether or not the switch 22 has been properly switched by outputting the switch switching command.

IOエキスパンダ23は、制御回路13が出力したスイッチ確認命令を取得した場合、入力ポートである端子eに入力された切替信号が示すレベルに対応するデータを制御回路13に出力する。このように、IOエキスパンダ23が出力した切替信号が示すレベルを制御回路13に通知することで、制御回路13は、スイッチ22の状態を確認することができる。 When the IO expander 23 acquires the switch confirmation command output by the control circuit 13 , it outputs to the control circuit 13 data corresponding to the level indicated by the switching signal input to the terminal e, which is an input port. By notifying the control circuit 13 of the level indicated by the switching signal output by the IO expander 23 in this manner, the control circuit 13 can confirm the state of the switch 22 .

図2は、制御回路13がスイッチ22の切り替わりの状態を確認する動作を説明するための図である。バス信号は、制御回路13とIOエキスパンダ23とがI2Cバスを用いて送受信する命令又はデータである。切替信号は、IOエキスパンダ23がスイッチ22に出力する電気信号である。割込み信号は、IOエキスパンダ23が制御回路13に出力する電気信号である。 FIG. 2 is a diagram for explaining the operation of checking the switching state of the switch 22 by the control circuit 13. As shown in FIG. A bus signal is an instruction or data transmitted and received between the control circuit 13 and the IO expander 23 using the I2C bus. The switching signal is an electrical signal that the IO expander 23 outputs to the switch 22 . The interrupt signal is an electrical signal that the IO expander 23 outputs to the control circuit 13 .

時刻T1において、制御回路13は、スイッチ22を切り替えさせるためにスイッチ切替命令をIOエキスパンダ23に出力する。時刻T2において、IOエキスパンダ23は、制御回路13が出力したスイッチ切替命令に対応する切替信号を出力する。IOエキスパンダ23は、端子dが出力する切替信号をロウレベルからハイレベルに変化させる。 At time T<b>1 , the control circuit 13 outputs a switch switching command to the IO expander 23 to switch the switch 22 . At time T<b>2 , the IO expander 23 outputs a switching signal corresponding to the switch switching command output by the control circuit 13 . The IO expander 23 changes the switching signal output from the terminal d from low level to high level.

時刻T3において、IOエキスパンダ23は、ロウレベルからハイレベルに変化した切替信号が端子eに入力されたことに応じて、制御回路13に割込み信号を出力する。IOエキスパンダ23は、端子fが出力する割込み信号をハイレベルからロウレベルに変化させる。 At time T3, the IO expander 23 outputs an interrupt signal to the control circuit 13 in response to the input of the switching signal changed from low level to high level to the terminal e. The IO expander 23 changes the interrupt signal output from the terminal f from high level to low level.

時刻T4において、制御回路13は、割込み信号が端子gに入力されたことに応じて、スイッチ22の切り替わりの状態を確認するためにスイッチ確認命令をIOエキスパンダ23に出力する。時刻T5において、IOエキスパンダ23は、端子eに入力された切替信号のレベルを示す切替値を制御回路13に出力するとともに、端子fが出力する割込み信号をロウレベルからハイレベルに変化させる。 At time T4, the control circuit 13 outputs a switch confirmation command to the IO expander 23 to confirm the switching state of the switch 22 in response to the input of the interrupt signal to the terminal g. At time T5, the IO expander 23 outputs a switching value indicating the level of the switching signal input to the terminal e to the control circuit 13, and changes the interrupt signal output from the terminal f from low level to high level.

[制御回路13の動作フローチャート]
図3は、制御回路13における動作の流れを示すフローチャートである。制御回路13は、IOエキスパンダ23にスイッチ切替命令を出力する(S11)。制御回路13は、IOエキスパンダ23が出力する割込み信号を取得した場合(S12のYES)、IOエキスパンダ23にスイッチ確認命令を出力する(S14)。制御回路13は、スイッチ確認命令を出力したことにより、IOエキスパンダ23が出力した切替信号のレベルを示す切替値を取得する(S15)。
[Operation Flowchart of Control Circuit 13]
FIG. 3 is a flow chart showing the flow of operations in the control circuit 13. As shown in FIG. The control circuit 13 outputs a switch switching command to the IO expander 23 (S11). When the control circuit 13 acquires an interrupt signal output by the IO expander 23 (YES in S12), it outputs a switch confirmation command to the IO expander 23 (S14). By outputting the switch confirmation command, the control circuit 13 acquires a switching value indicating the level of the switching signal output by the IO expander 23 (S15).

制御回路13は、出力したスイッチ切替命令に対応する切替信号のレベルと取得した切替値が示すレベルとが異なるか否かを確認する。制御回路13は、切替値が示すレベルとスイッチ切替命令に対応する切替信号のレベルとが同じであることにより切替値が正しいと判定した場合(S16のYES)、スイッチ22の切替が適切であると判定する(S17)。 The control circuit 13 confirms whether or not the level of the switching signal corresponding to the output switch switching command is different from the level indicated by the acquired switching value. When the control circuit 13 determines that the switching value is correct because the level indicated by the switching value and the level of the switching signal corresponding to the switch switching command are the same (YES in S16), switching of the switch 22 is appropriate. (S17).

一方、切替値が示すレベルとスイッチ切替命令に対応する切替信号のレベルとが異なることにより切替値が正しくないと判定した場合(S16のNO)、制御回路13は、スイッチ切替命令の再送回数が所定の回数を超えたか否かを確認する。所定の再送回数は、例えば5回であり、制御回路13が有する記憶部(不図示)に記憶されている。所定の再送回数を超えている場合(S18のYES)、制御回路13は、スイッチ22の切替が適切でないと判定する(S19)。所定の再送回数を超えていない場合(S18のNO)、制御回路13は、再送信するためにスイッチ切替命令を出力する(S11)。 On the other hand, if it is determined that the switching value is incorrect because the level indicated by the switching value differs from the level of the switching signal corresponding to the switch switching command (NO in S16), the control circuit 13 retransmits the switch switching command. Check whether or not the specified number of times has been exceeded. The predetermined number of retransmissions is, for example, five times, and is stored in a storage section (not shown) of the control circuit 13 . If the predetermined number of retransmissions has been exceeded (YES in S18), the control circuit 13 determines that switching of the switch 22 is inappropriate (S19). If the predetermined number of retransmissions has not been exceeded (NO in S18), the control circuit 13 outputs a switch switching command for retransmission (S11).

制御回路13は、IOエキスパンダ23が出力する割込み信号を取得していない場合(S12のNO)、スイッチ切替命令を出力した時刻から所定の時間を経過しているか否かを確認する(S13)。所定の時間は、例えば制御回路13がスイッチ切替命令を出力してからIOエキスパンダ23が切替信号を出力するまでに必要な時間であり、接続部30を介することにより発生するデータの伝送時間とIOエキスパンダ23が切替信号を出力するための時間とを含む。 If the control circuit 13 does not acquire the interrupt signal output by the IO expander 23 (NO in S12), it checks whether a predetermined time has passed since the switch switching command was output (S13). . The predetermined time is, for example, the time required from when the control circuit 13 outputs a switch switching command to when the IO expander 23 outputs a switching signal, and is the data transmission time generated through the connection unit 30. and the time for the IO expander 23 to output the switching signal.

制御回路13がスイッチ切替命令を出力した時刻から所定の時間を経過した場合(S13のYES)、制御回路13は、スイッチ切替命令の再送回数が所定の再送回数を超えたか否かを確認する。再送回数が所定の回数を超えた場合(S18のYES)、制御回路13は、スイッチ22の切替が適切でないと判定する(S19)。一方、再送回数が所定の回数を超えていない場合(S18のNO)、制御回路13は、再送信するためにスイッチ切替命令を出力する(S11)。 If a predetermined time has passed since the control circuit 13 output the switch switching command (YES in S13), the control circuit 13 checks whether the number of retransmissions of the switch switching command has exceeded a predetermined number of retransmissions. If the number of retransmissions exceeds the predetermined number (YES in S18), the control circuit 13 determines that switching of the switch 22 is inappropriate (S19). On the other hand, if the number of retransmissions does not exceed the predetermined number (NO in S18), the control circuit 13 outputs a switch switching command for retransmission (S11).

[変形例]
以上の説明においては、制御回路13が、スイッチ切替命令を出力することによりスイッチ22を切り替えさせた。これに対して、制御回路13は、接続部30を介して電気信号である切替制御信号を出力することによりスイッチ22を切り替えさせてもよい。図4は、変形例に係る電子機器100の構成を示す図である。図4に示す電子機器100は、SW(Switch)切替回路24を有する点で図1に示す電子機器100と異なり、他の点において同じである。
[Modification]
In the above description, the control circuit 13 switches the switch 22 by outputting the switch switching command. On the other hand, the control circuit 13 may switch the switch 22 by outputting a switching control signal, which is an electrical signal, via the connection section 30 . FIG. 4 is a diagram showing a configuration of electronic device 100 according to a modification. The electronic device 100 shown in FIG. 4 is different from the electronic device 100 shown in FIG. 1 in that it has a SW (Switch) switching circuit 24, but is the same in other respects.

SW切替回路24は、例えばトグルフリップフロップを有する回路である。SW切替回路24は、端子jと端子kとを備えており、端子jに入力された信号が示すレベルの変化に対応して端子kに出力させる切替信号が示すレベルを変化させる。端子jに入力された信号は、制御回路13が備える端子hが出力した切替制御信号である。 The SW switching circuit 24 is, for example, a circuit having a toggle flip-flop. The SW switching circuit 24 has a terminal j and a terminal k, and changes the level indicated by the switching signal to be output to the terminal k in accordance with the change in the level indicated by the signal input to the terminal j. The signal input to the terminal j is the switching control signal output from the terminal h of the control circuit 13 .

SW切替回路24は、例えば端子jに入力された切替制御信号がロウレベルからハイレベル又はハイレベルからロウレベルに変化したことに対応して、端子kに出力させる切替信号のレベルをロウレベルからハイレベルに変化させる。スイッチ22は、端子kが出力した切替信号に基づいてスイッチの状態を切り替える。このように動作することで、制御回路13は、スイッチ切替命令を出力するよりも短い時間でスイッチ22の状態を切り替えさせることができる。 The SW switching circuit 24 changes the level of the switching signal to be output to the terminal k from low level to high level in response to the change of the switching control signal input to the terminal j from low level to high level or from high level to low level. change. The switch 22 switches the state of the switch based on the switching signal output from the terminal k. By operating in this manner, the control circuit 13 can switch the state of the switch 22 in a shorter time than it takes to output the switch switching command.

[電子機器100による効果]
以上説明したように、電子機器100は、第1基板10と第2基板20とを備える。第1基板10は、スイッチ22を切り替えさせるためにスイッチ切替命令を出力する制御回路13を有する。第2基板20は、スイッチ22とスイッチ22を切り替える切替信号を出力するIOエキスパンダ23とを有する。
[Effect of electronic device 100]
As described above, electronic device 100 includes first substrate 10 and second substrate 20 . The first substrate 10 has a control circuit 13 that outputs a switch switching command to switch the switch 22 . The second substrate 20 has a switch 22 and an IO expander 23 that outputs a switching signal for switching the switch 22 .

そして、IOエキスパンダ23が、入力ポートに切替信号が入力されたことに応じて、制御回路13に割込み信号を出力することで、制御回路13は、IOエキスパンダ23がスイッチ22の状態を切り替えたタイミングを取得することができる。その結果、制御回路13は、スイッチ22が適切に切り替わったか否かを速やかに確認することができるため、電子機器100が誤って動作することを抑制できる。 Then, the IO expander 23 outputs an interrupt signal to the control circuit 13 in response to the switching signal being input to the input port. timing can be obtained. As a result, the control circuit 13 can quickly confirm whether or not the switch 22 has been properly switched, so that it is possible to prevent the electronic device 100 from operating erroneously.

以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されず、その要旨の範囲内で種々の変形及び変更が可能である。例えば、装置の全部又は一部は、任意の単位で機能的又は物理的に分散・統合して構成することができる。また、複数の実施の形態の任意の組み合わせによって生じる新たな実施の形態も、本発明の実施の形態に含まれる。組み合わせによって生じる新たな実施の形態の効果は、もとの実施の形態の効果を併せ持つ。 Although the present invention has been described above using the embodiments, the technical scope of the present invention is not limited to the scope described in the above embodiments, and various modifications and changes are possible within the scope of the gist thereof. be. For example, all or part of the device can be functionally or physically distributed and integrated in arbitrary units. In addition, new embodiments resulting from arbitrary combinations of multiple embodiments are also included in the embodiments of the present invention. The effect of the new embodiment caused by the combination has the effect of the original embodiment.

10 第1基板
11 I2Cドライバ
12 IOレジスタ
13 制御回路
20 第2基板
21 I2Cドライバ
22 スイッチ
23 IOエキスパンダ
24 SW切替回路
30 接続部
100 電子機器
10 First substrate 11 I2C driver 12 IO register 13 Control circuit 20 Second substrate 21 I2C driver 22 Switch 23 IO expander 24 SW switching circuit 30 Connection part 100 Electronic equipment

Claims (3)

第1基板と、第2基板と、前記第1基板と前記第2基板とを接続する接続部とを備え、
前記第1基板は、前記第2基板が有する回路を制御する制御部を有し、
前記第2基板は、スイッチと、前記制御部の制御に基づいて前記スイッチを制御するスイッチ制御部と、を有し、
前記スイッチは、前記スイッチ制御部が出力する切替信号に基づいて状態が切り替わるスイッチであり、
前記スイッチ制御部は、
前記スイッチを切り替えさせるために前記制御部が出力したスイッチ切替命令に対応する前記切替信号を出力する第1出力ポートと、
前記切替信号が入力される入力ポートと、
前記入力ポートに前記切替信号が入力されたことに応じて、前記制御部に対する割込み信号を出力する第2出力ポートと、
を有する、
電子機器。
A first substrate, a second substrate, and a connection portion that connects the first substrate and the second substrate,
The first substrate has a control unit that controls the circuit of the second substrate,
the second substrate includes a switch and a switch control section that controls the switch based on the control of the control section;
the switch is a switch whose state is switched based on a switching signal output by the switch control unit;
The switch control unit
a first output port for outputting the switching signal corresponding to the switch switching command output by the control unit to switch the switch;
an input port to which the switching signal is input;
a second output port that outputs an interrupt signal to the control unit in response to the switching signal being input to the input port;
has a
Electronics.
前記制御部は、前記割込み信号を取得した場合、前記スイッチが切り替わった状態を確認するためのスイッチ確認命令を前記スイッチ制御部に出力し、
前記スイッチ制御部は、前記スイッチ確認命令を取得した場合、前記入力ポートに入力された前記切替信号が示すレベルに対応するデータを前記制御部に出力する、
請求項1に記載の電子機器。
The control unit, when acquiring the interrupt signal, outputs a switch confirmation command for confirming a switched state of the switch to the switch control unit,
When the switch confirmation command is acquired, the switch control unit outputs data corresponding to the level indicated by the switching signal input to the input port to the control unit.
The electronic device according to claim 1.
前記制御部は、前記スイッチ切替命令に対応する前記切替信号が示すレベルと、前記スイッチ確認命令を出力したことにより取得した前記切替信号が示すレベルとが異なる場合、前記スイッチ切替命令を再送信する、
請求項2に記載の電子機器。
The control unit retransmits the switch switching command when the level indicated by the switching signal corresponding to the switch switching command is different from the level indicated by the switching signal obtained by outputting the switch confirmation command. ,
The electronic device according to claim 2.
JP2021016438A 2021-02-04 2021-02-04 Electronic instrument Pending JP2022119366A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021016438A JP2022119366A (en) 2021-02-04 2021-02-04 Electronic instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021016438A JP2022119366A (en) 2021-02-04 2021-02-04 Electronic instrument

Publications (1)

Publication Number Publication Date
JP2022119366A true JP2022119366A (en) 2022-08-17

Family

ID=82848408

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021016438A Pending JP2022119366A (en) 2021-02-04 2021-02-04 Electronic instrument

Country Status (1)

Country Link
JP (1) JP2022119366A (en)

Similar Documents

Publication Publication Date Title
JP5332428B2 (en) Level shift circuit and method thereof
JP2022119366A (en) Electronic instrument
US7546518B2 (en) Received data compensating device
JP4531884B2 (en) Address, instruction and / or data telegraph device and address, instruction and / or data telegraph method
KR100388993B1 (en) Printing paper loading device and a printing apparatus having the same, and a method for setting ID of plural paper loading devices
JP2983319B2 (en) Communication device
US6192437B1 (en) Transmission apparatus with control circuit/relay within each card providing connection to related card output depending on related slot ID/ redundancy/non-redundancy, working/protection signals
JP7086027B2 (en) Bidirectional serial bus switch
JPH06242864A (en) Connecting system
JPS6116978B2 (en)
JP4469106B2 (en) CPU abnormality monitoring device
JP3200829B2 (en) Control device
KR0167646B1 (en) Cpu selecting device
JP2671829B2 (en) Clock switching circuit
JP4965153B2 (en) Semiconductor integrated circuit, electronic device using the same, and method for controlling semiconductor integrated circuit
CN115080483A (en) USB signal repeater configuration device and configuration test method
JPH06167362A (en) Master-slave switching type measuring instrument
JPH11289051A (en) Programmable controller and processor
JP2009146246A (en) Bus system and antireflection method
KR20030052474A (en) A method and a device of termination for common bus
JPH08191319A (en) Data communication system
JP2019040336A (en) Bus connection device and bus connection method
JPH0591147A (en) Terminal equipment
KR19980043769U (en) Television receiver with microprocessor control error signal correction
JP2001100872A (en) Live wire insertion/extraction protecting circuit for package

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230818

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20231012