Disclosure of Invention
The application provides an interface circuit, an interface switching method, display equipment and a data transmission system, which can solve the problem that the HDMI of the related technology has single function. The technical scheme is as follows:
In one aspect, an interface circuit is provided, the interface circuit comprises a main control circuit, a first switch circuit, a second switch circuit and a high definition multimedia interface HDMI, wherein the HDMI comprises a hot plug detection pin;
the configuration end of the main control circuit is respectively connected with the first end of the first switch circuit and the first end of the second switch circuit, the control end of the main control circuit is connected with the second end of the second switch circuit, and the second end of the first switch circuit and the third end of the second switch circuit are both connected with the hot plug detection pin;
the main control circuit is used for outputting a first level signal through the configuration terminal and controlling the first terminal and the third terminal of the second switching circuit to be conducted if the data are received through the HDMI, and controlling the first terminal and the third terminal of the second switching circuit to be disconnected if the data are output through the HDMI;
the first switch circuit is used for outputting a third level signal through a first end of the first switch circuit if the second level signal is received through a second end of the first switch circuit, and outputting a fourth level signal through the first end of the first switch circuit if the fourth level signal is received through the second end of the first switch circuit;
Wherein the first level signal, the second level signal, and the third level signal are all high level signals relative to the fourth level signal.
On the other hand, an interface switching method is provided, which is applied to a main control circuit in an interface circuit, the interface circuit further comprises a first switch circuit, a second switch circuit and a high-definition multimedia interface HDMI, the HDMI comprises a hot plug detection pin, a configuration end of the main control circuit is respectively connected with a first end of the first switch circuit and a first end of the second switch circuit, a control end of the main control circuit is connected with a second end of the second switch circuit, a second end of the first switch circuit and a third end of the second switch circuit are both connected with the hot plug detection pin, the first switch circuit is used for outputting a third level signal through the first end if receiving a second level signal through the second end of the first switch circuit, and outputting a fourth level signal through the first end of the second switch circuit if receiving the fourth level signal through the second end of the first switch circuit, and the method comprises the steps of:
if the HDMI is used for receiving data, a first level signal is output through the configuration end, and the first end and the third end of the second switch circuit are controlled to be conducted;
if the data is output through the HDMI, the first end and the third end of the second switching circuit are controlled to be disconnected;
Wherein the first level signal, the second level signal, and the third level signal are all high level signals relative to the fourth level signal.
In yet another aspect, an interface switching apparatus is provided, the interface switching apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the interface switching method as described in the above aspect when executing the computer program.
In yet another aspect, a computer readable storage medium having a computer program stored therein is provided, the computer program being loaded and executed by a processor to implement the interface switching method as described in the above aspect.
In yet another aspect, a computer program product is provided comprising instructions which, when run on the computer, cause the computer to perform the interface switching method of the above aspect.
In yet another aspect, a display device is provided that includes a display panel and an interface circuit as described in the above aspects.
In yet another aspect, a data transmission system is provided, the system comprising an external device, and a display device as described in the above aspect.
The technical scheme provided by the application has the beneficial effects that at least:
The application provides an interface circuit, an interface switching method, a display device and a data transmission system, wherein a main control circuit in the interface circuit can output a first level signal through a configuration end and control a first end and a third end of a second switch circuit to be conducted, so that HDMI can be used as an input interface to receive data. The first switch circuit in the interface circuit is capable of outputting a third level signal through the first terminal thereof after receiving the second level signal through the second terminal thereof, thereby enabling the HDMI to output data as an output interface. Therefore, the HDMI in the interface circuit provided by the embodiment of the application can not only receive data, but also output data, and the function of the HDMI is rich.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
The embodiment of the application provides an interface circuit, which comprises a main control circuit 01, a first switch circuit 02, a second switch circuit 03 and an HDMI 04, see FIG. 1. The HDMI 04 includes a Hot Plug Detect (HPD) pin, and the HDMI 04 is used for connecting with an external device.
As can be seen from fig. 1, the configuration (SET) terminal of the master circuit 01 is connected to the first terminal of the first switching circuit 02 and the first terminal of the second switching circuit 03, respectively. The control (EN 1) terminal of the master circuit 01 is connected to the second terminal of the second switch circuit 03. The second end of the first switch circuit 02 and the third end of the second switch circuit 03 are both connected with a hot plug detection pin of the HDMI 04.
It can be understood that, if the main control circuit 01 needs to receive data through the HDMI04, that is, needs to use the HDMI04 as an input interface of the data, the main control circuit 01 needs to output a high-level signal to the external device through a hot plug detection pin of the HDMI04 after detecting that the HDMI04 is connected with the external device, so that the external device sends the data to the HDMI04 after receiving the high-level signal.
If the main control circuit 01 needs to output data through the HDMI 04, that is, needs the HDMI 04 as an output interface, the main control circuit 01 needs to detect the level signal received by the hot plug detection pin, so as to determine whether the data can be sent to an external device connected to the HDMI 04.
The data may include audio data and/or video data. If the main control circuit 01 in the interface circuit receives data through the HDMI 04, the interface device to which the interface circuit belongs may be used as a data terminal for receiving data. Correspondingly, the external device connected with the HDMI 04 can be used as a data source end for outputting data. If the main control circuit 01 in the interface circuit outputs data through the HDMI 04, the interface device to which the interface circuit belongs may be used as a data source terminal for outputting the data. Accordingly, the external device connected to the HDMI 04 may be used as a data terminal for receiving data. Alternatively, the interface device may be one of a display device, a server, and a television box. For example, the interface device may be a display device.
In the embodiment of the present application, if the main control circuit 01 needs to receive data through the HDMI 04, the first level signal can be output through the configuration terminal, and the first terminal and the third terminal of the second switch circuit 03 are controlled to be turned on. Thus, the first level signal output by the configuration terminal can be transmitted to the hot plug detection pin of the HDMI 04 through the second switch circuit 03. If the main control circuit 01 needs to output data through the HDMI 04, the first end and the third end of the second switch circuit 03 can be controlled to be disconnected, so as to avoid signal interference caused by the transmission of the third level signal output by the first switch circuit 02 to the hot plug detection pin through the second switch circuit 03.
The first switching circuit 02 can be used to output a third level signal via its first terminal if the second level signal is received via its second terminal and to output a fourth level signal via its first terminal if the fourth level signal is received via its second terminal. The first level signal, the second level signal and the third level signal are all high level signals relative to the fourth level signal.
Based on the above analysis, in the case where the main control circuit 01 needs to receive data through the HDMI04, that is, the HDMI04 is required as an input interface, the main control circuit 01 can output a first level signal (i.e., a high level signal) to the hot plug detection pin of the HDMI04 through the second switch circuit 03, so that an external device connected to the HDMI04 can receive the first level signal, and then send data to the HDMI 04.
In the case where the main control circuit 01 needs to output data through the HDMI 04, that is, the HDMI 04 is required as an output interface, since the first switch circuit 02 can output the third level signal (also one high level signal) to the main control circuit 01 after receiving the second level signal (i.e., the high level signal) from the hot plug detection pin and can output the low level signal when the hot plug detection pin outputs the low level signal, it can be ensured that the main control circuit 01 can detect the level signal received from the hot plug detection pin and output data through the HDMI 04 after determining that the hot plug detection pin receives the high level signal.
In summary, the embodiment of the present application provides an interface circuit, in which a main control circuit can output a first level signal through a configuration terminal and control a first terminal and a third terminal of a second switch circuit to be conducted, so that HDMI can be used as an input interface to receive data. The first switch circuit in the interface circuit is capable of outputting a third level signal through the first terminal thereof after receiving the second level signal through the second terminal thereof, thereby enabling the HDMI to output data as an output interface. Therefore, the HDMI in the interface circuit provided by the embodiment of the application can not only receive data, but also output data, and the function of the HDMI is rich.
Alternatively, the level values of the first level signal and the second level signal may be the same or different.
Fig. 2 is a schematic diagram of another interface circuit according to an embodiment of the present application. As can be seen from fig. 2, the interface circuit may further comprise a third switching circuit 05. The control terminal of the master control circuit 01 may also be connected to the first terminal of the third switching circuit 05. A second end of the third switch circuit 05 may be connected to the second end of the first switch circuit 02, and a third end of the third switch circuit 05 may be connected to the hot plug pin 041 of the HDMI 04.
The master circuit 01 may also be configured to control the second terminal and the third terminal of the third switching circuit 05 to be disconnected if data is received through the HDMI 04, and to control the second terminal and the third terminal of the third switching circuit 05 to be connected if data is output through the HDMI 04. In this way, when the HDMI 04 is used as the input interface, the high level signal output by the configuration end of the master control circuit 01 triggers the first end of the first switch circuit 02 to output the high level signal, thereby affecting the judgment of the master control circuit 01, and avoiding interference to the master control circuit 01.
In an embodiment of the present application, the second switch circuit 03 may be configured to control the first terminal to be connected to the third terminal if the first switch signal is received through the second terminal, and to control the first terminal to be disconnected from the third terminal if the second switch signal is received through the second terminal. The third switching circuit 05 may be configured to control the second terminal to be disconnected from the third terminal if the first switching signal is received through the first terminal, and to control the second terminal to be connected to the third terminal if the second switching signal is received through the first terminal.
Based on this, the master circuit 01 may be configured to output the first switching signal through the control terminal to turn on the first terminal and the third terminal of the second switching circuit 03 and turn off the second terminal and the third terminal of the third switching circuit 05 if the data is received through the HDMI, and output the second switching signal through the control terminal to turn off the first terminal and the third terminal of the second switching circuit 03 and turn on the second terminal and the third terminal of the third switching circuit 05 if the data is output through the HDMI.
Alternatively, the first switching signal may be a low level signal with respect to the second switching signal.
Fig. 3 is a schematic structural diagram of another interface circuit according to an embodiment of the present application. As can be seen from fig. 3, the HDMI 04 may also include a power pin (i.e., the +5v pin in fig. 3). The interface circuit may also include a fourth circuit 06.
As can be seen from fig. 3, the control terminal of the master circuit 01 may also be connected to a first terminal of a fourth switch circuit 06, a second terminal of the fourth switch circuit 06 may be connected to the first power terminal VDD1, and a third terminal of the fourth switch circuit may be connected to a power pin of the HDMI 04. The first power supply terminal VDD1 may be a power supply terminal of the interface device.
In the embodiment of the present application, if the interface device is used as a data terminal, that is, the main control circuit 01 needs to receive data through the HDMI 04, the data source may supply power to the display device through the HDMI 04. If the interface device is used as a data source, that is, the main control circuit 01 needs to output data through the HDMI 04, the interface device needs to supply power to the data terminal through the HDMI 04.
Based on this, the master circuit 01 may also be used for controlling the second terminal and the third terminal of the fourth switch circuit 06 to be disconnected if the data is received through the HDMI 04, and controlling the second terminal and the third terminal of the fourth switch circuit to be connected to enable the first power terminal VDD1 to output the power signal to the power pin 042 if the data is output through the HDMI 04.
In this embodiment, the fourth circuit 06 may be configured to control the second terminal to be disconnected from the third terminal if the first switching signal is received through the first terminal, and to control the second terminal to be connected to the third terminal if the second switching signal is received through the first terminal.
Based on this, the master circuit 01 may also be configured to output a first switching signal to the first terminal of the fourth switching circuit 06 through the control terminal to disconnect the second terminal from the third terminal if data is received through the HDMI 04, and output a second switching signal to the first terminal of the fourth switching circuit 06 through the control terminal to disconnect the second terminal of the fourth switching circuit 06 from the third terminal if data is output through the HDMI 04.
Fig. 4 is a schematic diagram of yet another interface circuit according to an embodiment of the present application. As can be seen from fig. 4, the third terminal of the first switching circuit 02 may be connected to the second power supply terminal VDD 2. The first switch circuit 02 is configured to control the first terminal to be turned on to the third terminal if the second level signal is received through the second terminal, and to control the first terminal to be turned off to the third terminal if the fourth level signal is received through the second terminal. The second power supply terminal is used for providing a third level signal.
With continued reference to fig. 4, the master circuit 01 may be a master chip, for example, a micro control unit (microcontroller unit, MCU). The first switch circuit 02, the second switch circuit 03, and the third switch circuit 05 may each be a logic gate chip, and the fourth switch circuit 06 may be a voltage conversion chip. And as can be seen from fig. 4, the first switching circuit 02 may further include a Ground (GND) terminal, which is grounded. The second switching circuit 03 may further include a first power-on terminal (i.e., VCC terminal shown in fig. 4) and a ground terminal. The first power-on terminal is connected to the second power terminal VDD2, and the ground terminal is grounded. The third switching circuit 05 may further include a second power-on terminal and a ground terminal. The second power-on terminal is connected with the second power supply terminal VDD2, and the ground terminal is grounded. The fourth circuit 06 may further comprise a ground terminal, which is grounded.
It can be understood that, after the second end of the fourth switch circuit 06 is turned on with the third end, the level signal output by the third end may be the level signal input by the second end.
Optionally, as shown in fig. 4, the interface circuit may further include first to fourth capacitors C1 to C4 and first to fourth resistors R1 to R4. The first end of the first capacitor C1 is connected to the power pin of the HDMI 04, and the second end of the first capacitor C1 is grounded. The first end of the second capacitor C2 is connected to the first power supply terminal VDD1, and the second end of the second capacitor C2 is grounded. The first end of the third capacitor C3 is connected to the first power-on end of the second switch circuit 03, and the second end of the third capacitor C3 is grounded. The first end of the fourth capacitor C4 is connected to the third end of the first switching circuit 02, and the second end of the fourth capacitor C4 is grounded. The first end of the fifth capacitor C5 is connected to the second power-on end of the third switch circuit 05, and the second end of the fifth capacitor C5 is grounded.
The first end of the first resistor R1 is connected to the configuration end of the master control circuit 01, and the second end of the first resistor R1 is connected to the first end of the first switch circuit 02. The first end of the second resistor R2 is connected to the hot plug detection pin of the HDMI 04, and the second end of the second resistor R2 is connected to the ground end of the second switch circuit 03. The first end of the third resistor R3 is connected to the hot plug detection pin of the HDMI 04, and the second end of the third resistor R3 is connected to the third end of the second switch circuit 03. The first end of the fourth resistor R4 is connected with the configuration end of the main control circuit 01, and the second end of the fourth resistor R4 is grounded.
As can also be seen in fig. 4, HDMI 04 may also include a plurality of ground pins, serial data (SERIAL DATA, SDA) pins, serial Clock (SCL) pins, reserved pins, optional electronic consumer controller (consumer electronics control, CEC) pins, clock (CLK) positive (P) signal pins, clock mask (shielded, S) pins, clock negative (N) signal pins, zero set of data transfer pins, one set of data transfer pins, and two sets of data transfer pins.
Wherein, each of the zero group data transmission pins to the two groups of data transmission pins comprises a data (D) positive signal transmission pin (also called a D+ pin), a data negative signal transmission pin (also called a D-pin) and a data shielding pin.
And, as shown in fig. 4, the SDA pin, the SCL pin, the clock positive signal pin, the clock negative signal pin, the data positive signal transmission pin and the data negative signal transmission pin in the zero group of data transmission pins, the data positive signal transmission pin and the data negative signal transmission pin in the one group of data transmission pins, and the data positive signal transmission pin and the data negative signal transmission pin in the two groups of data transmission pins are all connected with the master control circuit 01. Each of the ground pins, the clock mask pins, and each of the data mask pins are grounded.
In the embodiment of the present application, when the interface device to which the interface circuit belongs is used as the data source end, if the configuration end of the main control circuit 01 receives the high-level signal output from the first switch circuit 02 and the data includes video data, the interface device can read the external display device identification data (extended display identification data, EDID) of the data terminal (i.e. the external device), where the EDID at least includes the resolution of the data terminal. The interface device may then send video data to the data terminal that is adapted to the resolution of the data terminal.
It will be appreciated that referring to fig. 5, the interface device 110 may establish a communication connection with the control device 120. The control device 120 may send the role setting information for the HDMI 04 to the interface device 110, and the main control circuit 01 in the interface device may determine the role of the HDMI 04 based on the role setting information, and then control whether the configuration terminal outputs the first level signal based on the role of the HDMI 04, and control the on state of the second switching circuit 03. The role of HDMI 04 may be one of an input interface and an output interface.
Alternatively, the control device may be a mobile terminal or a remote control device, etc. The mobile terminal may be a cell phone, tablet computer or a wearable device. The remote control device may be a remote control. The communication connection may be a bluetooth connection, or an infrared connection.
For example, assuming that the control device is a mobile terminal (e.g., a mobile phone), referring to fig. 6, after the mobile terminal establishes a communication connection with the interface device, a character setting interface may be displayed. As can be seen from fig. 6, the character setting interface may include a data source option a and a data terminal option b.
With continued reference to fig. 6, when the user selects the data source option a, the mobile terminal may determine that the interface device needs to be the data source in response to a selection operation of the user with respect to the data source option a, and may then transmit role setting information for indicating HDMI of the interface device as an output interface to the interface device. Correspondingly, after receiving the role setting information, the interface device can determine the role of the HDMI.
It will be appreciated that for the case where the interface device is a display device, the interface device may display multiple alternative roles of HDMI 04. The plurality of alternative roles includes an input interface and an output interface. Then, the interface device may determine the target character as a character of HDMI 04 in response to a selection operation for the target character among the plurality of candidate characters.
For example, referring to FIG. 7, the interface device may display its menu bar including HDMI character setting option c. The interface device may display a data source option c1 corresponding to the output interface and a data terminal option c2 corresponding to the input interface in response to a touch operation for the HDMI character setting option c.
The user selects the data terminal option c2, and the interface device may determine HDMI as an input interface, i.e., the interface device as a data terminal, in response to a selection operation of the user with respect to the data terminal option c 2.
In summary, the embodiment of the present application provides an interface circuit, in which a main control circuit can output a first level signal through a configuration terminal and control a first terminal and a third terminal of a second switch circuit to be conducted, so that HDMI can be used as an input interface to receive data. The first switch circuit in the interface circuit is capable of outputting a third level signal through the first terminal thereof after receiving the second level signal through the second terminal thereof, thereby enabling the HDMI to output data as an output interface. Therefore, the HDMI in the interface circuit provided by the embodiment of the application can not only receive data, but also output data, and the function of the HDMI is rich.
Fig. 8 is a flowchart of an interface switching method according to an embodiment of the present application, where the method may be applied to a master control circuit in an interface circuit according to the above embodiment. Referring to fig. 8, the method includes:
Step 101, if the data is received through HDMI, a first level signal is output through the configuration terminal, and the first terminal and the third terminal of the second switch circuit are controlled to be turned on.
If the main control circuit needs to receive data through the HDMI, namely the HDMI is needed to be used as an input interface, the main control circuit needs to output a high-level signal to the external device through a hot plug detection pin of the HDMI after detecting that the HDMI is connected with the external device, so that the external device can send data to the display device after receiving the high-level signal.
Therefore, if the main control circuit needs to receive data through the HDMI, the first level signal may be output through the configuration terminal, and the first terminal and the third terminal of the second switching circuit may be controlled to be turned on, so that the first level signal (i.e., the high level signal) is transmitted to the hot plug detection pin of the HDMI through the second switching circuit, and then is transmitted to the external device.
Step 102, if the data is outputted via HDMI, the first terminal and the third terminal of the second switch circuit are controlled to be disconnected.
If the main control circuit outputs data through the HDMI, that is, the HDMI is needed as an output interface, the main control circuit needs to detect the level signal received by the hot plug detection pin so as to determine whether the data can be sent to an external device connected with the HDMI.
Since the first switch circuit is capable of outputting the third level signal (also the high level signal) through the first terminal thereof when the second level signal (i.e., the high level signal) is received through the second terminal thereof, and outputting the fourth level signal through the first terminal thereof after the fourth level signal (i.e., the low level signal) is received through the second terminal thereof, it is possible to ensure that the main control circuit is capable of detecting the level signal received from the hot plug detection pin, and outputting data through the HDMI 04 after determining that the hot plug detection pin receives the high level signal.
And if the first end of the second switch circuit is conducted with the third end, the third level signal output by the first switch circuit is output to the hot plug detection pin through the second switch circuit, so that signal interference is caused, and the main control circuit can control the first end of the second switch circuit to be disconnected with the third end, so that signal interference is avoided.
In summary, the embodiment of the application provides an interface switching method, which can output a first level signal through a configuration terminal and control the first terminal and the third terminal of the second switch circuit to be conducted when the main control circuit receives data through the HDMI, so that the HDMI can receive data as an input interface. The first switch circuit is capable of outputting a third level signal through its first terminal after receiving the second level signal through its second terminal, thereby enabling the HDMI to output data as an output interface. Therefore, the method provided by the embodiment of the application can enable the HDMI to not only receive data, but also output data, thereby enriching the functions of the HDMI.
The embodiment of the application provides an interface switching device, which may include a memory, a processor and a computer program stored in the memory and capable of running on the processor, where the processor executes the computer program to implement the interface switching method provided in the above embodiment, for example, the method shown in fig. 8.
An embodiment of the present application provides a computer-readable storage medium in which a computer program is stored, the computer program being loaded by a processor and executing the interface switching method provided in the above embodiment, for example, the method shown in fig. 8.
The embodiment of the application also provides a computer program product containing instructions, which when run on a computer, cause the computer to execute the interface switching method provided by the above method embodiment, for example, the method shown in fig. 8.
Embodiments of the present application provide a display device, see FIG. 9, the display device 110 may include a display panel 1101 and an interface circuit 1102. The interface circuit 1102 may be an interface circuit provided in the above embodiments, for example, an interface circuit as shown in any one of fig. 1 to 4.
Alternatively, the display device may be a medical display. The display device may include one or more interface circuits. For example, if the display device is to be a data terminal or a data source, at least one interface circuit may be included. If the display device is to be used as both a data source and a data terminal, it may include a plurality of interface circuits.
Because the HDMI in the interface circuit can be used as an input interface to receive data and can also be used as an output interface to output data, the display device can be switched between a data source end and a data terminal through one interface circuit, and an interface for receiving the data and an interface for outputting the data are not required to be arranged for the display device, so that the manufacturing cost of the display device can be reduced.
Also, for a display device having a size smaller than the size threshold, that is, a small-sized display device, the small-sized display device may be enabled to be connected to more data sources (or data terminals) when being a data terminal (or data source). Wherein the size threshold may be 10 inches.
The embodiment of the application also provides a data transmission system, referring to fig. 10, which comprises a display device 110 and an external device 130. The display device 110 is connected to an external device 130. The display device 110 may include the interface circuit provided in the above embodiment, for example, the interface circuit shown in fig. 4.
Alternatively, the external device 130 may be one of a television box, a display device, and a server.
It can be understood that, if the external device 130 is a display device (for convenience of distinction, the display device is referred to as a first display device), and the display device including the interface circuit provided in the embodiment of the present application (for convenience of distinction, the display device provided in the embodiment of the present application is referred to as a second display device) is used as a data terminal, the content displayed by the second display device may be the same as the content displayed by the first display device.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
It should be understood that references herein to "and/or" means that there may be three relationships, e.g., A and/or B, and that there may be three cases where A alone exists, while A and B exist, and B alone exists. The character "/" generally indicates that the context-dependent object is an "or" relationship. Also, the meaning of the term "at least one" in the present application means one or more, and the meaning of the term "plurality" in the present application means two or more.
The terms "first," "second," and the like in this disclosure are used for distinguishing between similar elements or items having substantially the same function and function, and it should be understood that there is no logical or chronological dependency between the terms "first," "second," and "n," and that there is no limitation on the amount and order of execution. For example, a first switching circuit may be referred to as a second switching circuit, and similarly, a second switching circuit may be referred to as a first switching circuit, without departing from the scope of the various described examples.
The foregoing description of the exemplary embodiments of the application is not intended to limit the application to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the application.