Input / output compatible circuits and electronic devices

CN224636836UActive Publication Date: 2026-08-14SHENZHEN INVT ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]本申请的目的在于提供一种输入输出兼容电路及电子设备,旨在解决相关的输入输出兼容电路具有多个外接端,电路结构复杂且成本较高的问题

Benefits of technology

由于控制电路能够输出驱动信号,并根据接入的检测信号(或接入并隔离后的输入信号)执行相应动作;第一开关电路在获取驱动信号后导通,且在导通后将供电电源信号输出至外接端;复合电路则具备双重功能:即可在第一开关电路导通时,对供电电源信号进行检测并输出检测信号,又可在第一开关电路不导通时,对外接端接入的输入信号进行隔离处理。因此,仅需配置一个外接端,即可同时实现供电直流电传输和输入信号传输的双向通道功能;该设计显著提高了电路的集成度与灵活性,同时结构简单、成本较低。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224636836U_ABST
    Figure CN224636836U_ABST
Patent Text Reader

Abstract

An input / output compatible circuit and electronic device, belonging to the field of electronic circuit technology, is disclosed. It controls a circuit to output a drive signal and perform corresponding operations based on an input signal and an isolated input signal. A first switching circuit conducts after receiving the drive signal and transmits a power supply signal flowing through an external terminal. A composite circuit detects the power supply status of the power supply signal and outputs a detection signal when the first switching circuit is on, and isolates the input signal connected to the external terminal when the first switching circuit is not on. Therefore, with only one external terminal, a bidirectional channel for transmitting power supply signals and input signals is achieved, improving integration and flexibility, and resulting in a simple circuit structure and low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic circuit technology, and in particular relates to an input / output compatible circuit and electronic device. Background Technology

[0002] In related input / output compatible circuits, input and output channels are typically designed independently, which not only consumes more external port resources but also lacks flexibility, making it difficult to switch functions flexibly according to actual application requirements. Furthermore, achieving independent input / output control usually relies on complex or costly circuit structures, increasing system costs.

[0003] Therefore, the relevant input / output compatible circuits have multiple external terminals, resulting in complex circuit structures and high costs. Utility Model Content

[0004] The purpose of this application is to provide an input / output compatible circuit and electronic device, which aims to solve the problems of related input / output compatible circuits having multiple external terminals, complex circuit structure and high cost.

[0005] This application provides an input / output compatible circuit with external terminals, including: The control circuit is used to output drive signals and perform corresponding operations based on the input detection signals and the isolated input signals. The first switching circuit is connected to the external terminal and is used to turn on after acquiring the drive signal, and to transmit the power supply signal flowing through the external terminal after turning on. A composite circuit, connected to the control circuit and the external terminal, is used to detect the power supply status of the power supply signal and output the detection signal when the first switching circuit is turned on, and to isolate the input signal connected to the external terminal when the first switching circuit is not turned on.

[0006] In one embodiment, it further includes: The second switching circuit is connected to the first switching circuit and is used to receive the power supply signal after being turned on and transmit the power supply signal to the first switching circuit. After receiving the power supply signal, the first switching circuit is turned on after acquiring the drive signal.

[0007] In one embodiment, the control circuit is also connected to the second switching circuit; The control circuit is also used to output a switching signal; The second switching circuit is specifically used to receive a power supply signal, and in response to the switching signal being turned on, to transmit the power supply signal to the first switching circuit.

[0008] In one embodiment, the composite circuit includes a first optocoupler, a first resistor, and a second resistor; The collector of the first optocoupler and the first end of the first resistor are connected to form the output terminal of the composite circuit, which is connected to the control circuit to output the isolated input signal and the detection signal. The positive terminal of the first optocoupler forms the input terminal of the composite circuit, and is connected to the first switching circuit and the external terminal to receive the input signal and the detection signal; The negative terminal of the first optocoupler is connected to the first end of the second resistor, the emitter of the first optocoupler and the second end of the second resistor are both connected to the power supply ground, and the second end of the first resistor is connected to the first power supply. The first switching circuit includes a first field-effect transistor, a third resistor, and a fourth resistor; The source of the first field-effect transistor and the first end of the third resistor together constitute the input terminal of the first switching circuit, which is connected to the second switching circuit to receive the power supply signal. The drain of the first field-effect transistor forms the output terminal of the first switching circuit, which is connected to the composite circuit and the external terminal to output the power supply signal. The second end of the third resistor and the first end of the fourth resistor are connected and together form the control terminal of the first switching circuit, which is connected to the control circuit to receive the drive signal.

[0009] In one embodiment, the first switching circuit is connected between the external terminal and the power ground; The first switching circuit is specifically used to transmit the power supply signal connected to the external terminal to the power ground based on the drive signal.

[0010] In one embodiment, it further includes: An overcurrent protection circuit, connected to the first switching circuit, the composite circuit, and the external terminal, is used to provide overcurrent protection for the input signal and the power supply signal.

[0011] In one embodiment, it further includes: A freewheeling circuit, connected to the first switching circuit, the composite circuit, and the external terminal, is used to discharge the induced electromotive force generated by the inductive load when the external terminal is connected to an inductive load.

[0012] In one embodiment, it further includes: A driving circuit, connected between the control circuit and the first switching circuit, is used to amplify the driving signal; The first switching circuit is specifically used to turn on in response to the amplified drive signal, so as to transmit the power supply signal to the external terminal.

[0013] This utility model embodiment also provides an electronic device, which includes an external module and the above-described input / output compatible circuit; The external module includes a first amplifier circuit or a first load; The first amplifier circuit is connected to the external terminal and is used to receive a first electrical signal and amplify the first electrical signal to output the input signal; The first load is connected to the external terminal and is used to power on and operate according to the power supply signal; or The external module includes a selection circuit, a second amplifier circuit, and a second load. The selection circuit is connected to the external terminal and is used to transmit the input signal or the power supply signal; The second amplifier circuit is connected to the selection circuit and is used to receive the second electrical signal and amplify the second electrical signal to output the input signal; The second load is connected to the selection circuit and is used to power on and operate according to the power supply signal.

[0014] In one embodiment, the selection circuit is also connected to the control circuit in the input / output compatible circuit; The control circuit is also used to output a selection signal; The selection circuit is specifically used to transmit the input signal or the power supply signal based on the selection signal.

[0015] The beneficial effects of this utility model embodiment compared with the prior art are: Because the control circuit can output a drive signal and perform corresponding actions based on the input detection signal (or the input signal after being input and isolated); the first switching circuit turns on after acquiring the drive signal and outputs the power supply signal to the external terminal after turning on; the composite circuit has a dual function: it can detect the power supply signal and output a detection signal when the first switching circuit is on, and it can isolate the input signal connected to the external terminal when the first switching circuit is not on. Therefore, only one external terminal needs to be configured to realize the bidirectional channel function of DC power supply transmission and input signal transmission simultaneously; this design significantly improves the integration and flexibility of the circuit, while having a simple structure and low cost. Attached Figure Description

[0016] To more clearly illustrate the technical utility model in the embodiments of this utility model, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A schematic diagram of an input / output compatible circuit provided in an embodiment of this application; Figure 2 This is a schematic diagram of another structure of an input / output compatible circuit provided in an embodiment of this application; Figure 3 This is a schematic diagram of another structure of an input / output compatible circuit provided in an embodiment of this application; Figure 4 This is a schematic diagram of another structure of an input / output compatible circuit provided in an embodiment of this application; Figure 5 This is a schematic diagram of another structure of an input / output compatible circuit provided in an embodiment of this application; Figure 6 This is a schematic diagram of another structure of an input / output compatible circuit provided in an embodiment of this application; Figure 7 This is a schematic diagram of another structure of an input / output compatible circuit provided in an embodiment of this application; Figure 8 This is a schematic diagram of another structure of an input / output compatible circuit provided in an embodiment of this application; Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 10 Another structural schematic diagram of an electronic device provided in an embodiment of this application; Figure 11 Another structural schematic diagram of an electronic device provided in an embodiment of this application; Figure 12 Another structural schematic diagram of an electronic device provided in an embodiment of this application; Figure 13 A partial example circuit schematic diagram of an electronic device provided in an embodiment of this application; Figure 14 Another example circuit schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0018] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.

[0019] It should be noted that when a component is referred to as being "fixed to" or "set on" another component, it can be directly on or indirectly on that other component. When a component is referred to as being "connected to" another component, it can be directly connected to or indirectly connected to that other component.

[0020] It should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0021] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0022] Figure 1 A schematic diagram of the input / output compatible circuit provided in a preferred embodiment of this application is shown. For ease of explanation, only the parts relevant to this embodiment are shown, and are described in detail below: The above-mentioned input / output compatible circuit has an external terminal and includes a control circuit 10, a first switching circuit 20, and a composite circuit 30.

[0023] The control circuit 10 is used to output a drive signal and perform corresponding operations based on the input detection signal and the isolated input signal. The first switching circuit 20 is connected to an external terminal and is used to turn on after receiving a drive signal, and to transmit the power supply signal flowing through the external terminal after turning on. The composite circuit 30 is connected to the control circuit 10 and the external terminal. It is used to detect the power supply status of the power supply signal and output a detection signal when the first switch circuit 20 is turned on, and to isolate the input signal connected to the external terminal when the first switch circuit is not turned on.

[0024] It can be understood that the above-mentioned input / output compatible circuit has two operating modes. In the first operating mode, the control circuit 10 outputs a drive signal and performs corresponding operations according to the input detection signal. The first switching circuit 20 is turned on after acquiring the drive signal, and transmits the power supply signal flowing through the external terminal after being turned on. The composite circuit 30 detects the power supply status of the power supply signal and outputs a detection signal to the control circuit 10. In the second operating mode, the composite circuit 30 isolates the input signal connected to the external terminal. The control circuit 10 receives the isolated input signal and performs corresponding operations according to the isolated input signal.

[0025] The control circuit 10 may include a microprocessor, and the first switching circuit 20 includes a switching transistor.

[0026] like Figure 2 As shown, the above-mentioned input / output compatible circuit also includes a second switching circuit 40.

[0027] The second switching circuit 40 is connected to the first switching circuit 20 and is used to receive the power supply signal after being turned on and transmit the power supply signal to the first switching circuit 20. The first switching circuit 20 is turned on after receiving the power supply signal and obtaining the drive signal.

[0028] It can be understood that the first switching circuit 20 turns on after receiving the drive signal, and outputs the power supply signal to the external terminal after turning on. Therefore, the load can be made to work by connecting the load between the external terminal and the power supply ground.

[0029] The above technical solution enables dual control of the power supply signal transmission, improving the reliability and safety of the input / output compatible circuit.

[0030] like Figure 3 As shown, the control circuit 10 is also connected to the second switch circuit 40; The control circuit 10 is also used to output a switching signal; The second switching circuit 40 is specifically used to connect to the power supply signal and, in response to the switching signal being turned on, transmits the power supply signal to the first switching circuit 20.

[0031] Understandably, the second switching circuit 40 may include a relay.

[0032] The above technical solution improves the ease of use of the input-output compatible circuit by controlling the second switching circuit 40 through the control circuit 10.

[0033] like Figure 4 As shown, the first switching circuit 20 is connected between the external terminal and the power ground; The first switching circuit 20 is specifically used to transmit the power supply signal connected to the external terminal to the power ground based on the drive signal.

[0034] Understandably, the load can be connected between the external terminal and the power supply, and the current flows through the power supply, the load, and the first switching circuit 20 to the power ground.

[0035] The above technical solution allows the power supply and load to be connected sequentially to the external terminals, improving the flexibility and convenience of using input / output compatible circuits.

[0036] like Figure 5 As shown, the above-mentioned input / output compatible circuit also includes an overcurrent protection circuit 50.

[0037] The overcurrent protection circuit 50 is connected to the first switching circuit 20, the composite circuit 30, and the external terminal, and is used to provide overcurrent protection for the input signal and the power supply signal.

[0038] The above technical solutions prevent circuit overload, avoid component damage caused by excessive current, and improve the reliability and safety of input / output compatible circuits.

[0039] like Figure 6 As shown, the above-mentioned input / output compatible circuit also includes a freewheeling circuit 60.

[0040] The freewheeling circuit 60 is connected to the first switching circuit 20, the composite circuit 30 and the external terminal, and is used to discharge the induced electromotive force generated by the inductive load when the inductive load is connected to the external terminal.

[0041] The above technical solution suppresses induced voltage spikes when applied to inductive loads (such as relays, motors, coils, etc.), protects other components in the circuit from damage, and improves the reliability and safety of input / output compatible circuits.

[0042] like Figure 7 As shown, the above-mentioned input / output compatible circuit also includes a driver circuit 80.

[0043] The drive circuit 80 is connected between the control circuit 10 and the first switching circuit 20 and is used to amplify the drive signal; The first switching circuit 20 is specifically used to turn on in response to the amplified drive signal, so as to transmit the power supply signal to the external terminal.

[0044] The above technical solution enables input / output compatible circuits to be applied to higher power loads.

[0045] like Figure 8 As shown, the above-mentioned input / output compatible circuit also includes a filter circuit 70.

[0046] The filter circuit 70 is connected to the first switching circuit 20, the composite circuit 30, and the external terminal, and is used to filter the input signal and the power supply signal.

[0047] The above technical solutions mitigate rapid signal fluctuations, eliminate glitches and jitter, and enhance the system's anti-interference capability by bypassing high-frequency noise, thereby improving the reliability and safety of the input / output compatibility circuit.

[0048] This utility model embodiment also provides an electronic device, which includes an external module and the above-mentioned input / output compatible circuit; In one embodiment, such as Figure 9 As shown, the external module includes a first amplifier circuit 500; the first amplifier circuit 500 is connected to an external terminal and is used to receive a first electrical signal and amplify the first electrical signal to output an input signal; or In another embodiment, such as Figure 10 As shown, the external module includes a first load 400; the first load 400 is connected to an external terminal and is used to power on and operate according to the power supply signal.

[0049] or In another embodiment, such as Figure 11 As shown, the external module includes a selection circuit 300, a second amplifier circuit 200, and a second load 100; The selection circuit 300 is connected to an external terminal and is used to transmit input signals or power supply signals.

[0050] The second amplifier circuit 200 is connected to the selection circuit 300 and is used to receive the second electrical signal and amplify the second electrical signal to output the input signal. The second load 100 is connected to the selection circuit 300 and is used to power on and operate according to the power supply signal.

[0051] The above technical solutions enable the access of various external modules, expanding the application scope of electronic devices.

[0052] like Figure 12 As shown, the selection circuit 300 is also connected to the control circuit 10 in the input / output compatible circuit; The control circuit 10 is also used to output a selection signal; The selection circuit 300 is specifically used to transmit input signals or power supply signals based on the selection signal.

[0053] The above technical solution improves the ease of use of the input / output compatible circuit by controlling the selection circuit 300 through the control circuit 10.

[0054] Figure 13This invention illustrates a partial example circuit structure of an electronic device provided by an embodiment of the present invention. Figure 14 This illustration shows another partial example circuit structure of the input / output compatible circuit provided in an embodiment of the present invention. For ease of explanation, only the parts relevant to the embodiment of the present invention are shown, and are described in detail below: like Figure 13 As shown, the composite circuit 30 includes a first optocoupler U1, a first resistor R1, and a second resistor R2. The collector of the first optocoupler U1 and the first end of the first resistor R1 are connected to form the output terminal of the composite circuit 30, which is connected to the control circuit 10 to output the isolated input signal and the detection signal. The positive terminal of the first optocoupler U1 forms the input terminal of the composite circuit 30, which is connected to the first switching circuit 20 and the external terminal to receive input signals and detection signals. The negative terminal of the first optocoupler U1 is connected to the first end of the second resistor R2. The emitter of the first optocoupler U1 and the second end of the second resistor R2 are both connected to the power supply ground. The second end of the first resistor R1 is connected to the first power supply VAA.

[0055] like Figure 13 As shown, the first switching circuit 20 includes a first field-effect transistor M1, a third resistor R3, and a fourth resistor R4; The source of the first field-effect transistor M1 and the first terminal of the third resistor R3 together form the input terminal of the first switching circuit 20, which is connected to the second switching circuit 40 to receive the power supply signal. The drain of the first field-effect transistor M1 forms the output terminal of the first switching circuit 20, which is connected to the composite circuit 30 and the external terminal to output the power supply signal. The second end of the third resistor R3 and the first end of the fourth resistor R4 are connected and together form the control terminal of the first switching circuit 20, which is connected to the control circuit 10 to receive the drive signal.

[0056] like Figure 14 As shown, the composite circuit 30 includes a second optocoupler U2, a fifth resistor R5, and a sixth resistor R6; The collector of the second optocoupler U2 and the first end of the fifth resistor R5 are connected to form the output terminal of the composite circuit 30, which is connected to the control circuit 10 to output the isolated input signal or detection signal. The positive terminal of the second optocoupler U2 is connected to the first end of the sixth resistor R6; The negative terminal of the second optocoupler U2 forms the input terminal of the composite circuit 30, which is connected to the first switching circuit 20 and the external terminal to receive input signals or power supply signals. The emitter of the first optocoupler U1 is connected to the power supply ground, and the second end of the fifth resistor R5 is connected to the first power supply VAA. The second end of the sixth resistor R6 forms the power supply terminal of the composite circuit 30 to connect to the power supply signal; like Figure 14 As shown, the first switching circuit 20 includes a second field-effect transistor M2, a seventh resistor R7, and an eighth resistor R8; The drain of the second field-effect transistor M2 is connected to the composite circuit 30 and the external terminal to receive the power supply signal. The source of the second field-effect transistor M2 is connected to the power supply ground, and the gate of the second field-effect transistor M2 is connected to the first end of the eighth resistor R8. The second end of the eighth resistor R8 and the first end of the seventh resistor R7 are connected and together form the control terminal of the first switching circuit 20, which is connected to the control circuit 10 to receive the drive signal.

[0057] like Figure 13 and Figure 14 As shown, the filter circuit 70 includes a first capacitor C1; the freewheeling circuit 60 includes a Zener diode Z1; and the overcurrent protection module includes a fuse F1.

[0058] like Figure 13 As shown, the selection circuit 300 includes a first switch KM1; the common terminal of the first switch KM1 constitutes the common terminal of the selection circuit 300 and is connected to the external terminal of the input / output compatible circuit to receive a power supply signal or output / input signal; the normally open terminal of the first switch KM1 constitutes the input terminal of the selection circuit 300 and is connected to the amplifier circuit to receive an input signal; the normally closed terminal of the first switch KM1 constitutes the output terminal of the selection circuit 300 and is connected to the load to output a power supply signal; the control terminal of the first switch KM1 constitutes the control terminal of the selection circuit 300 and is connected to the control circuit 10 to receive a selection signal.

[0059] like Figure 13 As shown, the second amplifier circuit 200 includes a third field-effect transistor M3 and a ninth resistor R9; the source of the third field-effect transistor M3 forms the power supply terminal of the first amplifier circuit 500 to receive the power supply signal; the gate of the third field-effect transistor M3 and the first end of the ninth resistor R9 are connected to form the input terminal of the second amplifier circuit 200 to receive the electrical signal; the drain of the third field-effect transistor M3 is connected to form the output terminal of the second amplifier circuit 200 to output the input signal; the first end of the ninth resistor R9 is connected to the power supply ground.

[0060] like Figure 14As shown, the selection circuit 300 includes a second switch KM2; the common terminal of the second switch KM2 constitutes the common terminal of the selection circuit 300 and is connected to the external terminal of the input / output compatible circuit to output a power supply signal or an input signal; the normally open terminal of the second switch KM2 constitutes the first input terminal of the selection circuit 300 and is connected to the amplifier circuit to receive the input signal; the normally closed terminal of the second switch KM2 constitutes the second input terminal of the selection circuit 300 and is connected to the load to receive the power supply signal; the control terminal of the second switch KM2 constitutes the control terminal of the selection circuit 300 and is connected to the control circuit 10 to receive the selection signal.

[0061] like Figure 14 As shown, the second amplifier circuit 200 includes a fourth field-effect transistor M4, a tenth resistor R10, and an eleventh resistor R11; the source of the fourth field-effect transistor M4 is connected to the power supply ground; the gate of the third field-effect transistor M3 is connected to the first end of the tenth resistor R9, the second end of the tenth resistor R10 and the first end of the eleventh resistor R11 are connected and form the input terminal of the second amplifier circuit 200 to receive electrical signals; the drain of the third field-effect transistor M4 forms the output terminal of the second amplifier circuit 200 to output input signals; the first end of the eleventh resistor R11 is connected to the power supply ground.

[0062] like Figure 13 and Figure 14 As shown, the control circuit 10 includes a microprocessor U1; the first general-purpose input / output terminal P1.0 of the microprocessor U1 constitutes the first output terminal of the control circuit 10 and is connected to the first switching circuit 20 to output a drive signal; the second general-purpose input / output terminal P1.1 of the microprocessor U1 constitutes the second output terminal of the control circuit 10 and is connected to the selection circuit 300 to output a selection signal; the third general-purpose input / output terminal P1.2 of the microprocessor U1 constitutes the input terminal of the control circuit 10 and is connected to the multiplexing circuit to receive a detection signal or an isolated input signal.

[0063] The following is based on the working principle. Figure 13 and Figure 14 Further explanation is provided below: exist Figure 13In the first operating mode, the second switching circuit 40 receives a power supply signal and transmits the power supply signal to the source of the first field-effect transistor M1 when it is turned on; the first general-purpose input / output terminal P1.0 of the microprocessor U1 outputs a drive signal, and the first field-effect transistor M1 turns on in response to the drive signal to transmit the power supply signal to the external terminal; the first switch KM1 transmits the power supply signal to the second load 100 according to the selection signal to make the second load 100 work; at the same time, the power supply signal is connected to the positive terminal of the first optocoupler U1 so that the collector of the first optocoupler U1 outputs a detection signal to the third general-purpose input / output terminal P1.2 of the microprocessor U1. In the second operating mode, an electrical signal is connected to the gate of the third field-effect transistor M3. The third field-effect transistor M3 amplifies the electrical signal to output an input signal. The first switch KM1 transmits the input signal according to the selection signal. The input signal is connected to the negative terminal of the first optocoupler U1 through the external terminal. The first optocoupler U1 isolates the input signal and outputs the isolated input signal from the collector of the first optocoupler U1 to the third general-purpose input / output terminal P1.2 of the microprocessor U1. The microprocessor U1 performs corresponding operations according to the isolated input signal.

[0064] exist Figure 14 In the first operating mode, the first terminal of the second load 100 is connected to a power supply signal and the second terminal of the second load 100 outputs a power supply signal. The second switch KM2 transmits the power supply signal to the external terminal according to the selection signal. The first general-purpose input / output terminal P1.0 of the microprocessor U1 outputs a drive signal. The second field-effect transistor M2 responds to the drive signal and turns on to transmit the power supply signal to the power ground, so that the second load 100 works. At the same time, the power supply signal is connected to the second optocoupler U2 so that the collector of the second optocoupler U2 outputs a detection signal to the third general-purpose input / output terminal P1.2 of the microprocessor U1. In the second operating mode, an electrical signal is connected to the gate of the fourth field-effect transistor M4. The fourth field-effect transistor M4 amplifies the electrical signal to output an input signal. The second switch KM2 transmits the input signal according to the selection signal. The input signal is connected to the negative terminal of the second optocoupler U1 through the external terminal. The first optocoupler U1 isolates the input signal and outputs the isolated input signal from the collector of the second optocoupler U1 to the third general-purpose input / output terminal P1.2 of the microprocessor U1. The microprocessor U1 performs the corresponding operation according to the isolated input signal.

[0065] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0066] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An input / output compatible circuit, characterized in that, It has external terminals, including: The control circuit is used to output drive signals and perform corresponding operations based on the input detection signals and the isolated input signals. The first switching circuit is connected to the external terminal and is used to turn on after acquiring the drive signal, and to transmit the power supply signal flowing through the external terminal after turning on. A composite circuit, connected to the control circuit and the external terminal, is used to detect the power supply status of the power supply signal and output the detection signal when the first switching circuit is turned on, and to isolate the input signal connected to the external terminal when the first switching circuit is not turned on.

2. The input / output compatible circuit as described in claim 1, characterized in that, Also includes: The second switching circuit is connected to the first switching circuit and is used to receive the power supply signal after being turned on and transmit the power supply signal to the first switching circuit. After receiving the power supply signal, the first switching circuit is turned on after acquiring the drive signal.

3. The input / output compatible circuit as described in claim 2, characterized in that, The control circuit is also connected to the second switching circuit; The control circuit is also used to output a switching signal; The second switching circuit is specifically used to receive a power supply signal, and in response to the switching signal being turned on, to transmit the power supply signal to the first switching circuit.

4. The input / output compatible circuit as described in claim 2, characterized in that, The composite circuit includes a first optocoupler, a first resistor, and a second resistor; The collector of the first optocoupler and the first end of the first resistor are connected to form the output terminal of the composite circuit, which is connected to the control circuit to output the isolated input signal and the detection signal. The positive terminal of the first optocoupler forms the input terminal of the composite circuit, and is connected to the first switching circuit and the external terminal to receive the input signal and the detection signal; The negative terminal of the first optocoupler is connected to the first end of the second resistor, the emitter of the first optocoupler and the second end of the second resistor are both connected to the power supply ground, and the second end of the first resistor is connected to the first power supply. The first switching circuit includes a first field-effect transistor, a third resistor, and a fourth resistor; The source of the first field-effect transistor and the first end of the third resistor together constitute the input terminal of the first switching circuit, which is connected to the second switching circuit to receive the power supply signal. The drain of the first field-effect transistor forms the output terminal of the first switching circuit, which is connected to the composite circuit and the external terminal to output the power supply signal. The second end of the third resistor and the first end of the fourth resistor are connected and together form the control terminal of the first switching circuit, which is connected to the control circuit to receive the drive signal.

5. The input / output compatible circuit as described in claim 1, characterized in that, The first switching circuit is connected between the external terminal and the power ground; The first switching circuit is specifically used to transmit the power supply signal connected to the external terminal to the power ground based on the drive signal.

6. The input / output compatible circuit as described in claim 1, characterized in that, Also includes: An overcurrent protection circuit, connected to the first switching circuit, the composite circuit, and the external terminal, is used to provide overcurrent protection for the input signal and the power supply signal.

7. The input / output compatible circuit as described in claim 1, characterized in that, Also includes: A freewheeling circuit, connected to the first switching circuit, the composite circuit, and the external terminal, is used to discharge the induced electromotive force generated by the inductive load when the external terminal is connected to an inductive load.

8. The input / output compatible circuit as described in claim 1, characterized in that, Also includes: A driving circuit, connected between the control circuit and the first switching circuit, is used to amplify the driving signal; The first switching circuit is specifically used to turn on in response to the amplified drive signal, so as to transmit the power supply signal to the external terminal.

9. An electronic device, characterized in that, The electronic device includes an external module and an input / output compatible circuit as described in any one of claims 1 to 8; The external module includes a first amplifier circuit or a first load; The first amplifier circuit is connected to the external terminal and is used to receive a first electrical signal and amplify the first electrical signal to output the input signal; The first load is connected to the external terminal and is used to power on and operate according to the power supply signal; or The external module includes a selection circuit, a second amplifier circuit, and a second load. The selection circuit is connected to the external terminal and is used to transmit the input signal or the power supply signal; The second amplifier circuit is connected to the selection circuit and is used to receive the second electrical signal and amplify the second electrical signal to output the input signal; The second load is connected to the selection circuit and is used to power on and operate according to the power supply signal.

10. The electronic device as claimed in claim 9, characterized in that, The selection circuit is also connected to the control circuit in the input / output compatible circuit; The control circuit is also used to output a selection signal; The selection circuit is specifically used to transmit the input signal or the power supply signal based on the selection signal.