General-purpose input / output port circuit and its working method
The universal input/output port circuit simplifies system design and reduces costs by using software-configurable hardware to adapt to various input/output signals, ensuring static current limitations and maintaining EMC and ESD performance.
Patent Information
- Application Number
- CN202010813123.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-13
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2040-08-13
AI Technical Summary
Existing microprocessor input/output interfaces face complexity and cost issues due to varied external circuit designs, requiring different hardware for each interface type, complicating system design and increasing costs.
A universal input/output port circuit comprising a control unit, input unit with transistors, and output unit with MOSFETs, allowing software-configurable hardware to adapt to different input/output signals without changing hardware, ensuring static current limitations and maintaining EMC and ESD performance.
Simplifies system design, enhances hardware versatility, and reduces costs by enabling flexible software reconfiguration of input/output ports while maintaining static power consumption and ESD protection.
Smart Images

Figure CN111813028B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an input / output port circuit, and more particularly to a general-purpose input / output port circuit and its working method. Background Art
[0002] Microprocessor control systems have been increasingly widely used in the modern world. A microprocessor generally obtains external information from sensors and the like through an analog-to-digital converter (ADC) and a digital input interface, and after processing, outputs information to the outside through a digital-to-analog converter (DAC) and a digital output interface for control. In many automotive electronic control system applications, the digital ports of the microprocessor need to exchange information with the outside world, usually in the form of high level or low level.
[0003] External interfaces generally have various interface forms, such as active high, active low, normally floating high impedance, etc. Different external circuit designs determine that these interfaces have various forms, which brings difficulties to the design of the input / output interfaces of the microprocessor. It is necessary to consider various interface forms and design different interface circuits. In this way, the hardware design is very complex, and different interfaces require different hardware to be replaced. Thus, the system cannot be made universal, and each interface requires different hardware, increasing the cost and the difficulty of debugging.
[0004] Therefore, it is necessary to design a new circuit to greatly simplify the system design and improve the universality of the hardware of the input / output port circuit and the flexibility of application. Summary of the Invention
[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a general-purpose input / output port circuit and its working method.
[0006] To achieve the above object, the present invention adopts the following technical solutions: A general-purpose input / output port circuit includes a main control unit, an input unit, and an output unit. The input unit includes a triode Q1, the base of the triode Q1 is connected to an external input device, and the collector of the triode Q1 is connected to the main control unit; the output unit includes a Mos transistor Q8 and a Mos transistor Q5, and the Mos transistor Q8 and the Mos transistor Q5 are respectively connected to the main control unit through an output control unit.
[0007] Its further technical solution is: The input unit further includes a varistor TD1 and a filter capacitor C1. Among them, one end of the varistor TD1 is grounded, and the other end of the varistor TD1 is connected between the external input device and the base of the triode Q1; one end of the filter capacitor C1 is grounded, and the other end of the filter capacitor C1 is connected between the external input device and the base of the triode Q1.
[0008] Its further technical solution is as follows: The input unit further includes a pull-up resistor R2 and a pull-up resistor R1. One end of the pull-up resistor R2 is connected between the external input device and the base of the triode Q1; one end of the pull-up resistor R1 is connected to the collector of the triode Q1, a protection resistor R3 is connected between the collector of the triode Q1 and the main control unit, and an adjustment resistor R4 is connected between the base of the triode Q1 and the external input device.
[0009] Its further technical solution is as follows: The input unit further includes a switch unit. The switch unit includes a triode Q2, a triode Q3, and a diode D1. Among them, the base of the triode Q2 is connected to the main control unit, the emitter of the triode Q2 is grounded, the collector of the triode Q2 is connected to the base of the triode Q3, the emitter of the triode Q3 is connected to the external input device, the collector of the triode Q3 is connected to the adjustment resistor R4, and both ends of the diode D1 are respectively connected to the emitter and the collector of the triode Q3.
[0010] Its further technical solution is as follows: The input unit further includes a triode Q7. The base of the triode Q7 is connected to the main control unit, the emitter of the triode Q7 is grounded, and the collector of the triode Q7 is connected to the base of the triode Q1 through a resistor R11.
[0011] Its further technical solution is as follows: A resistor R12 and a resistor R14 are connected to the collector of the triode Q1. One end of the resistor R14 is grounded, and the main control unit is connected between the resistor R12 and the resistor R14 through a resistor R13.
[0012] Its further technical solution is as follows: The output control unit includes a triode Q4 and a triode Q6. The triode Q4 is respectively connected to the Mos transistor Q8 and the main control unit, and the triode Q6 is respectively connected to the Mos transistor Q5 and the main control unit.
[0013] Its further technical solution is as follows: The base of the triode Q4 is connected to the main control unit, and the collector of the triode Q4 is connected to the gate of the Mos transistor Q8 through a resistor R22; the source of the Mos transistor Q8 is connected to a load.
[0014] Its further technical solution is as follows: The base of the triode Q6 is connected to the main control unit, the collector of the triode Q6 is connected to the gate of the Mos transistor Q5, the source of the Mos transistor Q5 is connected to the load, and the collector of the triode Q6 is connected to the main control unit.
[0015] The present invention also provides a working method for a general-purpose input / output port circuit, including:
[0016] According to the signal input by an external input device, drive the conduction or cut-off of the triode Q1 to adjust the level of the input main control unit; and input a control signal by the main control unit to drive the conduction or cut-off of the output control unit to adjust the levels output by the Mos transistor Q8 and the Mos transistor Q5.
[0017] The beneficial effects of the present invention compared with the prior art are as follows: by providing a main control unit, an input unit, and an output unit, where the input unit includes the triode Q1, and the output unit includes the Mos transistor Q8 and the Mos transistor Q5, according to different input situations, it is controlled by the main control unit. During the control process, the requirements of static current limitation are met, and the EMC and ESD performance of the port also remain unchanged. Input and output control can be performed in different situations, greatly simplifying the system design and improving the generality of the hardware of the input / output port circuit and the flexibility of application.
[0018] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. Description of the Drawings
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0020] Figure 1 It is the specific circuit schematic diagram of the input unit provided for the specific embodiment of the present invention;
[0021] Figure 2 It is the specific circuit schematic diagram of the input unit provided for another specific embodiment of the present invention;
[0022] Figure 3 It is the specific circuit schematic diagram of the input unit provided for another specific embodiment of the present invention;
[0023] Figure 4 It is the specific circuit schematic diagram of the output unit provided for the specific embodiment of the present invention. Detailed Embodiments
[0024] In order to make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0026] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be understood as a limitation to the present invention.
[0027] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality of" means two or more unless otherwise specifically defined.
[0028] In the present invention, unless otherwise clearly defined and limited, the terms "mounted", "connected", "coupled", "fixed", etc. should be understood in a broad sense. For example, it may be a connection, a detachable connection, or an integral body; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0029] In the present invention, unless otherwise clearly defined and limited, the first feature being "on" or "under" the second feature may include the direct contact between the first and second features, or may include the situation where the first and second features are not in direct contact but in contact through other features therebetween. Moreover, the first feature being "above", "over" and "on" the second feature includes that the first feature is directly above and obliquely above the second feature, or merely indicates that the horizontal height of the first feature is higher than that of the second feature. The first feature being "under", "below" and "beneath" the second feature includes that the first feature is directly below and obliquely below the second feature, or merely indicates that the horizontal height of the first feature is lower than that of the second feature.
[0030] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms should not be understood as necessarily referring to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification.
[0031] As Figures 1 to 4 shown in the specific embodiment, the general-purpose input / output port circuit provided in this embodiment can be applied to the interface control circuit to realize the software reconfiguration of the level definition of the microprocessor port, and at the same time meet the requirements of system static power consumption and ESD (Electro-Static Discharge) protection, greatly simplifying the system design and improving the generality of the hardware and the flexibility of application.
[0032] Please refer to Figure 1 and Figure 2 for the above general-purpose input / output port circuit, which includes a main control unit, an input unit, and an output unit. The input unit includes a triode Q1, the base of the triode Q1 is connected to an external input device, and the collector of the triode Q1 is connected to the main control unit; the output unit includes a Mos tube Q8 and a Mos tube Q5, and the Mos tube Q8 and the Mos tube Q5 are respectively connected to the main control unit through an output control unit.
[0033] In this embodiment, the triode Q1 isolates the input 12V battery voltage and the 5V voltage of the main control unit. When the input unit is in a high-impedance state input and the valid signal is high, the controlled power supply +12VS is turned off. The normal high-impedance input cannot turn on the triode Q1, and the control unit pin gets a high signal. When the valid signal is high, the triode Q1 conducts, and the control unit pin signal is low. Since the input is high-impedance normally, the input current is zero when the whole circuit is in sleep mode, and no electric energy is consumed; when the input unit is in a high-impedance state input and the valid signal is low, the controlled power supply +12VS is turned on. The normal high-impedance input does not affect the subsequent stage. The controlled power supply +12VS makes the triode Q1 conduct through the pull-up resistor R2, and the control unit pin gets a low signal. When the valid signal is low, the triode Q1 turns off, and the control unit pin signal is high. Since the input is high-impedance normally, the input current is zero when the whole circuit is in sleep mode, and no electric energy is consumed; when the input unit is in a low-level input and the valid signal is high level, the controlled power supply +12VS is turned off. The normal low-level input cannot turn on the triode Q1, and the control unit pin gets a high signal. When the valid signal is high, the triode Q1 conducts, and the control unit pin signal is low. Since the input is low normally and the controlled power supply +12VS is turned off, the input current is zero during sleep, and no electric energy is consumed; when the input unit is in a low-level input and the valid signal is high impedance, the controlled power supply +12VS is turned on. The normal low-level input cannot turn on the triode Q1, and the control unit pin gets a high signal. When the valid signal is high impedance, the controlled power supply +12VS makes the triode Q1 conduct through the pull-up resistor R2, and the control unit pin signal is low. Since the input is a low-level input normally, the controlled power supply +12VS is turned off during system sleep, and the input current is zero during sleep, and no electric energy is consumed. In the above situations, the sleep current of the whole circuit is only the leakage current of the varistor TD1 and the triode Q1, and the value is very low, which can meet the requirements of various specifications.
[0034] When the input unit is at a high-level input and the valid signal is low, the controlled power supply +12VS is turned off. Usually, the high-level input makes the triode Q1 conduct, and the control unit pin gets a low signal. When the valid signal is low, the triode Q1 turns off, and the control unit pin signal is high. When the system is in sleep mode, the triode Q1 conducts and consumes a certain amount of current. However, the amplitude of this current can be controlled to a very small level by adjusting the resistance value of the resistor R4, and the power consumption is not large. When the input unit is at a high-level input and the valid signal is high impedance, the controlled power supply +12VS is turned off. Usually, the high-level input makes the triode Q1 conduct, and the control unit pin gets a low signal. When the valid signal is high impedance, the triode Q1 turns off, and the control unit pin signal is high. When the system is in sleep mode, the triode Q1 conducts and consumes a certain amount of current. However, the amplitude of this current can be controlled to a very small level by adjusting the resistance value of the resistor R4, and the power consumption is not large. In the above situations, the sleep current of the entire circuit is determined by the adjustable resistor R4 and the input resistance of the triode Q1, and in most cases, it can meet the requirements of the regulations.
[0035] By controlling the controlled power supply +12VS, the control unit can use a set of general hardware interface designs and meet the requirements of various different input signals through different software configurations, realizing the function of software-reconfigurable hardware input ports. Moreover, the EMC (Electro Magnetic Compatibility) and ESD performance of the ports remain unchanged, and the static power consumption of the entire circuit during sleep is also controlled to a good level.
[0036] In one embodiment, please refer to Figure 1 , the above input unit further includes a varistor TD1 and a filter capacitor C1. Among them, one end of the varistor TD1 is grounded, and the other end of the varistor TD1 is connected between the external input device and the base of the triode Q1; one end of the filter capacitor C1 is grounded, and the other end of the filter capacitor C1 is connected between the external input device and the base of the triode Q1.
[0037] The varistor TD1 and the filter capacitor C1 are input protection devices used to suppress various EMC and ESD pulses and protect the subsequent circuits.
[0038] In one embodiment, please refer to Figure 1 , the above input unit further includes a pull-up resistor R2 and a pull-up resistor R1. One end of the pull-up resistor R2 is connected between the external input device and the base of the triode Q1; one end of the pull-up resistor R1 is connected to the collector of the triode Q1. A protection resistor R3 is connected between the collector of the triode Q1 and the main control unit, and an adjustable resistor R4 is connected between the base of the triode Q1 and the external input device.
[0039] The pull-up resistor R2 is connected to the controlled power supply +12VS of 12V. The switching voltage of the triode Q1 is adjusted by adjusting the resistor R4. The pull-up resistor R1 is a 5V pull-up resistor, and the protection resistor R3 is used to protect the input pin of the microprocessor.
[0040] In various cases, the sleep current of the entire circuit can be controlled to a very small level.
[0041] In one embodiment, please refer to Figure 2 , the above input unit further includes a switch unit. The switch unit includes a triode Q2, a triode Q3, and a diode D1. Among them, the base of the triode Q2 is connected to the main control unit, the emitter of the triode Q2 is grounded, the collector of the triode Q2 is connected to the base of the triode Q3, the emitter of the triode Q3 is connected to an external input device, the collector of the triode Q3 is connected to the adjusting resistor R4, and both ends of the diode D1 are respectively connected to the emitter and the collector of the triode Q3.
[0042] The input unit of this embodiment is used in the case where the requirement for the sleep current is particularly strict, and a switch circuit composed of the triode Q2, the triode Q3, and the diode D1 is added. When the input situation is that the input unit is in a high-impedance state input and the valid signal is high, the input unit is in a high-impedance state input and the valid signal is low, the input unit is in a low-level input and the valid signal is high level, and the input unit is in a low-level input and the valid signal is high impedance, the triode Q2 and the triode Q3 are both turned on, which has no impact on the entire circuit and is applicable to the above analysis. For the two input situations where the input unit is in a high-level input and the valid signal is low and the input unit is in a high-level input and the valid signal is high impedance, when the entire circuit is in sleep, the triode Q2 and the triode Q3 are both turned off, so that the high-level input voltage will not flow into the triode Q1, and thus there is no obvious sleep current, strictly meeting the requirements of static power consumption.
[0043] Of course, in other embodiments, the above pull-up resistor R2 and the pull-up resistor R1 can be replaced with pull-down resistors. The above triode is of NPN type. Of course, in other embodiments, the model of the triode can be changed to PNP.
[0044] In one embodiment, please refer to Figure 3 , the above input unit further includes a triode Q7. The base of the triode Q7 is connected to the main control unit, the emitter of the triode Q7 is grounded, and the collector of the triode Q7 is connected to the base of the triode Q1 through a resistor R11.
[0045] Specifically, the collector of the triode Q1 is connected to a resistor R12 and a resistor R14. One end of the resistor R14 is grounded, and the main control unit is connected between the resistor R12 and the resistor R14 through a resistor R13.
[0046] In this embodiment, when the system is working, the controlled power supply +12VS is always turned on. When the system is in the sleep state, +12VS is always turned off.
[0047] In this embodiment, when the input unit is in a high-impedance input state and the valid signal is high, the controlled power supply EN turns on the triode Q7. Usually, the triode Q1 is turned on, and the control unit pin gets a high signal. When the valid signal is high, the triode Q1 is turned off, and the signal of the control unit pin is low. Since the input is usually high-impedance, the input current is zero when the system is in the sleep state, and no electrical energy is consumed. When the input unit is in a high-impedance input state and the valid signal is low. The controlled power supply EN turns off the triode Q7. The usual high impedance turns off the triode Q1, and the control unit pin gets a low signal. When the valid signal is low, the triode Q1 is turned on, and the signal of the control unit pin is high. Since the input is usually high-impedance, the input current is zero when the system is in the sleep state, and no electrical energy is consumed. When the input unit is in a low-level input state and the valid signal is high, the controlled power supply EN turns off the triode Q7. The usual low input turns on the triode Q1, and the control unit pin gets a high signal. When the valid signal is high, the triode Q1 is turned off, and the signal of the control unit pin is low. Since the input is usually low, the controlled power supply +12VS is turned off, and the input current is zero during sleep, and no electrical energy is consumed. When the input unit is in a low-level input state and the valid signal is high impedance, the controlled power supply EN turns off the triode Q7. The usual low input turns on the triode Q1, and the control unit pin gets a high signal. When the valid signal is high impedance, the triode Q1 is turned off, and the signal of the control unit pin is low. Since the input is usually low, the controlled power supply +12VS is turned off when the entire circuit is in the sleep state, and the input current is zero during sleep, and no electrical energy is consumed. When the input unit is in a high-level input state and the valid signal is low. The controlled power supply EN turns off the triode Q7. The usual high input turns off the triode Q1, and the control unit pin gets a low signal. When the valid signal is low, the triode Q1 is turned on, and the signal of the control unit pin is high. When the entire circuit is in the sleep state, the triode Q1 is turned off, and the input current is zero during sleep, and no electrical energy is consumed. When the input unit is in a high-level input state and the valid signal is high impedance, the controlled power supply EN turns on the triode Q7. The usual high input turns off the triode Q1, and the control unit pin gets a low signal. When the valid signal is high impedance, the triode Q1 is turned on, and the signal of the control unit pin is high. When the system is in the sleep state, the triode Q1 and the triode Q7 are turned off, and the input current is zero during sleep, and no electrical energy is consumed.
[0048] By adopting the method of software configuration of the control unit, it is possible to adapt to various types of input and output ports such as high level, low level, and high impedance. Since there is no need to change the hardware, only the software configuration method is changed, which greatly reduces the types of hardware, improves the universality of the hardware and the flexibility of application, thus successfully reducing the system cost and having great economic value.
[0049] In one embodiment, refer to Figure 4 , the above output control unit includes transistor Q4 and transistor Q6. Transistor Q4 is respectively connected to Mos transistor Q8 and the main control unit, and transistor Q6 is respectively connected to Mos transistor Q5 and the main control unit.
[0050] Specifically, the base of transistor Q4 is connected to the main control unit, and the collector of transistor Q4 is connected to the gate of Mos transistor Q8 through resistor R22; a load is connected to the source of Mos transistor Q8.
[0051] Specifically, the base of transistor Q6 is connected to the main control unit, the collector of transistor Q6 is connected to the gate of Mos transistor Q5, the source of Mos transistor Q5 is connected to the load, and the collector of transistor Q6 is connected to the main control unit.
[0052] In this embodiment, a resistor R21 is connected between the gate and the drain of the above Mos transistor Q8, and a zener diode is connected in parallel at both ends of resistor R21.
[0053] The main control unit is connected to the gate of Mos transistor Q5 through resistor R23. In addition, a resistor R24 with one end grounded is also connected between the gate connection of Mos transistor Q5 and the main control unit.
[0054] Mos transistor Q8 and Mos transistor Q5 are respectively controlled by two output pins OutputSig2_Hi and OutputSig2_Lo of the main control unit through transistor Q4 and transistor Q6. The two Mos transistors cannot be turned on simultaneously. When Mos transistor Q8 is turned on, the output pin OutputSig2 outputs a high level, and when Mos transistor Q5 is turned on, the output pin OutputSig2 outputs a low level. In this way, on one pin, with a general circuit, different level outputs can be achieved through software configuration.
[0055] For the above general-purpose input / output port, by setting the main control unit, the input unit, and the output unit, where the input unit includes transistor Q1, and the output unit includes Mos transistor Q8 and Mos transistor Q5. According to different input situations, it is controlled by the main control unit. During the control process, the requirements of static current limitation are met and the EMC and ESD performance of the port also remain unchanged. Input and output control can be carried out in different situations, greatly simplifying the system design and improving the generality of the hardware of the input / output port circuit and the flexibility of application.
[0056] In one embodiment, a working method of the general-purpose input / output port circuit is also provided, including:
[0057] Drive the conduction or cutoff of the triode Q1 according to the signal input by the external input device to adjust the level of the input main control unit; and input a control signal by the main control unit to drive the conduction or cutoff of the output control unit to adjust the levels output by the Mos transistor Q8 and the Mos transistor Q5.
[0058] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the working method of the above general-purpose input / output port circuit can refer to the corresponding description in the foregoing embodiment of the general-purpose input / output port circuit. For the sake of convenience and conciseness of description, it will not be elaborated here.
[0059] The above only further illustrates the technical content of the present invention with embodiments to make it easier for readers to understand, but it does not mean that the implementation manners of the present invention are limited to this. Any technical extension or re-creation made according to the present invention is protected by the present invention. The protection scope of the present invention is subject to the claims.
Claims
1. General-purpose input / output port circuit, characterized in that, It includes a main control unit, an input unit, and an output unit. The input unit includes a triode Q1. The base of the triode Q1 is connected to an external input device, and the collector of the triode Q1 is connected to the main control unit. The output unit includes a Mos tube Q8 and a Mos tube Q5. The Mos tube Q8 and the Mos tube Q5 are respectively connected to the main control unit through an output control unit. The input unit further includes a varistor TD1 and a filter capacitor C1. One end of the varistor TD1 is grounded, and the other end of the varistor TD1 is connected between the external input device and the base of the triode Q1. One end of the filter capacitor C1 is grounded, and the other end of the filter capacitor C1 is connected between the external input device and the base of the triode Q1. The input unit further includes a pull-up resistor R2 and a pull-up resistor R1. One end of the pull-up resistor R2 is connected between the external input device and the base of the triode Q1. One end of the pull-up resistor R1 is connected to the collector of the triode Q1. A protection resistor R3 is connected between the collector of the triode Q1 and the main control unit. An adjustment resistor R4 is connected between the base of the triode Q1 and the external input device. The input unit further includes a switch unit. The switch unit includes a triode Q2, a triode Q3, and a diode D1. The base of the triode Q2 is connected to the main control unit. The emitter of the triode Q2 is grounded. The collector of the triode Q2 is connected to the base of the triode Q3. The emitter of the triode Q3 is connected to the external input device. The collector of the triode Q3 is connected to the adjustment resistor R4. Both ends of the diode D1 are respectively connected to the emitter and the collector of the triode Q3.
2. The general-purpose input / output port circuit according to claim 1, characterized in that The input unit further includes a triode Q7. The base of the triode Q7 is connected to the main control unit. The emitter of the triode Q7 is grounded. The collector of the triode Q7 is connected to the base of the triode Q1 through a resistor R11.
3. The general-purpose input / output port circuit according to claim 2, wherein A resistor R12 and a resistor R14 are connected to the collector of the triode Q1. One end of the resistor R14 is grounded. The main control unit is connected between the resistor R12 and the resistor R14 through a resistor R13.
4. The general-purpose input / output port circuit according to any one of claims 1 to 3, characterized in that, The output control unit includes a triode Q4 and a triode Q6. The triode Q4 is respectively connected to the Mos tube Q8 and the main control unit. The triode Q6 is respectively connected to the Mos tube Q5 and the main control unit.
5. The general-purpose input / output port circuit according to claim 4, wherein The base of the triode Q4 is connected to the main control unit. The collector of the triode Q4 is connected to the gate of the Mos tube Q8 through a resistor R22. A load is connected to the source of the Mos tube Q8.
6. The general-purpose input / output port circuit according to claim 5, wherein The base of the triode Q6 is connected to the main control unit. The collector of the triode Q6 is connected to the gate of the Mos tube Q5. The source of the Mos tube Q5 is connected to the load. The collector of the triode Q6 is connected to the main control unit.
7. A working method performed by the general-purpose input / output port circuit according to any one of claims 1 to 6, characterized in that, It includes: Drive the conduction or cut-off of the triode Q1 according to the signal input by the external input device to adjust the level input to the main control unit; And input a control signal by the main control unit to drive the output control unit to conduct or cut off, so as to adjust the levels output by the Mos transistor Q8 and the Mos transistor Q5.
Citation Information
Patent Citations
Universal input and output interface circuit
CN208285295U
Universal input / output port circuit
CN212723702U