A single-port multi-control mode interface circuit
By designing a single-port multi-control mode interface circuit, using the combination of port module, comparison unit and signal control module, the complex problem of single-port realization of multi-mode control in the prior art is solved, and efficient control of multiple working modes and reduced chip area is achieved.
Patent Information
- Application Number
- CN202510002208.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-02
AI Technical Summary
In the prior art, the implementation of multi-mode control through a single port is more complicated, resulting in waste of chip area and ports.
A single-port multi-control mode interface circuit is designed to realize the control of multiple working modes through the combination of port module, comparison unit and signal control module.
It realizes the use of a single port to control more than two working modes, reducing chip area and port waste, and simplifying the implementation process.
Smart Images

Figure CN119402001B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of control circuits, and in particular to a single-port multi-control mode interface circuit. Background Art
[0002] A traditional single port can be understood as a one-bit interface, which can correspond to two working modes after decoding. For example, by applying a high level to the single port, it corresponds to one working mode, and by applying a low level to the single port, it corresponds to another working mode. If there are more than two working modes, the number of ports needs to be increased, so the control efficiency of the traditional decoder is very low.
[0003] There are also some related technologies of interface control in the existing technology, such as patent CN117193128A, which uses pin multiplexing technology to make the circuit have multiple digital interface requirements, and configures the specific functions of the pins through the control interface to cope with a variety of different applications. However, this technology needs to use the chip's own universal serial interface such as I2C (SPI) or private control interface for mode configuration before it can realize multi-mode application. Another example is CN116450028A, which converts analog signals into multi-bit digital signals through clock counting or sampling through the built-in ADC, thereby replacing the traditional decoder to realize multi-mode control. However, this technology often needs to use the internal clock to sample or shape the port, and then convert it into a multi-bit digital signal. There are many internal modules and the implementation is relatively complicated.
[0004] In order to solve the above problem and realize multiple working modes, the number of control ports needs to be increased. The present invention proposes a single-port multi-control mode interface circuit, which can realize the control of multiple working modes using a single port, thereby reducing chip area and port waste. Summary of the invention
[0005] In order to solve the problem in the prior art that it is relatively complicated to realize multi-mode control through a single port, the present invention provides a single-port multi-control mode interface circuit.
[0006] In a first aspect, the present invention provides a single-port multi-control mode interface circuit, comprising:
[0007] Port module: comprising a port and a switch unit, wherein the port is connected to the switch unit, and the switch unit is respectively connected to a pull-up resistor and a pull-down resistor;
[0008] In a first working state of the switch unit, the pull-up resistor is connected to the port, and the pull-down resistor is disconnected from the port;
[0009] In the second working state of the switch unit, the pull-up resistor is disconnected from the port, and the pull-down resistor is connected to the port;
[0010] In a third working state of the switch unit, the pull-up resistor is disconnected from the port, and the pull-down resistor is disconnected from the port;
[0011] At least one group of comparison units, each group of comparison modules includes two comparison modules, the comparison modules include a transistor element, a first MOS tube, a resistive element and an inverter, wherein the first end of the transistor element is electrically connected to the gate of the first MOS tube, the second end of the transistor element is short-circuited with the first end, the third end of the transistor element is connected to the first end of the resistive element, the source electrode of the first MOS tube is connected to the port module, and the drain electrode of the first MOS tube is connected to the input power supply and the inverter;
[0012] In one of the comparison modules, the second end of the transistor element is also connected to an input power supply, and the second end of the resistive element is grounded;
[0013] In another comparison module, the second terminal of the transistor element is also connected to ground, and the second terminal of the resistive element is connected to an input power supply;
[0014] Signal control module: selects an output mode according to the output signals of each comparison module in the comparison module.
[0015] In some embodiments, the transistor element is a second MOS transistor, and the resistive element is a resistor;
[0016] The first end of the transistor element is the gate of the second MOS tube;
[0017] The second end of the transistor element is the drain of the second MOS tube;
[0018] The third terminal of the transistor element is the source of the second MOS tube;
[0019] The first end of the resistive element is the first end of the resistor;
[0020] The second end of the resistive element is the second end of the resistor.
[0021] In some embodiments, the transistor element is a triode, and the resistive element is a resistor;
[0022] The first end of the transistor element is the base of the triode;
[0023] The second end of the transistor element is the transistor collector;
[0024] The third end of the transistor element is the emitter of the triode;
[0025] The first end of the resistive element is the first end of the resistor;
[0026] The second end of the resistive element is the second end of the resistor.
[0027] In some embodiments, the transistor element is a second MOS tube, and the resistive element is a linear MOS tube;
[0028] The resistive element further includes a third end, and the third end of the resistive element is the gate of the linear MOS tube;
[0029] The first end of the transistor element is the gate of the second MOS tube;
[0030] The second end of the transistor element is the source of the second MOS tube;
[0031] The third terminal of the transistor element is the drain of the second MOS tube;
[0032] The first end of the resistive element is the drain of the linear MOS tube;
[0033] The second end of the resistive element is the source of the linear MOS tube.
[0034] In some embodiments, when there is only one group of the comparison unit, it includes a first comparison module and a second comparison module; wherein the resistive element of the first comparison module is a first resistive element, and the resistive element of the second comparison module is a second resistive element;
[0035] If the switch unit is in the first working state, and the resistance of the pull-up resistor is smaller than the resistance of the first resistive element and the second resistive element, the first comparison module and the second comparison module both output a low level, and the signal control module selects the first working mode.
[0036] In some embodiments, if the switch unit is in the second working state and the resistance of the pull-down resistor is less than the resistance of the first resistive element and the second resistive element, the first comparison module and the second comparison module both output a high level, and the signal control module selects the second working mode.
[0037] In some embodiments, if the switch unit is in the second working state, and the first comparison module outputs a low level, and the second comparison module outputs a high level, the signal control module selects the third working mode.
[0038] In some embodiments, when there are two groups of comparison units, they include a first comparison module, a second comparison module, a third comparison module and a fourth comparison module, and the pull-down resistor and the pull-up resistor are variable resistors with adjustable resistance; wherein the first comparison module includes a first resistive element, the second comparison module includes a second resistive element, the third comparison module includes a third resistive element, and the fourth comparison module includes a fourth resistive element;
[0039] The switch unit is in the first working state, if the resistance of the pull-up resistor is greater than the resistance of the first resistive element and the second resistive element, and less than the resistance of the third resistive element and the fourth resistive element, the first comparison module, the second comparison module and the fourth comparison module all output a low level, the third comparison module outputs a high level, and the signal control module selects the fourth working mode;
[0040] If the resistance of the pull-up resistor is smaller than the resistance of the first resistive element, the second resistive element, the third resistive element and the fourth resistive element, the two groups of comparison modules both output low levels, and the signal control module selects the fifth working mode.
[0041] In some embodiments, when the switch unit is in the second working state, if the resistance of the pull-down resistor is greater than the resistance of the first resistive element and the second resistive element, and less than the resistance of the third resistive element and the fourth resistive element, the first comparison module outputs a low level, the second comparison module, the third comparison module and the fourth comparison module all output a high level, and the signal control module selects the sixth working mode;
[0042] If the resistance of the pull-down resistor is smaller than the resistance of the first resistive element, the second resistive element, the third resistive element and the fourth resistive element, the two groups of comparison modules both output a high level, and the signal control module selects the seventh working mode.
[0043] In some embodiments, when the switch unit is in the third working state, the first comparison module and the third comparison module output a low level, the second comparison module and the fourth comparison module output a high level, and the signal control module selects the eighth working mode.
[0044] In order to solve the problem of the complexity of realizing multi-mode control through a single port in the prior art, the present invention has the following advantages:
[0045] Through the technical solution of the present invention, a single port can be used to control more than two working modes, thereby alleviating the increase in the number of ports under multiple working modes. The technology can also be applied to integrated circuits to effectively reduce chip area and port waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 shows a block diagram of the interface circuit;
[0047] Figure 2 shows an expanded schematic diagram of a comparison unit of an interface circuit;
[0048] Figure 3A schematic diagram of the circuit structure of a comparison unit is shown;
[0049] Figure 4 A schematic structural diagram of a first embodiment of a comparison module is shown;
[0050] Figure 5 A schematic structural diagram of a second embodiment of a comparison module is shown;
[0051] Figure 6 A schematic structural diagram of a third embodiment of a comparison module is shown;
[0052] Figure 7 A schematic structural diagram of a fourth embodiment of a comparison module is shown. DETAILED DESCRIPTION
[0053] The present disclosure will now be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thus implement the present disclosure, rather than implying any limitation on the scope of the present disclosure.
[0054] As used herein, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "based at least in part on". The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment". The term "another embodiment" is to be interpreted as "at least one other embodiment". The orientation or position relationship indicated by the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "vertical", "horizontal", "lateral", "longitudinal" and the like is based on the orientation or position relationship shown in the accompanying drawings. These terms are mainly for better describing the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation. In addition, in addition to being used to indicate an orientation or position relationship, some of the above terms may also be used to indicate other meanings, such as the term "upper" may also be used to indicate a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to the specific circumstances. In addition, the terms "install", "set", "provided with", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be an internal connection between two devices, elements or components. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances. In addition, the terms "first", "second", etc. are mainly used to distinguish different devices, elements or components (the specific types and structures may be the same or different), and are not used to indicate or imply the relative importance and quantity of the indicated devices, elements or components. Unless otherwise specified, "plurality" means two or more.
[0055] This embodiment discloses a single-port multi-control mode interface circuit, including:
[0056] Port module: comprising a port and a switch unit, wherein the port is connected to the switch unit, and the switch unit is respectively connected to a pull-up resistor and a pull-down resistor;
[0057] In a first working state of the switch unit, the pull-up resistor is connected to the port, and the pull-down resistor is disconnected from the port;
[0058] In the second working state of the switch unit, the pull-up resistor is disconnected from the port, and the pull-down resistor is connected to the port;
[0059] In a third working state of the switch unit, the pull-up resistor is disconnected from the port, and the pull-down resistor is disconnected from the port;
[0060] At least one group of comparison units, each group of comparison modules includes two comparison modules, the comparison modules include a transistor element, a first MOS tube, a resistive element and an inverter, wherein the first end of the transistor element is electrically connected to the gate of the first MOS tube, the second end of the transistor element is short-circuited with the first end, the third end of the transistor element is connected to the first end of the resistive element, the source of the first MOS tube is connected to the port module, and the drain of the first MOS tube is connected to the first end of the resistive element.
[0061] The input power supply and the inverter are connected in polarity;
[0062] In one of the comparison modules, the second end of the transistor element is also connected to an input power supply, and the second end of the resistive element is grounded;
[0063] In another comparison module, the second terminal of the transistor element is also connected to ground, and the second terminal of the resistive element is connected to an input power supply;
[0064] Signal control module: selects an output mode according to the output signals of each comparison module in the comparison module.
[0065] In this embodiment, a single-port multi-control mode interface circuit is proposed, such as Figure 1 As shown, it includes a port module, at least one group of comparison modules and a signal control module. The port module can be a single-pole double-throw switch, including a port, a switch unit, a pull-up resistor and a pull-down resistor, the pull-up resistor is connected to the input power supply, the pull-down resistor is grounded, and the switch unit corresponds to three working states, namely connected to the pull-up resistor and disconnected from the pull-down resistor, disconnected from the pull-up resistor and connected to the pull-down resistor, and disconnected from the pull-up resistor and disconnected from the pull-down resistor, that is, vacant. The comparison unit appears in groups, there is at least one group of comparison units, one group includes two comparison modules, each comparison module includes a transistor element, a first MOS tube, a resistive element and an inverter. The signal control module can be a decoder, which selects an output mode according to the output signal received from the comparison module.
[0066] Specifically, Figure 3As shown, in a group of comparison units, most of the circuit structures of the two comparison modules are the same, the first end of the transistor element is electrically connected to the gate of the first MOS tube, the second end of the transistor element is short-circuited to the first end, the third end of the transistor element is connected to the first end of the resistive element, the source of the first MOS tube is connected to the port module, and the drain of the first MOS tube is connected to the input power supply and the inverter. The difference is that in one of the comparison modules, the second end of the transistor element is also connected to the input power supply, and the second end of the resistive element is grounded; in the other comparison module, the second end of the transistor element is also grounded, and the second end of the resistive element is connected to the input power supply. Through such a setting, in a group of comparison units, the outputs of the two comparison modules in the first working state and the second working state of the switch unit of the port module can be different, thereby realizing the control of multiple working modes.
[0067] Specifically, when the switch unit is in the third working state, the port module can be regarded as having infinite resistance. By comparing the resistance connected to the port module with the resistance value of the resistive element of the comparison module, the comparison module can output a high level or a low level. According to the same or different high and low levels of each comparison module, the signal control module outputs different working modes.
[0068] Specifically, the switch unit may also be an analog switch chip or a trigger.
[0069] Specifically, the signal control module is preferably a decoder.
[0070] Specifically, the resistive element may be a resistor or a linear MOS tube, and the transistor element may be a MOS tube or a triode.
[0071] Specifically, according to different working states of the port modules, each comparison module outputs a multi-bit control signal, and the signal control module selects an output mode according to the received multi-bit control signal, thereby realizing that one port controls more than two working modes. Figure 2 As shown, the comparison unit is expandable. The more comparison units there are, the more control modes can be realized, which can be set according to requirements.
[0072] In some embodiments, the transistor element is a second MOS transistor, and the resistive element is a resistor;
[0073] The first end of the transistor element is the gate of the second MOS tube;
[0074] The second end of the transistor element is the drain of the second MOS tube;
[0075] The third terminal of the transistor element is the source of the second MOS tube;
[0076] The first end of the resistive element is the first end of the resistor;
[0077] The second end of the resistive element is the second end of the resistor.
[0078] In some embodiments, the transistor element is a triode, and the resistive element is a resistor;
[0079] The first end of the transistor element is the base of the triode;
[0080] The second end of the transistor element is the transistor collector;
[0081] The third end of the transistor element is the emitter of the triode;
[0082] The first end of the resistive element is the first end of the resistor;
[0083] The second end of the resistive element is the second end of the resistor.
[0084] In some embodiments, the transistor element is a second MOS tube, and the resistive element is a linear MOS tube;
[0085] The resistive element further includes a third end, and the third end of the resistive element is the gate of the linear MOS tube;
[0086] The first end of the transistor element is the gate of the second MOS tube;
[0087] The second end of the transistor element is the source of the second MOS tube;
[0088] The third terminal of the transistor element is the drain of the second MOS tube;
[0089] The first end of the resistive element is the drain of the linear MOS tube;
[0090] The second end of the resistive element is the source of the linear MOS tube.
[0091] In this embodiment, the transistor element of the comparison module may be a MOS tube or a triode, and the resistive element may be a resistor or a linear MOS, so that a variety of equivalent circuit combinations can be realized.
[0092] Specifically, Figure 4 As shown, when the transistor element is a second MOS tube and the resistive element is a resistor, the gate of the second MOS tube is connected to the gate of the first MOS tube, and the source and the gate are short-circuited by a wire, the drain is connected to one end of the resistor, the drain of the first MOS tube is connected to the port module, and the source is connected to the input power supply and the inverter. In one comparison module, the source of the second MOS tube is also connected to the access power supply, and the other end of the resistor is grounded; in another comparison module, the source of the second MOS tube is also grounded, and the other end of the resistor is connected to the input power supply.
[0093] Specifically, Figure 5 As shown, when the transistor element is a triode and the resistive element is a resistor, the base of the triode is connected to the gate of the first MOS tube, the collector is short-circuited with the base, the drain is connected to one end of the resistor, the drain of the first MOS tube is connected to the port module, and the source is connected to the input power supply and the inverter. In one comparison module, the collector of the triode is also connected to the access power supply, and the other end of the resistor is grounded; in another comparison module, the collector of the triode is also grounded, and the other end of the resistor is connected to the input power supply.
[0094] Specifically, Figure 6 As shown, the transistor element is a second MOS tube, and the resistive element is a linear MOS tube. The gate of the second MOS tube is connected to the gate of the first MOS tube, and the source and the gate are short-circuited by a wire, the drain is connected to the source of the linear MOS tube, the gate of the linear MOS tube is connected to the gate of the second MOS tube, the drain of the first MOS tube is connected to the port module, and the source is connected to the input power supply and the inverter. In one of the comparison modules, the source of the second MOS tube is also connected to the access power supply, and the drain of the linear MOS tube is grounded; in another comparison module, the source of the second MOS tube is also grounded, and the drain of the linear MOS tube is connected to the input power supply.
[0095] Specifically, Figure 7 As shown, the transistor element and the resistive element can also be replaced as a whole by an inverse MOS tube whose gate width W is smaller than the channel length L.
[0096] Specifically, after the source and gate of the second MOS tube are short-circuited, the MOS tube can be regarded as a circuit structure similar to a diode, and the voltage between the drain and the source is limited to a very small range, usually not exceeding a few volts. This connection method also allows the MOS tube to be used as a voltage limiter in certain circumstances to protect subsequent circuits from being affected by excessive voltage.
[0097] Specifically, when a linear MOS tube is used as a resistive element, the resistance value of the resistor connected to the port module is compared with the resistance value of the linear MOS tube to achieve different output levels of two comparison modules in a group of comparison units.
[0098] Specifically, by equivalently replacing different components of transistor elements and resistive elements, the scalability of the interface circuit can be greatly improved, and corresponding devices can be selected according to accuracy or other requirements, and the cost can be reduced.
[0099] In some embodiments, when there is only one group of the comparison unit, it includes a first comparison module and a second comparison module; wherein the resistive element of the first comparison module is a first resistive element, and the resistive element of the second comparison module is a second resistive element;
[0100] If the switch unit is in the first working state and the value of the pull-up resistor is less than the values of the first resistive element and the second resistive element, both the first comparison module and the second comparison module output a low level, and the signal control module selects the first working mode.
[0101] In some embodiments, if the switch unit is in the second working state and the value of the pull-down resistor is less than the values of the first resistive element and the second resistive element, both the first comparison module and the second comparison module output a high level, and the signal control module selects the second working mode.
[0102] In some embodiments, if the switch unit is in the second working state, the first comparison module outputs a low level, and the second comparison module outputs a high level, the signal control module selects the third working mode.
[0103] In this embodiment, different working modes of the circuit when there is only one set of comparison units are described, and this set of comparison units includes a first comparison module and a second comparison module. The first comparison module and the second comparison module respectively include a first resistive element R1 and a second resistive element R2.
[0104] Specifically, in the interface circuit, the principle of the comparison module outputting high and low levels is as follows: when the switch unit is in the first working state, if the resistance value of the first resistive element R1 is greater than the resistance value of the pull-down resistor Rd, a low level is output; otherwise, a high level is output. When the switch unit is in the second working state, if the resistance value of the second resistive element R2 is greater than the resistance value of the pull-up resistor Ru, a high level is output; otherwise, a low level is output.
[0105] Specifically, when the switch unit is in the third working state, the first comparison module is equivalent to connecting an infinite resistance to the ground, so a low level is output, and the second comparison module is equivalent to connecting an infinite resistance to the input power supply, so a high level is output.
[0106] Specifically, for example: as Figure 2 shown, when the port is connected to the pull-down resistor, if R1 < Rd, the first comparison module outputs a low level 0; while the second comparison module is disconnected from the input power supply and is equivalent to connecting an infinite resistance to the input power supply. Therefore, the resistance of the second comparison module to the input power supply is greater than the pull-down resistor, and a high level 0 is output.
[0107] Specifically, for example: as Figure 2 shown, when the port is connected to the pull-up resistor, if R2 < Ru, the first comparison module outputs a high level 1; the other comparison module is grounded and is equivalent to connecting an infinite resistance. Therefore, the resistance of the second comparison module to the input power supply is greater than the pull-up resistor, and a high level 1 is output.
[0108] Specifically, according to the levels output by two comparison modules in a group of comparison units, the first working mode corresponds to the situation where both output low levels, i.e., 00; the second working mode corresponds to the situation where both output high levels, i.e., 11; and the third working mode corresponds to the situation where the first comparison module outputs a low level and the second comparison module outputs a high level, i.e., 01. As shown in the following table.
[0109]
[0110] In some embodiments, when there are two groups of comparison units, they include a first comparison module, a second comparison module, a third comparison module and a fourth comparison module, and the pull-down resistor and the pull-up resistor are variable resistors with adjustable resistance; wherein the first comparison module includes a first resistive element, the second comparison module includes a second resistive element, the third comparison module includes a third resistive element, and the fourth comparison module includes a fourth resistive element;
[0111] The switch unit is in the first working state, if the resistance of the pull-up resistor is greater than the resistance of the first resistive element and the second resistive element, and less than the resistance of the third resistive element and the fourth resistive element, the first comparison module, the second comparison module and the fourth comparison module all output a low level, the third comparison module outputs a high level, and the signal control module selects the fourth working mode;
[0112] If the resistance of the pull-up resistor is smaller than the resistance of the first resistive element, the second resistive element, the third resistive element and the fourth resistive element, the two groups of comparison modules both output low levels, and the signal control module selects the fifth working mode.
[0113] In some embodiments, when the switch unit is in the second working state, if the resistance of the pull-down resistor is greater than the resistance of the first resistive element and the second resistive element, and less than the resistance of the third resistive element and the fourth resistive element, the first comparison module outputs a low level, the second comparison module, the third comparison module and the fourth comparison module all output a high level, and the signal control module selects the sixth working mode;
[0114] If the resistance of the pull-down resistor is smaller than the resistance of the first resistive element, the second resistive element, the third resistive element and the fourth resistive element, the two groups of comparison modules both output a high level, and the signal control module selects the seventh working mode.
[0115] In some embodiments, when the switch unit is in the third working state, the first comparison module and the third comparison module output a low level, the second comparison module and the fourth comparison module output a high level, and the signal control module selects the eighth working mode.
[0116] In this embodiment, different working modes of the circuit when there are two groups of comparison units are described, namely, a first comparison module, a second comparison module, a third comparison module and a fourth comparison module, which respectively include a first resistive element, a second resistive element, a third resistive element and a fourth resistive element. Different from the case of one group of comparison units, the pull-down resistor and the pull-up resistor are variable resistors with adjustable resistance values.
[0117] Specifically, when there are two groups of comparison units, they correspond to five working modes.
[0118] Specifically, its working principle is the same as that of a group of comparison units. By comparing the resistance value connected to the port module with the resistance value of the resistive element in each comparison module, each comparison module outputs corresponding high and low levels, and the signal control module selects the corresponding working mode according to different levels.
[0119] Specifically, when the switch unit is in the first working state, if the resistance of the pull-up resistor Ru is greater than the resistance of the first and second resistive elements R1 and R2, and less than the resistance of the third and fourth resistive elements R3 and R4, the first comparison module, the second comparison module and the fourth comparison module all output a low level 0, and the third comparison module outputs a high level 1, corresponding to the fourth working mode 0010; if the resistance of the pull-up resistor Ru is less than the resistance of all resistive elements, the two groups of comparison modules both output a low level 0, corresponding to the fifth working mode 0000.
[0120] Specifically, when the switch unit is in the second working state, if the resistance of the pull-down resistor Rd is greater than the resistance of the first resistive element R1 and the second resistive element R2, and less than the resistance of the third resistive element R3 and the fourth resistive element R4, the first comparison module outputs a low level 0, and the second comparison module, the third comparison module and the fourth comparison module all output a high level 1, corresponding to the sixth working mode 0111; if the resistance of the pull-down resistor Rd is less than the resistance of all resistive elements, the two groups of comparison modules both output a high level 1, corresponding to the seventh working mode 1111.
[0121] Specifically, when the switch unit is in the third working state, the first comparison module and the third comparison module output a low level 0, and the second comparison module and the fourth comparison module output a high level 1, corresponding to the eighth working mode 0101, as shown in the following table.
[0122]
[0123] Specifically, the circuit can be further expanded into more groups of comparison units according to requirements.
[0124] In summary, through the above interface circuit, an efficient control method for realizing multiple working modes with a single port can be realized, and no clock or serial interface configuration is required, which is simpler and easier to implement than the existing technology.
[0125] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive in all respects, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.
[0126] In addition, it should be understood that although the present specification is described according to embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation methods that those skilled in the art can understand.
Claims
1. A single-port multi-control mode interface circuit, characterized in that: include: Port module: comprising a port and a switch unit, wherein the port is connected to the switch unit, and the switch unit is respectively connected to a pull-up resistor and a pull-down resistor; In a first working state of the switch unit, the pull-up resistor is connected to the port, and the pull-down resistor is disconnected from the port; In the second working state of the switch unit, the pull-up resistor is disconnected from the port, and the pull-down resistor is connected to the port; In a third working state of the switch unit, the pull-up resistor is disconnected from the port, and the pull-down resistor is disconnected from the port; At least one group of comparison units, each group of comparison modules includes two comparison modules, the comparison modules include a transistor element, a first MOS tube, a resistive element and an inverter, wherein the first end of the transistor element is electrically connected to the gate of the first MOS tube, the second end of the transistor element is short-circuited with the first end, the third end of the transistor element is connected to the first end of the resistive element, the source of the first MOS tube is connected to the port module, and the drain of the first MOS tube is connected to the input power supply and the inverter; In one of the comparison modules, the second end of the transistor element is also connected to an input power supply, and the second end of the resistive element is grounded; In another comparison module, the second terminal of the transistor element is also connected to ground, and the second terminal of the resistive element is connected to an input power supply; Signal control module: selects an output mode according to the output signals of each comparison module in the comparison module.
2. A single-port multi-control mode interface circuit as claimed in claim 1, characterized in that: The transistor element is a second MOS tube, and the resistive element is a resistor; The first end of the transistor element is the gate of the second MOS tube; The second end of the transistor element is the drain of the second MOS tube; The third terminal of the transistor element is the source of the second MOS tube; The first end of the resistive element is the first end of the resistor; The second end of the resistive element is the second end of the resistor.
3. A single-port multi-control mode interface circuit as claimed in claim 1, characterized in that: The transistor element is a triode, and the resistive element is a resistor; The first end of the transistor element is the base of the triode; The second end of the transistor element is the transistor collector; The third end of the transistor element is the emitter of the triode; The first end of the resistive element is the first end of the resistor; The second end of the resistive element is the second end of the resistor.
4. A single-port multi-control mode interface circuit as claimed in claim 1, characterized in that: The transistor element is a second MOS tube, and the resistive element is a linear MOS tube; The resistive element further includes a third end, and the third end of the resistive element is the gate of the linear MOS tube; The first end of the transistor element is the gate of the second MOS tube; The second end of the transistor element is the source of the second MOS tube; The third terminal of the transistor element is the drain of the second MOS tube; The first end of the resistive element is the drain of the linear MOS tube; The second end of the resistive element is the source of the linear MOS tube.
5. The single-port multi-control mode interface circuit according to claim 1, characterized in that: When there is only one group of the comparison unit, it includes a first comparison module and a second comparison module; wherein the resistive element of the first comparison module is a first resistive element, and the resistive element of the second comparison module is a second resistive element; If the switch unit is in the first working state, and the resistance of the pull-up resistor is smaller than the resistance of the first resistive element and the second resistive element, the first comparison module and the second comparison module both output a low level, and the signal control module selects the first working mode.
6. A single-port multi-control mode interface circuit as claimed in claim 5, characterized in that: If the switch unit is in the second working state, and the resistance of the pull-down resistor is smaller than the resistance of the first resistive element and the second resistive element, the first comparison module and the second comparison module both output a high level, and the signal control module selects the second working mode.
7. A single-port multi-control mode interface circuit as claimed in claim 5, characterized in that: If the switch unit is in the second working state, and the first comparison module outputs a low level, and the second comparison module outputs a high level, the signal control module selects the third working mode.
8. The single-port multi-control mode interface circuit according to claim 1, characterized in that: When there are two groups of comparison units, they include a first comparison module, a second comparison module, a third comparison module and a fourth comparison module, and the pull-down resistor and the pull-up resistor are variable resistors with adjustable resistance; wherein the first comparison module includes a first resistive element, the second comparison module includes a second resistive element, the third comparison module includes a third resistive element, and the fourth comparison module includes a fourth resistive element; The switch unit is in the first working state, if the resistance of the pull-up resistor is greater than the resistance of the first resistive element and the second resistive element, and less than the resistance of the third resistive element and the fourth resistive element, the first comparison module, the second comparison module and the fourth comparison module all output a low level, the third comparison module outputs a high level, and the signal control module selects the fourth working mode; If the resistance of the pull-up resistor is smaller than the resistance of the first resistive element, the second resistive element, the third resistive element and the fourth resistive element, the two groups of comparison modules both output low levels, and the signal control module selects the fifth working mode.
9. A single-port multi-control mode interface circuit as claimed in claim 8, characterized in that: When the switch unit is in the second working state, if the resistance of the pull-down resistor is greater than the resistance of the first resistive element and the second resistive element, and less than the resistance of the third resistive element and the fourth resistive element, the first comparison module outputs a low level, the second comparison module, the third comparison module and the fourth comparison module all output a high level, and the signal control module selects the sixth working mode; If the resistance of the pull-down resistor is smaller than the resistance of the first resistive element, the second resistive element, the third resistive element and the fourth resistive element, the two groups of comparison modules both output a high level, and the signal control module selects the seventh working mode.
10. The single-port multi-control mode interface circuit according to claim 8, characterized in that: The switch unit is in the third working state, the first comparison module and the third comparison module output a low level, the second comparison module and the fourth comparison module output a high level, and the signal control module selects the eighth working mode.
Citation Information
Patent Citations
Method and system for configuring multi-bit device address at single port
CN116450028A
System and method for disconnect detection on a dual mode port of a USB hub
CN106104504A
Load insertion detection circuit, system and method
CN110988571A