Dial switch detection circuit and electronic equipment

Through the combination of power supply control circuit and selection circuit, efficient detection of multiple dial switches is achieved, solving the problem of excessive I/O interface occupation in the prior art, improving detection efficiency and accuracy, and saving hardware resources.

CN223123182UActive Publication Date: 2025-07-18GUANGDONG SHENLING ENVIRONMENT SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421351968.4
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2025-07-18
Estimated Expiration
2034-06-13

AI Technical Summary

Technical Problem

In the prior art, the dial switch detection method requires a large number of I/O interfaces, resulting in a large amount of hardware resources occupancy and making it difficult to efficiently detect multiple dial switches.

Method used

Through the combination of power supply control circuit and selection circuit, selective power supply and signal detection of multiple dial switches are realized, reducing the use of I/O interfaces.

Benefits of technology

It improves the efficiency and accuracy of dial switch detection, reduces the demand for hardware resources, saves development costs, and improves the utilization rate of hardware resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223123182U_ABST
    Figure CN223123182U_ABST
Patent Text Reader

Abstract

The utility model relates to the technical field of signal detection, and discloses a dial switch detection circuit and electronic equipment, and the dial switch detection circuit comprises a power supply control circuit, a first selection circuit, a second selection circuit and a signal detection circuit. A power supply control circuit receives a first selection signal sent by detection equipment and controls a target selection circuit corresponding to the first selection signal to be switched on, so that a power supply supplies power to the target selection circuit; the target selection circuit is a first selection circuit or a second selection circuit; receiving a second selection signal sent by the detection equipment through a target selection circuit, and controlling a target path corresponding to the second selection signal in the target selection circuit to be conducted; the target passage is a first passage or a second passage; and a signal detection circuit detects a switch state signal corresponding to the dial switch in the target path and sends the switch state signal to detection equipment. Therefore, the dial switch detection number can be increased, and hardware resources required by detection can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of signal detection, in particular to a DIP switch detection circuit and an electronic device. Background Art

[0002] Due to the characteristics of simplicity, reliability and ease of use, DIP switches are widely used in various application fields such as industrial control, communication equipment, household appliances, etc. For example, DIP switches can be applied to the main control board of air conditioners. However, in the existing DIP switch detection methods, the switch states of individual DIP switches are usually detected one by one through I / O interfaces. If the number of DIP switches to be detected is too large, a large number of I / O interfaces need to be set up using the current detection method, occupying a large amount of hardware resources.

[0003] Therefore, it is particularly important to propose a technical solution that can reduce the hardware resources required for DIP switch detection while increasing the number of DIP switches to be detected. Summary of the Utility Model

[0004] The utility model provides a DIP switch detection circuit and an electronic device, which can reduce the hardware resources required for DIP switch detection while increasing the number of DIP switches to be detected.

[0005] To solve the above technical problems, in the first aspect, the utility model discloses a DIP switch detection circuit, which includes a power supply control circuit, a first selection circuit, a second selection circuit and a signal detection circuit, wherein:

[0006] The input end of the power supply control circuit is electrically connected to the first output end of the detection device, the first output end of the power supply control circuit is electrically connected to the power supply end of the first selection circuit, and the second output end of the power supply control circuit is electrically connected to the power supply end of the second selection circuit; the input ends of the first selection circuit and the second selection circuit are respectively electrically connected to the second output end of the detection device; the first output end and the second output end of the first selection circuit are respectively electrically connected to the first end of the signal detection circuit; the first output end and the second output end of the second selection circuit are respectively electrically connected to the second end of the signal detection circuit; the output end of the signal detection circuit is electrically connected to the input end of the detection device; the power supply end of the power supply control circuit is used for connecting a power supply; the grounding ends of the power supply control circuit, the first selection circuit, the second selection circuit and the signal detection circuit are respectively used for grounding;

[0007] The power supply control circuit is configured to receive the first selection signal sent by the detection device and control the target selection circuit corresponding to the first selection signal to conduct, so that the power supply powers the target selection circuit; the target selection circuit includes the first selection circuit or the second selection circuit;

[0008] The first selection circuit is configured to, when the first selection circuit conducts, receive the second selection signal sent by the detection device and control the first path corresponding to the second selection signal in the first selection circuit to conduct;

[0009] The second selection circuit is configured to, when the second selection circuit conducts, receive the second selection signal sent by the detection device and control the second path corresponding to the second selection signal in the second selection circuit to conduct;

[0010] The signal detection circuit is configured to detect the switch state signal corresponding to the DIP switch in the target path and send the switch state signal to the detection device; the target path includes the first path or the second path.

[0011] As an optional implementation manner, in the first aspect of the present invention, the power supply control circuit includes a first power supply control module and a second power supply control module, where:

[0012] The input end of the first power supply control module and the input end of the second power supply control module are respectively electrically connected to the first output end of the detection device; the output end of the first power supply control module is electrically connected to the power supply end of the first selection circuit, and the output end of the second power supply control module is electrically connected to the power supply end of the second selection circuit; the power supply ends of the first power supply control module and the second power supply control module are respectively used to connect to the power supply; the grounding end of the second power supply control module is used for grounding.

[0013] As an optional implementation manner, in the first aspect of the present invention, the first power supply control module includes a first switching device Q1 and a first resistor R1, where:

[0014] The first end of the first switching device Q1 is used to connect to the power supply, the second end of the first switching device Q1 is electrically connected to the first end of the first resistor R1, the third end of the first switching device Q1 is electrically connected to the power supply end of the first selection circuit, and the second end of the first resistor R1 is electrically connected to the first output end of the detection device.

[0015] As an optional implementation manner, in the first aspect of the present invention, the second power supply control module includes a second switching device Q2, a third switching device Q3, a second resistor R2, and a third resistor R13, where:

[0016] The first end of the second switching device Q2 is used to connect to the power supply. The second end of the second switching device Q2 is electrically connected to the first end of the third resistor R13. The third end of the second switching device Q2 is electrically connected to the power supply end of the second selection circuit. The second end of the third resistor R13 is electrically connected to the first end of the third switching device Q3. The second end of the third switching device Q3 is electrically connected to the first end of the second resistor R2. The third end of the third switching device Q3 is used to be grounded. The second end of the second resistor R2 is electrically connected to the first output end of the detection device.

[0017] As an alternative implementation manner, in the first aspect of the present utility model, the signal detection circuit includes a first detection module and a second detection module, wherein:

[0018] The first end of the first detection module is electrically connected to the first output end of the first selection circuit, and the second end of the first detection module is electrically connected to the second output end of the first selection circuit;

[0019] The first end of the second detection module is electrically connected to the first output end of the second selection circuit, and the second end of the second detection module is electrically connected to the second output end of the second selection circuit;

[0020] The output ends of the first detection module and the second detection module are respectively electrically connected to the input end of the detection device, and the output ends of the first detection module and the second detection module are respectively used to be grounded.

[0021] As an alternative implementation manner, in the first aspect of the present utility model, the first detection module includes a first switching sub-module and a second switching sub-module, and the second detection module includes a third switching sub-module and a fourth switching sub-module, wherein:

[0022] The first end of the first switching sub-module is electrically connected to the first output end of the first selection circuit, and the first end of the second switching sub-module is electrically connected to the second output end of the first selection circuit;

[0023] The first end of the third switching sub-module is electrically connected to the first output end of the second selection circuit, and the first end of the fourth switching sub-module is electrically connected to the second output end of the second selection circuit;

[0024] The second end of each switching sub-module is used to be electrically connected to the input end of the detection device and to be grounded; each of the switching sub-modules is one of the first switching sub-module, the second switching sub-module, the third switching sub-module, and the fourth switching sub-module.

[0025] As an alternative embodiment, in the first aspect of the present utility model, the first detection module further includes a first anti-reverse sub-module corresponding to the first switch sub-module and a second anti-reverse sub-module corresponding to the second switch sub-module; the second detection module further includes a third anti-reverse sub-module corresponding to the third switch sub-module and a fourth anti-reverse sub-module corresponding to the fourth switch sub-module, where:

[0026] The first end of the first anti-reverse sub-module is electrically connected to the first output end of the first selection circuit, the first end of the second anti-reverse sub-module is electrically connected to the second output end of the first selection circuit, the first end of the third anti-reverse sub-module is electrically connected to the first output end of the second selection circuit, and the first end of the fourth anti-reverse sub-module is electrically connected to the second output end of the second selection circuit;

[0027] The second end of each anti-reverse sub-module is electrically connected to the first end of the switch sub-module corresponding to this anti-reverse sub-module, and each of the anti-reverse sub-modules is one of the first anti-reverse sub-module, the second anti-reverse sub-module, the third anti-reverse sub-module, and the fourth anti-reverse sub-module.

[0028] As an alternative embodiment, in the first aspect of the present utility model, each of the switch sub-modules includes a DIP switch group, and each of the DIP switch groups includes at least three DIP switches;

[0029] For each of the switch sub-modules, the first end of each DIP switch in this switch sub-module is electrically connected to the first end of the anti-reverse sub-module corresponding to this DIP switch; the second end of each DIP switch in this switch sub-module is electrically connected to the input end of the detection device.

[0030] As an alternative embodiment, in the first aspect of the present utility model, the number of DIP switch detection circuits is greater than 1, and every two of the DIP switch detection circuits are electrically connected through a power supply selection circuit, where:

[0031] The power supply end of the power supply selection circuit is used to connect to the power supply, the first output end of the power supply selection circuit is used to connect to the power supply end of the power supply control circuit of one of the DIP switch detection circuits, and the second output end of the power supply selection circuit is used to connect to the power supply end of the power supply control circuit of another DIP switch detection circuit; the input end of the power supply selection circuit is electrically connected to the third output end of the detection device.

[0032] The second aspect of the present utility model discloses an electronic device, and the electronic device includes a device body and a DIP switch detection circuit as disclosed in any one of the first aspect.

[0033] Compared with the prior art, the embodiments of the present utility model have the following beneficial effects:

[0034] The DIP switch detection circuit provided by the utility model can receive the first selection signal sent by the detection device through the power supply control circuit and control the conduction of the target selection circuit corresponding to the first selection signal, so that the power supply powers the target selection circuit; the target selection circuit is the first selection circuit or the second selection circuit; then receive the second selection signal sent by the detection device through the target selection circuit and control the conduction of the target path corresponding to the second selection signal in the target selection circuit; the target path is the first path or the second path; then detect the switch state signal corresponding to the DIP switch in the target path through the signal detection circuit and send the switch state signal to the detection device, which can realize the selection of the DIP switch to be detected from multiple circuit branches through the logical judgment of the signal high and low levels, thereby realizing the detection of multiple DIP switches with fewer I / O interfaces, increasing the detection quantity of the DIP switch, and being able to reduce the hardware resources required for detecting the DIP switch while improving the detection efficiency of the DIP switch, which is beneficial to saving the development cost and improving the utilization rate of the hardware resources; and, by selecting the DIP switch to be detected and the switch state signal of the DIP switch through the output / input end of the detection device, it is beneficial to improve the detection accuracy of the DIP switch. Description of the Drawings

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present utility model, the following will briefly introduce the drawings required for use in the description of the embodiments. Obviously, the following drawings are only some embodiments of the present utility model. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 It is a schematic structural diagram of a DIP switch detection circuit disclosed in an embodiment of the present utility model;

[0037] Figure 2 It is a schematic structural diagram of another DIP switch detection circuit disclosed in an embodiment of the present utility model;

[0038] Figure 3 It is a schematic structural diagram of a first detection module disclosed in an embodiment of the present utility model;

[0039] Figure 4 It is a schematic structural diagram of a second detection module disclosed in an embodiment of the present utility model;

[0040] Figure 5 It is a schematic structural diagram of another DIP switch detection circuit disclosed by the present utility model;

[0041] Figure 6 It is a schematic structural diagram of another DIP switch detection circuit disclosed by the present utility model;

[0042] Figure 7 It is a schematic structural diagram of an electronic device disclosed in an embodiment of the present utility model. Specific embodiments

[0043] In order to enable those skilled in the art to better understand the solution of the present utility model, the technical solutions in the embodiments of the present utility model will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present utility model. Obviously, the described embodiments are only a part of the embodiments of the present utility model, rather than all the embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present utility model.

[0044] It should be noted that, unless otherwise clearly defined and limited, the term "electrically connected" in the description and claims of the present utility model and the above-mentioned drawings should be understood in a broad sense. For example, it may be a fixed electrical connection, a detachable electrical connection, or an integral electrical connection; it may be a mechanical electrical connection, an electrical electrical connection or a communication with each other; it may be directly connected, or indirectly connected through an intermediate medium, and it may be the connection inside two elements or the interaction relationship between two elements. In addition, the terms "first", "second", etc. in the description and claims of the present utility model and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. The terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For those of ordinary skill in the art, the specific meanings of the above terms in the present utility model can be understood according to specific circumstances.

[0045] Embodiment 1

[0046] Please refer to Figure 1 , Figure 1 It is a schematic structural diagram of a DIP switch detection circuit disclosed in an embodiment of the present utility model. Among them, this circuit can be applied to an electronic device provided with a plurality of DIP switches. Exemplarily, this electronic device can be a controller, and the embodiments of the present utility model do not make limitations. As Figure 1 shown, the DIP switch detection circuit 10 may include a power supply control circuit 101, a first selection circuit 102, a second selection circuit 103, and a signal detection circuit 104, where:

[0047] The input end of the power supply control circuit 101 is electrically connected to the first output end of the detection device. The first output end of the power supply control circuit 101 is electrically connected to the power supply end of the first selection circuit 102. The second output end of the power supply control circuit 101 is electrically connected to the power supply end of the second selection circuit 103. The input ends of the first selection circuit 102 and the second selection circuit 103 are respectively electrically connected to the second output end of the detection device. The first output end and the second output end of the first selection circuit 102 are respectively electrically connected to the first end of the signal detection circuit 104. The first output end and the second output end of the second selection circuit 103 are respectively electrically connected to the second end of the signal detection circuit 104. The output end of the signal detection circuit 104 is electrically connected to the input end of the detection device. The power supply end of the power supply control circuit 101 is used to connect to a power supply. The grounding ends of the power supply control circuit 101, the first selection circuit 102, the second selection circuit 103, and the signal detection circuit 104 are respectively used for grounding;

[0048] The power supply control circuit 101 is configured to receive the first selection signal sent by the detection device and control the target selection circuit corresponding to the first selection signal to conduct, so that the power supply powers the target selection circuit; the target selection circuit includes the first selection circuit 102 or the second selection circuit 103;

[0049] The first selection circuit 102 is configured to, when the first selection circuit 102 conducts, receive the second selection signal sent by the detection device and control the first path corresponding to the second selection signal in the first selection circuit 102 to conduct;

[0050] The second selection circuit 103 is configured to, when the second selection circuit 103 conducts, receive the second selection signal sent by the detection device and control the second path corresponding to the second selection signal in the second selection circuit 103 to conduct;

[0051] The signal detection circuit 104 is configured to detect the switch state signal corresponding to the DIP switch in the target path and send the switch state signal to the detection device; the target path includes the first path or the second path.

[0052] Among them, the detection device is provided with a plurality of I / O interfaces; optionally, the detection device can be one of an MCU (Microcontroller Unit), a main control unit, and other devices provided with I / O interfaces, which is not limited in the embodiments of the present invention; further optionally, the first output end of the detection device can correspond to an I / O interface of the detection device, the second output end of the detection device can correspond to an I / O interface of the detection device, and the input end of the detection device can correspond to a plurality of I / O interfaces of the detection device, which is not limited in the embodiments of the present invention; still further optionally, the number of I / O interfaces corresponding to the input end of the detection device is consistent with the number of DIP switches detected by the signal detection circuit 104, which is not limited in the embodiments of the present invention. Exemplarily, Figure 5 is a schematic structural diagram of a DIP switch detection circuit disclosed in an embodiment of the present invention, as Figure 5 shown, the first output end of the detection device can be Figure 5 Key1 shown in the figure, the second output end of the detection device can be Figure 5 Key2 shown in the figure, and the input end of the detection device can include Figure 5 Check1-Check3 shown in the figure, or can include Figure 5 Check1-Check4 shown in the figure, which is not limited in the embodiments of the present invention.

[0053] Among them, exemplarily, the first selection signal can be a high-level signal or a low-level signal, the second selection signal can be a high-level signal or a low-level signal, and the switch state signal corresponding to each detected DIP switch can be a high-level signal or a low-level signal, which is not limited in the embodiments of the present invention.

[0054] Among them, the number of DIP switches that can be detected by the DIP switch detection circuit can be calculated by taking the number of I / O interfaces of the detection device connected to the DIP switch detection circuit as the exponent and 2 as the base; exemplarily, as Figure 5 shown, when the number of I / O interfaces (including Key1, Key2, Check1-Check4) of the detection device connected to the DIP switch detection circuit is 6, the number of DIP switches that the DIP switch can detect is 2 6 , that is, it can detect 16-bit DIP switches. That is to say, the DIP switch detection circuit disclosed in the embodiments of the present invention can detect 16-bit DIP switches through only 6 I / O interfaces.

[0055] It can be seen that a DIP switch detection circuit described in an embodiment of the present utility model can receive a first selection signal sent by a detection device through a power supply control circuit, and control a first path corresponding to the first selection signal to conduct, so that a power supply powers the first path. Then, it receives a second selection signal sent by the detection device through a selection circuit, and controls a second path corresponding to the second selection signal in the first path to conduct. Then, it detects a switch status signal corresponding to the DIP switch in the second path through a signal detection circuit, and sends the switch status signal to the detection device. It can select the DIP switch to be detected from multiple circuit branches through logical judgment of signal high and low levels, thereby realizing the detection of multiple DIP switches using fewer I / O interfaces, increasing the detection quantity of DIP switches, improving the detection efficiency of DIP switches while reducing the hardware resources required for detecting DIP switches, and improving the utilization rate of hardware resources, which is beneficial to saving development costs. Moreover, by selecting the DIP switch to be detected and the switch status signal of the DIP switch through the output / input end of the detection device, it is beneficial to improve the detection accuracy of the DIP switch.

[0056] In an optional embodiment, Figure 2 is a schematic structural diagram of another DIP switch detection circuit disclosed in an embodiment of the present utility model, as Figure 2 shown, the power supply control circuit 101 may include a first power supply control module 1011 and a second power supply control module 1012, where:

[0057] The input end of the first power supply control module 1011 and the input end of the second power supply control module 1012 are respectively electrically connected to the first output end of the detection device; the output end of the first power supply control module 1011 is electrically connected to the first power supply end of the selection circuit 102, and the output end of the second power supply control module 1012 is electrically connected to the second power supply end of the selection circuit 102; the power supply ends of the first power supply control module 1011 and the second power supply control module 1012 are respectively used to connect to a power supply; the grounding end of the second power supply control module 1012 is used for grounding.

[0058] Optionally, as Figure 5 shown, the first power supply control module 1011 may include a first switching device Q1 and a first resistor R1, where:

[0059] The first end of the first switching device Q1 is used to connect to a power supply, the second end of the first switching device Q1 is electrically connected to the first end of the first resistor R1, the third end of the first switching device Q1 is electrically connected to the power supply end of the first selection circuit, and the second end of the first resistor R1 is electrically connected to the first output end of the detection device.

[0060] Optionally, the first switching device Q1 may be a triode or a MOS transistor, which is not limited in the embodiments of the present invention; further optionally, the first switching device Q1 may be a PNP triode, which is not limited in the embodiments of the present invention; when the first switching device Q1 is a PNP triode, the first end of the first switching device Q1 is the emitter, the second end of the first switching device Q1 is the base, and the third end of the first switching device Q1 is the collector.

[0061] Optionally, as Figure 5 shown, the second power supply control module 1012 may include a second switching device Q2, a third switching device Q3, a second resistor R2, and a third resistor R13, where:

[0062] The first end of the second switching device Q2 is used to connect to a power supply, the second end of the second switching device Q2 is electrically connected to the first end of the third resistor R13, the third end of the second switching device Q2 is electrically connected to the power supply terminal of the second selection circuit, the second end of the third resistor R13 is electrically connected to the first end of the third switching device Q3, the second end of the third switching device Q3 is electrically connected to the first end of the second resistor R2, the third end of the third switching device Q3 is used to ground, and the second end of the second resistor R2 is electrically connected to the first output terminal of the detection device.

[0063] Optionally, the second switching device Q2 may be a triode or a MOS transistor, which is not limited in the embodiments of the present invention; further optionally, the second switching device Q2 may be a PNP triode, which is not limited in the embodiments of the present invention; when the second switching device Q2 is a PNP triode, the first end of the second switching device Q2 is the emitter, the second end of the second switching device Q2 is the base, and the third end of the second switching device Q2 is the collector.

[0064] Optionally, the third switching device Q3 may be a triode or a MOS transistor, which is not limited in the embodiments of the present invention; further optionally, the third switching device Q3 may be an NPN triode, which is not limited in the embodiments of the present invention; when the third switching device Q3 is an NPN triode, the first end of the third switching device Q3 is the collector, the second end of the third switching device Q3 is the base, and the third end of the third switching device Q3 is the emitter.

[0065] Further, the first switching device Q1 and the third switching device Q3 are two switching devices with opposite current directions and / or opposite voltage polarities, and the first switching device Q1 and the second switching device Q2 have the same current direction and the same voltage polarity.

[0066] It can be seen that this alternative embodiment can divide the power supply control circuit into a first power supply control module and a second power supply control module, and can select to turn on the first power supply control module or the second power supply control module based on the signal level of the received first selection signal, so as to control the power supply to the first power supply control module and the second power supply control module respectively, so as to realize the first selection of the DIP switch to be detected by the detection device, and thus can simply and efficiently select the DIP switch to be detected.

[0067] In this alternative embodiment, optionally, as Figure 5 shown, the first selection circuit 102 may include a fourth switching device Q4, a fifth switching device Q6, a fourth resistor R11, a fifth resistor R3, and a sixth resistor R9, where:

[0068] The first ends of the fifth resistor R3 and the sixth resistor R9 are respectively electrically connected to the third end of the first switching device Q1. The second end of the fifth resistor R3 is respectively electrically connected to the first end of the fourth switching device Q4 and the first input end of the signal detection circuit 104. The second end of the sixth resistor R9 is respectively electrically connected to the first end of the fifth switching device Q6 and the first input end of the signal detection circuit 104. The first end of the fourth resistor R11 is electrically connected to the second output end of the detection device. The second end of the fourth resistor R11 is respectively electrically connected to the second end of the fourth switching device Q4 and the second end of the fifth switching device Q6. The third ends of the fourth switching device Q4 and the fifth switching device Q6 are respectively used for grounding.

[0069] Among them, optionally, the fourth switching device Q4 may be a triode or a MOS transistor, which is not limited in the embodiments of the present invention; further optionally, the fourth switching device Q4 may be an NPN triode, which is not limited in the embodiments of the present invention; when the fourth switching device Q4 is an NPN triode, the first end of the fourth switching device Q4 is the collector, the second end of the fourth switching device Q4 is the base, and the third end of the fourth switching device Q4 is the emitter.

[0070] Among them, optionally, the fifth switching device Q6 may be a triode or a MOS transistor, which is not limited in the embodiments of the present invention; further optionally, the fifth switching device Q6 may be a PNP triode, which is not limited in the embodiments of the present invention; when the fifth switching device Q6 is a PNP triode, the first end of the fifth switching device Q6 is the emitter, the second end of the fifth switching device Q6 is the base, and the third end of the fifth switching device Q6 is the collector.

[0071] Furthermore, the fourth switching device Q4 and the fifth switching device Q6 are two switching devices with opposite current directions and / or opposite voltage polarities.

[0072] Optionally, as Figure 5As shown in the figure, the second selection circuit 103 may include a sixth switching device Q5, a seventh switching device Q7, a seventh resistor R12, an eighth resistor R4, and a ninth resistor R10, where:

[0073] The first ends of the eighth resistor R4 and the ninth resistor R10 are respectively electrically connected to the third end of the second switching device Q2. The second end of the eighth resistor R4 is respectively electrically connected to the first end of the sixth switching device Q5 and the second input end of the signal detection circuit 104. The second end of the ninth resistor R10 is respectively electrically connected to the first end of the seventh switching device Q7 and the second input end of the signal detection circuit 104. The first end of the seventh resistor R12 is electrically connected to the second output end of the detection device. The second end of the seventh resistor R12 is respectively electrically connected to the second end of the sixth switching device Q5 and the second end of the seventh switching device Q7. The third ends of the sixth switching device Q5 and the seventh switching device Q7 are respectively used for grounding.

[0074] Among them, optionally, the sixth switching device Q5 may be a triode or a MOS transistor, which is not limited in the embodiments of the present invention. Further optionally, the sixth switching device Q5 may be an NPN triode, which is not limited in the embodiments of the present invention. When the sixth switching device Q5 is an NPN triode, the first end of the sixth switching device Q5 is the collector, the second end of the sixth switching device Q5 is the base, and the third end of the sixth switching device Q5 is the emitter.

[0075] Among them, optionally, the seventh switching device Q7 may be a triode or a MOS transistor, which is not limited in the embodiments of the present invention. Further optionally, the seventh switching device Q7 may be a PNP triode, which is not limited in the embodiments of the present invention. When the seventh switching device Q7 is a PNP triode, the first end of the seventh switching device Q7 is the emitter, the second end of the seventh switching device Q7 is the base, and the third end of the seventh switching device Q7 is the collector.

[0076] Furthermore, the sixth switching device Q5 and the seventh switching device Q7 are two switching devices with opposite current directions and / or opposite voltage polarities.

[0077] It can be seen that the optional embodiment can also first conduct the first selection circuit or the second selection circuit connected to the already-conducted power supply control module, so as to control the power supply to the first selection circuit and the second selection circuit respectively. Then, based on the signal level of the received second selection signal, the corresponding path in the already-conducted selection circuit is selected to be conducted, so as to supply power to this path, so as to realize the second selection of the DIP switch to be detected by the detection device. Furthermore, by adding a circuit power supply selection, multiple DIP switches that can be detected can be added to increase the number of detected DIP switches, which is beneficial to efficiently select the switch states of the DIP switches to be detected.

[0078] In this optional embodiment, optionally, as Figure 2 shown, the signal detection circuit 104 may include a first detection module 1041 and a second detection module 1042, where:

[0079] A first end of the first detection module 1041 is electrically connected to a first output end of the first selection circuit 102, and a second end of the first detection module 1041 is electrically connected to a second output end of the first selection circuit 102;

[0080] A first end of the second detection module 1042 is electrically connected to a first output end of the second selection circuit 103, and a second end of the second detection module 1042 is electrically connected to a second output end of the second selection circuit 103;

[0081] An output end of the first detection module 1041 and an output end of the second detection module 1042 are respectively electrically connected to an input end of the detection device, and the output end of the first detection module 1041 and the output end of the second detection module 1042 are respectively used for grounding.

[0082] It can be seen that this optional embodiment can also divide the signal detection circuit into a first detection module and a second detection module, which can be respectively connected to the first selection circuit and the second selection circuit, so as to turn on the first detection module or the second detection module connected to the already turned-on selection circuit, and then turn on the corresponding path in the detection module based on the second selection signal, so as to realize the selection of the DIP switch to be detected in the detection module, which is beneficial to efficiently select the switch state of the DIP switch to be detected.

[0083] In this optional embodiment, optionally, the signal detection circuit 104 may further include a potential determination module 1043, where:

[0084] A first end of the potential determination module 1043 is respectively electrically connected to an output end of the first detection module 1041 and an output end of the second detection module 1042, and a second end of the potential determination module 1043 is used for grounding.

[0085] Optionally, as Figure 5 shown, the potential determination module 1043 may include a plurality of resistors; further optionally, the number of resistors included in the potential determination module 1043 corresponds to the number of I / O interfaces included in the input end of the detection device accessed by the DIP switch detection circuit 10, which is not limited in the embodiment of the present invention.

[0086] It can be seen that this optional embodiment can also determine the signal potential levels of the respective DIP switches included in the signal detection circuit by setting the potential determination module, which can improve the accuracy of determining the signal potential of the signal detection circuit, thereby improving the detection accuracy of the switch state signal of the DIP switch.

[0087] In this optional embodiment, optionally, Figure 3 is a schematic structural diagram of a first detection module disclosed in an embodiment of the present invention. As Figure 3 shown, the first detection module 1041 may include a first switch sub-module 10411 and a second switch sub-module 10412. Figure 4 is a schematic structural diagram of a second detection module disclosed in an embodiment of the present invention. As Figure 4 shown, the second detection module 1042 may include a third switch sub-module 10421 and a fourth switch sub-module 10422, where:

[0088] The first end of the first switch sub-module 10411 is electrically connected to the first output end of the first selection circuit 102, and the first end of the second switch sub-module 10412 is electrically connected to the second output end of the first selection circuit 102.

[0089] The first end of the third switch sub-module 10421 is electrically connected to the first output end of the second selection circuit 103, and the first end of the fourth switch sub-module 10422 is electrically connected to the second output end of the second selection circuit 103.

[0090] The second end of each switch sub-module is used to be electrically connected to the input end of the detection device and grounded; each switch sub-module is one of the first switch sub-module 10411, the second switch sub-module 10412, the third switch sub-module 10421, and the fourth switch sub-module 10422.

[0091] It can be seen that this optional embodiment can also accurately select the required switch sub-module to be detected by setting the first switch sub-module and the second switch sub-module in the first detection module to be respectively connected to the two output ends of the first selection circuit, and by setting the third switch sub-module and the fourth switch sub-module in the second detection module to be respectively connected to the two output ends of the second selection circuit, thereby further improving the selection accuracy of the required DIP switch to be detected, so as to accurately detect the switch state of the DIP switch.

[0092] In this optional embodiment, optionally, as Figure 3 shown, the first detection module 1041 may further include a first anti-reverse sub-module 10413 corresponding to the first switch sub-module 10411 and a second anti-reverse sub-module 10414 corresponding to the second switch sub-module 10412; as Figure 4 shown, the second detection module 1042 further includes a third anti-reverse sub-module 10423 corresponding to the third switch sub-module 10421 and a fourth anti-reverse sub-module 10424 corresponding to the fourth switch sub-module 10422, where:

[0093] The first end of the first anti-reverse sub-module 10413 is electrically connected to the first output end of the first selection circuit 102, the first end of the second anti-reverse sub-module 10414 is electrically connected to the second output end of the first selection circuit 102, the first end of the third anti-reverse sub-module 10423 is electrically connected to the first output end of the second selection circuit 103, and the first end of the fourth anti-reverse sub-module 10424 is electrically connected to the second output end of the second selection circuit 103;

[0094] The second end of each anti-reverse sub-module is electrically connected to the first end of the switch sub-module corresponding to this anti-reverse sub-module, and each anti-reverse sub-module is one of the first anti-reverse sub-module 10413, the second anti-reverse sub-module 10414, the third anti-reverse sub-module 10423, and the fourth anti-reverse sub-module 10424.

[0095] Optionally, each anti-reverse sub-module may include one or more diodes, which are not limited in the embodiments of the present invention; further optionally, the models of the diodes included in each anti-reverse sub-module are not limited. A diode can be set for each DIP switch included in the signal detection circuit 104, or a diode can be set for every two DIP switches, which are not limited in the embodiments of the present invention.

[0096] It can be seen that this optional embodiment can also reduce the possibility that the switch states of the DIP switches in the other switch sub-module cannot be detected due to the level corresponding to one DIP switch being pulled low in two switch sub-modules in the same detection module by setting an anti-reverse sub-module for each switch sub-module, thereby improving the detection accuracy and detection stability of the DIP switches.

[0097] In this optional embodiment, optionally, as Figure 5 shown, each switch sub-module may include a DIP switch group, and each DIP switch group includes at least three DIP switches;

[0098] For each switch sub-module, the first end of each DIP switch in this switch sub-module is electrically connected to the first end of the anti-reverse sub-module corresponding to this DIP switch; the second end of each DIP switch in this switch sub-module is electrically connected to the input end of the detection device.

[0099] It can be seen that this optional embodiment can also set each DIP switch to be connected to an anti-reverse sub-module one by one, which is beneficial to improving the circuit protection accuracy of the anti-reverse sub-module, and further beneficial to improving the detection accuracy and detection stability of the DIP switches.

[0100] In this optional embodiment, optionally, as Figure 5As shown, the DIP switch group included in the first switch sub-module 10411 may be the first DIP switch device S1, and the first reverse connection prevention sub-module 10413 may include the first diode D1 and the second diode D4; the DIP switch group included in the second switch sub-module 10412 may be the second DIP switch device S2, and the second reverse connection prevention sub-module 10414 may include the third diode D5 and the fourth diode D8; the DIP switch group included in the third switch sub-module 10421 may be the third DIP switch device S2, and the third reverse connection prevention sub-module 10423 may include the fifth diode D2 and the sixth diode D3; the DIP switch group included in the fourth switch sub-module 10422 may be the fourth DIP switch device S4, and the fourth reverse connection prevention sub-module 10424 may include the seventh diode D6 and the eighth diode D7;

[0101] Further optionally, when each DIP switch group includes four DIP switches, the potential determination module 1043 may include the tenth resistor R5, the eleventh resistor R6, the twelfth resistor R7, and the thirteenth resistor R8, where:

[0102] Taking the first switch sub-module 10411, the first reverse connection prevention sub-module 10413, and the potential determination module 1043 as an example, the positive electrodes of the first diode D1 and the second diode D4 are electrically connected to the second end of the fifth resistor R3 and the first end of the fourth switching device Q4 respectively, the negative electrode of the second diode D4 is electrically connected to the first end and the second end of the first DIP switch device S1 respectively, the negative electrode of the first diode D1 is electrically connected to the third end and the fourth end of the first DIP switch device S1 respectively, the fifth end of the first DIP switch device S1 is electrically connected to the first end of the tenth resistor R5 and the first input interface (such as Figure 5 Check1 shown) of the input end of the detection device, and the second end of the tenth resistor R5 is used for grounding;

[0103] And so on, the connection relationships between the remaining switch sub-modules in the signal detection circuit 104, the reverse connection prevention sub-module corresponding to each remaining switch sub-module, and the electronic components included in the potential determination module 1043, as well as the connection relationships between the electronic components included and other circuit structures, may be the same as the principle of the above connection relationships. Specifically, for the other electronic components included in the signal detection circuit 104, the connection relationships between the electronic components included therein, and the connection relationships between the electronic components included and other circuit structures, refer specifically to Figure 5 .

[0104] In another optional embodiment, the number of DIP switch detection circuits may be greater than 1, and every two DIP switch detection circuits may be electrically connected through the power supply selection circuit 30, where:

[0105] The power supply terminal of the power supply selection circuit 30 is used to connect to a power supply, the first output terminal of the power supply selection circuit 30 is used to connect to the power supply terminal of the power supply control circuit of one of the DIP switch detection circuits, and the second output terminal of the power supply selection circuit 30 is used to connect to the power supply terminal of the power supply control circuit of the other DIP switch detection circuit; the input terminal of the power supply selection circuit is electrically connected to the third output terminal of the detection device.

[0106] Exemplarily, Figure 6 is a schematic structural diagram of another DIP switch detection circuit disclosed in an embodiment of the present invention. As Figure 6 shown, when the number of DIP switch detection circuits is 2, the first output terminal of the power supply selection circuit 30 is used to connect to the power supply terminal of the power supply control circuit 101 of the DIP switch detection circuit 10, and the second output terminal of the power supply selection circuit 30 is used to connect to the power supply terminal of the power supply control circuit of the DIP switch detection circuit 20. Among them, the third output terminal of the detection device can be Key0 as Figure 6 shown.

[0107] Optionally, as Figure 6 shown, the power supply selection circuit 30 may include an eighth switching device Q0-1, a ninth switching device Q0-2, a tenth switching device Q0-3, a fourteenth resistor R0-1, a fifteenth resistor R0-2, and a sixteenth resistor R0-3. Among them, for other electronic components included in the power supply selection circuit 30, the connection relationships between the electronic components it includes, and the connection relationships between the electronic components it includes and other circuit structures, specifically refer to Figure 6 .

[0108] Further optionally, for other electronic components included in the DIP switch detection circuit 20, the connection relationships between the electronic components it includes, and the connection relationships between the electronic components it includes and other circuit structures, specifically refer to Figure 6 .

[0109] Among them, the number of DIP switches that can be detected by the DIP switch detection circuit can be calculated by taking the number of I / O interfaces of the detection device connected to the DIP switch detection circuit and the power supply selection circuit as the exponent and 2 as the base; exemplarily, as Figure 6 shown, when the number of I / O interfaces (including Key0, Key1, Key2, Check1-Check4) of the detection device connected to the circuit is 7, the number of DIP switches that can be detected by the DIP switch is 2 7 , that is, it can detect 32-bit DIP switches. That is to say, the DIP switch detection circuit disclosed in the embodiment of the present invention can detect 32-bit DIP switches through only 7 I / O interfaces.

[0110] It can be seen that this optional embodiment can connect two DIP switch detection circuits by adding a power supply selection circuit, and only need to additionally connect one I / O interface of the detection device, then it can multiply the number of DIP switches that can be detected, which is beneficial to further improve the detection efficiency of the DIP switch and further improve the utilization rate of hardware resources.

[0111] In the embodiment of the present invention, the working principle of the DIP switch detection circuit is as follows:

[0112] When there is only one DIP switch detection circuit, the power supply control circuit receives the first selection signal sent by the detection device through Key1. When the first selection signal is high (for example: Key1 = 1), Q3 conducts, Q2 conducts, VCC2 is powered on, that is, VCC2 = VCC, and Q1 is cut off, VCC1 loses power; when the first selection signal is low (for example: Key1 = 0), Q1 conducts, VCC1 is powered on, that is, VCC1 = VCC, Q3 is cut off, and VCC2 loses power, so as to achieve the purpose of controlling the power supply of the first selection circuit and the second selection circuit respectively through the first selection signal;

[0113] Taking the case where the first selection signal is low (for example: Key1 = 0) as an example, the selection circuit receives the second selection signal sent by the detection device through Key2. When the second selection signal is high (for example: Key2 = 1), Q4 conducts, the potential of VD1 is low, VD1 = 0; Q6 is cut off, the potential of VD3 is high, that is, VD3 = VCC, and at this time, only the state of the DIP switch group S3 is detected; conversely, when the second selection signal is low (for example: Key2 = 0), Q6 conducts, the potential of VD3 is low, that is, VD3 = 0; Q4 is cut off, the potential of VD1 is high, that is, VD1 = VCC, and at this time, the state of the DIP switch group S1 is sampled. Thus, the power supply control of the potentials of VD1 and VD3 is realized. Among them, when the switch state of a certain DIP switch in the detected DIP switch group is ON, the corresponding switch state signal is 1; when the switch state of a certain DIP switch is OFF, the corresponding switch state signal is 0. All the switch state signals corresponding to the sampled DIP switch group are sent to the detection device through Check1-Check4.

[0114] Among them, the diodes D1 / D4 / D5 / D8 in the first detection module can prevent the level corresponding to the DIP switch with the switch state of ON in the DIP switch group S1 from being pulled low when VD1 = 0 and VD3 = VCC, that is, when detecting the state of the DIP switch group S3, resulting in the inability to detect the switch state of S3.

[0115] Exemplarily, when Key1 = 0 and Key2 = 1, the switch state of S3 is detected. If Check1 is 1, the switch state of the first DIP switch of S3 is ON. If Check2 is 0, the switch state of the second DIP switch of S3 is OFF. If Check3 is 0, the switch state of the third DIP switch of S3 is OFF. If Check4 is 1, the switch state of the fourth DIP switch of S3 is ON, and so on.

[0116] When there are two DIP switch detection circuits, the power supply selection circuit receives the third selection signal sent by the detection device through Key3, and its working principle is the same as that of the power supply control circuit in the DIP switch detection circuit, so that the power supply of the DIP switch detection circuit 10 and the DIP switch detection circuit 20 can be controlled respectively through the third selection signal.

[0117] Embodiment 2

[0118] Please refer to Figure 7 , Figure 7 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention. The electronic device includes a DIP switch detection circuit as described in any one of Embodiment 1. And the detection functions that the electronic device can achieve include but are not limited to being able to detect multiple DIP switches using fewer I / O interfaces. It should be noted that for the detailed description of the DIP switch detection circuit, please refer to the specific description of the relevant content in Embodiment 1, and this embodiment will not be repeated.

[0119] It can be seen that the electronic device described in Figure 7 can receive the first selection signal sent by the detection device through the power supply control circuit, and control the conduction of the first path corresponding to the first selection signal, so that the power supply powers the first path. Then, it receives the second selection signal sent by the detection device through the selection circuit, and controls the conduction of the second path corresponding to the second selection signal in the first path. Then, it detects the switch state signal corresponding to the DIP switch in the second path through the signal detection circuit, and sends the switch state signal to the detection device. It can select the DIP switch to be detected from multiple circuit branches through the logical judgment of the signal high and low levels, thereby realizing the detection of multiple DIP switches using fewer I / O interfaces, so as to increase the detection quantity of the DIP switch, and thus can improve the detection efficiency of the DIP switch while reducing the hardware resources required for detecting the DIP switch, which is beneficial to saving the development cost and improving the utilization rate of the hardware resources; and, by selecting the DIP switch to be detected and the switch state signal of the DIP switch through the output / input end of the detection device, it is beneficial to improve the detection accuracy of the DIP switch.

[0120] Finally, it should be noted that: The disclosed detection circuit for a DIP switch and electronic device in the embodiments of the present utility model only disclose the preferred embodiments of the present utility model, which are only used to illustrate the technical solutions of the present utility model and not to limit them; Although the present utility model has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features; And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present utility model.

Claims

1. A DIP switch detection circuit, characterized in that, The DIP switch detection circuit includes a power supply control circuit, a first selection circuit, a second selection circuit, and a signal detection circuit, where: The input end of the power supply control circuit is electrically connected to the first output end of the detection device. The first output end of the power supply control circuit is electrically connected to the power supply end of the first selection circuit. The second output end of the power supply control circuit is electrically connected to the power supply end of the second selection circuit. The input ends of the first selection circuit and the second selection circuit are respectively electrically connected to the second output end of the detection device. The first output end and the second output end of the first selection circuit are respectively electrically connected to the first end of the signal detection circuit. The first output end and the second output end of the second selection circuit are respectively electrically connected to the second end of the signal detection circuit. The output end of the signal detection circuit is electrically connected to the input end of the detection device. The power supply end of the power supply control circuit is used to connect to a power supply. The grounding ends of the power supply control circuit, the first selection circuit, the second selection circuit, and the signal detection circuit are respectively used for grounding; The power supply control circuit is configured to receive a first selection signal sent by the detection device and control the target selection circuit corresponding to the first selection signal to conduct, so that the power supply supplies power to the target selection circuit. The target selection circuit includes the first selection circuit or the second selection circuit; The first selection circuit is configured to, when the first selection circuit conducts, receive a second selection signal sent by the detection device and control the first path corresponding to the second selection signal in the first selection circuit to conduct; The second selection circuit is configured to, when the second selection circuit conducts, receive a second selection signal sent by the detection device and control the second path corresponding to the second selection signal in the second selection circuit to conduct; The signal detection circuit is configured to detect the switch state signal corresponding to the DIP switch in the target path and send the switch state signal to the detection device. The target path includes the first path or the second path.

2. The DIP switch detection circuit according to claim 1, wherein The power supply control circuit includes a first power supply control module and a second power supply control module, where: The input ends of the first power supply control module and the second power supply control module are respectively electrically connected to the first output end of the detection device. The output end of the first power supply control module is electrically connected to the power supply end of the first selection circuit. The output end of the second power supply control module is electrically connected to the power supply end of the second selection circuit. The power supply ends of the first power supply control module and the second power supply control module are respectively used to connect to the power supply. The grounding end of the second power supply control module is used for grounding.

3. The DIP switch detection circuit according to claim 2, wherein The first power supply control module includes a first switching device (Q1) and a first resistor (R1), where: The first end of the first switching device (Q1) is used to connect to the power supply. The second end of the first switching device (Q1) is electrically connected to the first end of the first resistor (R1). The third end of the first switching device (Q1) is electrically connected to the power supply end of the first selection circuit. The second end of the first resistor (R1) is electrically connected to the first output end of the detection device.

4. The DIP switch detection circuit according to claim 2, wherein The second power supply control module includes a second switching device (Q2), a third switching device (Q3), a second resistor (R2), and a third resistor (R13), where: The first end of the second switching device (Q2) is used to connect to the power supply. The second end of the second switching device (Q2) is electrically connected to the first end of the third resistor (R13). The third end of the second switching device (Q2) is electrically connected to the power supply end of the second selection circuit. The second end of the third resistor (R13) is electrically connected to the first end of the third switching device (Q3). The second end of the third switching device (Q3) is electrically connected to the first end of the second resistor (R2). The third end of the third switching device (Q3) is used to be grounded. The second end of the second resistor (R2) is electrically connected to the first output end of the detection device.

5. The DIP switch detection circuit according to any one of claims 1-4, characterized in that The signal detection circuit includes a first detection module and a second detection module, where: The first end of the first detection module is electrically connected to the first output end of the first selection circuit. The second end of the first detection module is electrically connected to the second output end of the first selection circuit. The first end of the second detection module is electrically connected to the first output end of the second selection circuit. The second end of the second detection module is electrically connected to the second output end of the second selection circuit. The output end of the first detection module and the output end of the second detection module are respectively electrically connected to the input end of the detection device, and the output end of the first detection module and the output end of the second detection module are respectively used to be grounded.

6. The DIP switch detection circuit according to claim 5, wherein The first detection module includes a first switching sub-module and a second switching sub-module. The second detection module includes a third switching sub-module and a fourth switching sub-module, where: The first end of the first switching sub-module is electrically connected to the first output end of the first selection circuit. The first end of the second switching sub-module is electrically connected to the second output end of the first selection circuit. The first end of the third switching sub-module is electrically connected to the first output end of the second selection circuit. The first end of the fourth switching sub-module is electrically connected to the second output end of the second selection circuit. The second end of each switching sub-module is used to be electrically connected to the input end of the detection device and grounded; each of the switching sub-modules is one of the first switching sub-module, the second switching sub-module, the third switching sub-module, and the fourth switching sub-module.

7. The DIP switch detection circuit according to claim 6, wherein The first detection module further includes a first anti-reverse sub-module corresponding to the first switching sub-module and a second anti-reverse sub-module corresponding to the second switching sub-module; the second detection module further includes a third anti-reverse sub-module corresponding to the third switching sub-module and a fourth anti-reverse sub-module corresponding to the fourth switching sub-module, where: The first end of the first anti-reverse sub-module is electrically connected to the first output end of the first selection circuit, the first end of the second anti-reverse sub-module is electrically connected to the second output end of the first selection circuit, the first end of the third anti-reverse sub-module is electrically connected to the first output end of the second selection circuit, and the first end of the fourth anti-reverse sub-module is electrically connected to the second output end of the second selection circuit; The second end of each anti-reverse sub-module is electrically connected to the first end of the switch sub-module corresponding to this anti-reverse sub-module, and each of the anti-reverse sub-modules is one of the first anti-reverse sub-module, the second anti-reverse sub-module, the third anti-reverse sub-module, and the fourth anti-reverse sub-module.

8. The DIP switch detection circuit according to claim 7, wherein Each of the switch sub-modules includes a DIP switch group, and each of the DIP switch groups includes at least three DIP switches; For each of the switch sub-modules, the first end of each of the DIP switches in this switch sub-module is electrically connected to the first end of the anti-reverse sub-module corresponding to this DIP switch; the second end of each of the DIP switches in this switch sub-module is electrically connected to the input end of the detection device.

9. The DIP switch detection circuit according to any one of claims 1, 2, 3, 4, 6, 7, and 8, characterized in that The number of the DIP switch detection circuits is greater than 1, and every two of the DIP switch detection circuits are electrically connected through a power supply selection circuit, where: The power supply end of the power supply selection circuit is used to connect to the power supply, the first output end of the power supply selection circuit is used to connect to the power supply end of the power supply control circuit of one of the DIP switch detection circuits, and the second output end of the power supply selection circuit is used to connect to the power supply end of the power supply control circuit of another DIP switch detection circuit; the input end of the power supply selection circuit is electrically connected to the third output end of the detection device.

10. An electronic device, characterized in that, The electronic device includes a device body and the DIP switch detection circuit according to any one of claims 1-9.