electronic machines
The electronic device confirms switch state changes using an I2C driver and control circuit to ensure appropriate switching, preventing erroneous operations by retransmitting commands if necessary.
Patent Information
- Application Number
- JP2021016438
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-04
- Publication Date
- 2024-08-22
- Estimated Expiration
- 2041-02-04
AI Technical Summary
Conventional switches do not allow confirmation of the state change after outputting a port output signal, leading to potential erroneous operation of devices equipped with these switches.
An electronic device with a first and second substrate connected by a flexible cable, utilizing an I2C driver, IO register, and control circuit to confirm the switched state of a switch through an interrupt signal and switch confirmation command, retransmitting the command if the switch state is inappropriate.
Enables quick confirmation of switch state changes, preventing erroneous operation by ensuring appropriate switching states are maintained.
Smart Images

Figure 0007538735000004 
Figure 0007538735000003 
Figure 0007538735000001
Abstract
Description
[Technical field]
[0001] The present invention relates to electronic devices. [Background technology]
[0002] Conventionally, switches that switch between cutting off the output of an electrical signal or the supply of power are known. Patent Document 1 discloses an input device that switches between supplying and cutting off power based on a port output signal. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2011-221659 A Summary of the Invention [Problem to be solved by the invention]
[0004] When switching a switch using conventional technology, it is not possible to confirm that the switch state has been switched after outputting a port output signal, which causes a problem that a device equipped with the switch may operate erroneously if the switch state is not switched appropriately.
[0005] The present invention has been made in consideration of these points, and aims to enable a device that controls a switch to confirm that the switch has been switched after controlling the switching of the switch. [Means for solving the problem]
[0006] An electronic device according to an aspect of the present invention comprises a first substrate, a second substrate, and a connection portion connecting the first substrate and the second substrate, wherein the first substrate has a control portion controlling a circuit of the second substrate, and the second substrate has a switch and a switch control portion controlling the switch based on control of the control portion, wherein the switch is a switch whose state is changed based on a switching signal output by the switch control portion, and the switch control portion has a first output port which outputs the switching signal corresponding to a switch switching command output by the control portion to switch the switch, an input port to which the switching signal is input, and a second output port which outputs an interrupt signal to the control portion in response to the switching signal being input to the input port.
[0007] When the control unit acquires the interrupt signal, it may output a switch confirmation command to the switch control unit to confirm the switched state of the switch, and when the switch control unit acquires the switch confirmation command, it may output data to the control unit corresponding to the level indicated by the switching signal input to the input port.
[0008] The control unit may retransmit the switch switching command when a level indicated by the switching signal corresponding to the switch switching command differs from a level indicated by the switching signal obtained by outputting the switch confirmation command. Effect of the Invention
[0009] According to the present invention, it is possible to confirm that the switch has been switched after control for switching the switch has been performed. [Brief description of the drawings]
[0010] [Figure 1] 1 is a diagram showing a configuration of an electronic device 100 according to the present embodiment. [Diagram 2] 11 is a diagram for explaining an operation in which the control circuit 13 checks the switching state of the switch 22. FIG. [Diagram 3]4 is a flowchart showing the flow of operations in the control circuit 13. [Figure 4] FIG. 13 is a diagram showing a configuration of an electronic device 100 according to a modified example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] [Configuration of electronic device 100] 1 is a diagram showing a configuration of an electronic device 100 according to this embodiment. The electronic device 100 is, for example, a switching device, and has a switching function for switching whether or not to output a received input signal. The electronic device 100 includes a first substrate 10, a second substrate 20, and a connection unit 30. The first substrate 10 is a substrate having a control unit that controls the circuitry of the second substrate 20. The first substrate 10 includes an I2C (Inter-Integrated Circuit) driver 11, an IO (Input Output) register 12, and a control circuit 13.
[0012] The second substrate 20 has an I2C driver 21, a switch 22, and an IO (Input Output) expander 23. The connection unit 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 a signal such as an interrupt signal is used.
[0013] The I2C driver 11 has an I2C controller for transmitting and receiving data via an I2C interface, and transmits and receives data to and from the second board 20 via the connection unit 30. The I2C driver 11 transmits data output by the control circuit 13 to the second board 20, and inputs data output by the second board 20 to the control circuit 13.
[0014] 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 by the control circuit 13 to the second substrate 20 or data acquired by the control circuit 13 from the second substrate 20, for example.
[0015] The control circuit 13 is a circuit including, for example, a CPU (Central Processing Unit), and the CPU executes a program to control the circuitry of the second substrate 20. The control circuit 13 functions as a control unit for switching the switch 22. The control circuit 13 outputs a switch switching command for switching the state of the switch 22 to the IO expander 23 functioning as a switch control unit via the I2C driver 11, the I2C bus, and the I2C driver 21.
[0016] The control circuit 13 includes a terminal g for acquiring an interrupt signal output by the IO expander 23. The interrupt signal is, for example, a signal generated by the IO expander 23, and is input to the terminal g. When the control circuit 13 acquires the interrupt signal, the control circuit 13 may output 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. The control circuit 13 outputs the switch confirmation command to the IO expander 23, thereby acquiring a switching value indicating the level of a switching signal output by the IO expander 23 to control the state of the switch 22.
[0017] In this way, the control circuit 13 obtains the switching value based on the receipt of the interrupt signal generated by the IO expander 23, and thereby can quickly confirm whether the switch 22 has been appropriately switched.
[0018] The control circuit 13 may retransmit the switch command when the level indicated by the switching signal corresponding to the switch command differs from the level indicated by the switching signal acquired by outputting the switch confirmation command. The control circuit 13 determines that the switching state of the switch 22 is inappropriate when the level indicated by the switching signal indicated by the switch command differs from the level indicated by the switching value acquired by outputting the switch confirmation command. The control circuit 13 retransmits the switch command when it determines that the state of the switch 22 is inappropriate. In this way, by retransmitting the switch command when the control circuit 13 determines that the switching state of the switch 22 is inappropriate, it is possible to prevent the switch 22 from being maintained in an inappropriate state.
[0019] The I2C driver 21 has an I2C controller for transmitting and receiving data via an I2C interface, and transmits and receives data to and from the first board 10 via the connection unit 30. The I2C driver 21 transmits, for example, 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.
[0020] The switch 22 is a switch whose state is switched based on a switching signal output by the switch control unit. The switch 22 switches whether to output an input signal based on the level indicated by the switching signal output by the IO expander 23. The switch 22 has a terminal a that receives an input signal, a terminal b that outputs the received input signal, and a terminal c that is connected to a termination resistor. When the switch 22 outputs an input signal, the switch 22 connects the terminal a and the terminal b, and when the switch 22 does not output an input signal, the switch 22 connects the terminal a and the terminal c.
[0021] The IO expander 23 functions as a switch control unit that controls the switch 22 based on the control of the control circuit 13 included in 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 included in the first substrate 10 and the second substrate 20. The IO expander 23 includes a terminal d, a terminal e, and a terminal f.
[0022] The terminal d is a first output port that outputs a switching signal corresponding to a switch switching command output by the control circuit 13. The terminal e is an input port to which the switching signal output by the terminal d, which is the first output port, is input. The terminal f is a second output port that outputs an interrupt signal to the control circuit 13 in response to the switching signal being input to the terminal e, which is the input port. The interrupt signal output by the terminal f is input to the terminal g of the control circuit 13 via the connection unit 30.
[0023] When the IO expander 23 acquires a switch changeover command output by the control circuit 13, it outputs a changeover signal corresponding to the switch changeover command from the terminal d, thereby switching the switch 22. For example, when the IO expander 23 outputs a high-level changeover signal, the switch 22 outputs an input signal by connecting the terminal a and the terminal b. On the other hand, when the IO expander 23 outputs a low-level changeover signal, the switch 22 does not output an input signal by connecting the terminal a and the terminal c.
[0024] The IO expander 23 outputs an interrupt signal to the control circuit 13 from a terminal f in response to the switching signal output from the terminal d being input to the terminal e. By the IO expander 23 operating in this manner, the second board 20 can notify the control circuit 13 of the timing at which the second board 20 output a switching signal corresponding to the switch switching command output by the control circuit 13. As a result, the control circuit 13 can quickly check whether the switch 22 has been appropriately switched by outputting the switch switching command.
[0025] When the IO expander 23 acquires the switch confirmation command output by the control circuit 13, the IO expander 23 outputs data corresponding to the level indicated by the switching signal input to the terminal e, which is an input port, to the control circuit 13. In this way, by notifying the control circuit 13 of the level indicated by the switching signal output by the IO expander 23, the control circuit 13 can confirm the state of the switch 22.
[0026] 2 is a diagram for explaining an operation of the control circuit 13 to check the switching state of the switch 22. The bus signal is a command or data transmitted and received between the control circuit 13 and the IO expander 23 using the I2C bus. The switching signal is an electric signal output by the IO expander 23 to the switch 22. The interrupt signal is an electric signal output by the IO expander 23 to the control circuit 13.
[0027] At time T1, the control circuit 13 outputs a switch changeover command to the IO expander 23 to change over the switch 22. At time T2, the IO expander 23 outputs a changeover signal corresponding to the switch changeover command output by the control circuit 13. The IO expander 23 changes the changeover signal output by the terminal d from a low level to a high level.
[0028] At time T3, in response to the switching signal that has changed from a low level to a high level being input to the terminal e, the IO expander 23 outputs an interrupt signal to the control circuit 13. The IO expander 23 changes the interrupt signal output by the terminal f from a high level to a low level.
[0029] At time T4, in response to the interrupt signal being input to the terminal g, the control circuit 13 outputs a switch confirmation command to the IO expander 23 to confirm the switching state of the switch 22. 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 by the terminal f from a low level to a high level.
[0030] [Operation flow chart of control circuit 13] 3 is a flowchart showing the flow of operations in the control circuit 13. The control circuit 13 outputs a switch changeover 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), the control circuit 13 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).
[0031] The control circuit 13 checks whether the level of the switching signal corresponding to the output switch command is different from the level indicated by the acquired switching value. If the control circuit 13 determines that the switching value is correct because the level indicated by the switching value is the same as the level of the switching signal corresponding to the switch command (YES in S16), it determines that the switching of the switch 22 is appropriate (S17).
[0032] On the other hand, when it is determined that the switching value is incorrect because the level indicated by the switching value is different from the level of the switching signal corresponding to the switch switching command (NO in S16), the control circuit 13 checks whether the number of retransmissions of the switch switching command has exceeded a predetermined number. The predetermined number of retransmissions is, for example, five times, and is stored in a storage unit (not shown) of the control circuit 13. When the predetermined number of retransmissions has been exceeded (YES in S18), the control circuit 13 determines that the switching of the switch 22 is not appropriate (S19). When the predetermined number of retransmissions has not been exceeded (NO in S18), the control circuit 13 outputs the switch switching command for retransmission (S11).
[0033] When the control circuit 13 has not acquired the interrupt signal output by the IO expander 23 (NO in S12), it checks whether a predetermined time has elapsed since the time when the switch changeover command was output (S13). The predetermined time is, for example, the time required from when the control circuit 13 outputs the switch changeover command until the IO expander 23 outputs the changeover signal, and includes the transmission time of data generated by passing through the connection unit 30 and the time for the IO expander 23 to output the changeover signal.
[0034] When a predetermined time has elapsed since the control circuit 13 outputted the switch changeover command (YES in S13), the control circuit 13 checks whether the number of retransmissions of the switch changeover command has exceeded a predetermined number of times. When the number of retransmissions has exceeded the predetermined number of times (YES in S18), the control circuit 13 determines that the switching of the switch 22 is not appropriate (S19). On the other hand, when the number of retransmissions has not exceeded the predetermined number of times (NO in S18), the control circuit 13 outputs the switch changeover command for retransmission (S11).
[0035] [Variations] In the above description, the control circuit 13 switches the switch 22 by outputting a switch switching command. Alternatively, the control circuit 13 may switch the switch 22 by outputting a switching control signal, which is an electric signal, via the connection unit 30. Fig. 4 is a diagram showing a configuration of an electronic device 100 according to a modified example. The electronic device 100 shown in Fig. 4 differs 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.
[0036] The SW switching circuit 24 is a circuit having, for example, 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 output from the terminal k in response to a 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.
[0037] For example, in response to a change in the switching control signal input to the terminal j from low level to high level or from high level to low level, the SW switching circuit 24 changes the level of the switching signal output to the terminal k from low level to high level. The switch 22 switches the switch state 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 a switch switching command.
[0038] [Effects of 100 electronic devices] As described above, the electronic device 100 includes the first substrate 10 and the 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 the switch 22 and an IO expander 23 that outputs a switching signal to switch the switch 22.
[0039] Then, the IO expander 23 outputs an interrupt signal to the control circuit 13 in response to a switching signal being input to the input port, so that the control circuit 13 can obtain the timing at which the IO expander 23 switches the state of the switch 22. As a result, the control circuit 13 can quickly check whether the switch 22 has been appropriately switched, and therefore, the electronic device 100 can be prevented from operating erroneously.
[0040] 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 of the present invention. For example, all or part of the device can be configured by distributing or integrating functionally or physically in any unit. In addition, new embodiments resulting from any combination of multiple embodiments are also included in the embodiments of the present invention. The effect of the new embodiment resulting from the combination combines the effect of the original embodiment. [Explanation of symbols]
[0041] 10 First board 11 I2C Driver 12 IO Registers 13 Control circuit 20 Second board 21 I2C Driver 22 Switch 23 IO Expander 24 SW switching circuit 30 Connection 100 Electronic equipment
Claims
1. 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 a circuit included in the second substrate, The second substrate has a switch and a switch control unit that controls the switch based on control of the control unit, the switch is a switch whose state is changed based on a changeover signal output by the switch control unit, The switch control unit is a first output port that outputs the switching signal corresponding to a 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; having electronic equipment.
2. When the control unit acquires the interrupt signal, the control unit outputs a switch confirmation command to the switch control unit to confirm a state in which the switch has been switched; When the switch control unit acquires the switch confirmation command, the switch control unit outputs data corresponding to a level indicated by the switching signal input to the input port to the control unit.
2. The electronic device according to claim 1.
3. When a level indicated by the switching signal corresponding to the switch switching command is different from a level indicated by the switching signal acquired by outputting the switch confirmation command, the control unit retransmits the switch switching command.
3. The electronic device according to claim 2.
Citation Information
Patent Citations
Power source output controller
JP1995064680A
Extension card device for personal computer
JP1997330152A
Input device
JP2011221659A
