Disclosure of Invention
The invention aims to solve the problems and provides a method for quickly switching transmission channels on display equipment by different USB host equipment, wherein the switching operation is convenient and quick.
In order to achieve the purpose, the technical scheme of the invention is as follows:
the method for rapidly switching the transmission channel on the display device by different USB host devices comprises the following steps:
s1, connecting two different USB host devices on the display device with PIP or PBP function through a connection interface;
s2, detecting whether a touch condition exists on the display screen of the display device through a touch screen main control chip on the display device; when the touch screen main control chip detects that no touch condition exists on the display screen of the display device, the switching operation is not carried out; when the touch screen main control chip detects that a touch condition exists on the display screen of the display device, performing the next operation;
s3, detecting the coordinates of a touch point on the display screen through a touch screen main control chip on the display device, and transmitting the coordinates of the touch point to a display main control chip in the display device;
s4, after receiving the touch point coordinate, the display main control chip judges which display area of the USB host device the touch point coordinate belongs to;
s5, the display main control chip judges whether the USB host equipment which establishes the transmission channel currently is the same as the USB host equipment which is judged in the step S4; when the two devices are the same USB host, the switching operation is not carried out; when the two devices are different USB host devices, the next operation is carried out;
s6, the main control chip of the display controls the register of the Switch chip through the IIC protocol, and the Switch chip switches the transmission channels of the two USB host devices, so that the USB host device which establishes the transmission channel with the display device is switched to another USB host device, and the switching operation is completed.
Further, the step S4 of determining, by the display main control chip, to which display area of the USB host device the touch point coordinate belongs includes the following steps:
s41, presetting the display range coordinates of the display equipment;
s42, presetting the coordinates of the touch range on the display device;
s43, obtaining the coordinate ratio of the touch range to the display range through the steps S41 and S42;
s44, presetting the diagonal coordinates of the display range of one USB host on the display equipment;
s45, mapping the display range diagonal point coordinates of one USB host device preset in the step S44 according to the coordinate ratio obtained in the step S43 to obtain touch range diagonal point coordinates;
s46, after the display main control chip receives the touch point coordinate transmitted by the touch screen main control chip, judging whether the touch point coordinate is in the rectangular range formed by the touch range diagonal point coordinate obtained in the step S45; when the touch point coordinate is located in a rectangular range formed by the touch range diagonal point coordinate, the touch point belongs to a display area of a preset USB host device; and when the touch point coordinate is positioned outside a rectangular range formed by the touch range and the corner point coordinate, the touch point belongs to the display area of another USB host device.
Furthermore, when the two different USB host devices need to transmit data to each other, the display area of one of the USB host devices is touched first, so that the display device and the USB host device establish a transmission channel, and the data in the USB host device is transmitted to the display device; and then touching the display area of the other USB host device, enabling the display main control chip to control the Switch chip to Switch transmission channels, establishing the transmission channels between the USB host device and the display device, and finally transmitting the data in the display device to the display device.
Furthermore, when the two different USB host devices need to mutually transmit data, and when one of the USB host devices is touched in the display area, the USB host device reads the touch data of the touch screen main control chip, and the control of the display area of the USB host device is realized.
Furthermore, the Switch chip may be connected to a USB Hub chip or a USB device through a line, and the USB Hub chip is connected to a plurality of connection interfaces.
Further, the model of the touch screen main control chip is SW 4101C.
Further, the model of the display main control chip is RTD 2797.
Further, the model of the Switch chip is SGM 7229.
Furthermore, the USB Hub chip is in a model number of FE8.1-FSOP 16A.
Compared with the prior art, the invention has the advantages and positive effects that:
according to the invention, people can simultaneously connect two USB host devices to the display device, so that the display images of the two USB host devices are simultaneously displayed on the display device, when different transmission channels need to be switched, the transmission channels between the two USB host devices and the display device can be switched through the Switch chip only by touching the display image of the USB host device to be connected on the touch screen of the display device, the operation is simpler and faster, and convenience is brought to the use of people.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments of the present invention by a person skilled in the art without any creative effort, should be included in the protection scope of the present invention.
The invention discloses a method for rapidly switching transmission channels of different USB host devices on a display device, wherein the connecting structure of the USB host devices and the display device is shown in figures 2 and 3, two different USB host devices are connected with a display main control chip of the display device through a connecting interface, the display main control chip is connected with a touch screen main control chip, and data signal ends of the two different USB host devices are connected with a Switch chip; in fig. 2, the computer and the mobile device are used simultaneously, the computer and the mobile device are simultaneously connected to the display device, PIP/PBP display is performed, and the USB channel of the USB host device is switched by touch, so that data can be transmitted between different systems of different devices. In fig. 3, two computers are used simultaneously, the two computers are simultaneously connected to the display device, PIP/PBP display is performed, and the USB channel of the USB host device is switched by touch, so that mutual data transmission between different devices is realized.
In fig. 2 and 3, PIP/PBP indicates a picture-in-picture. Generally, a display only displays one frame, and a display supporting picture-in-picture can support two frames, a main frame and a sub frame, to be displayed simultaneously. The PIP sprite is superimposed on top of the main picture. The PBP lower display screen can be divided into two parts, and one side displays one picture.
Source denotes a signal Source, and herein refers to a device capable of inputting a signal Source supported by a display, such as VGA DVIHDMI DP TypeC;
the USB Storage represents USB host equipment, such as a memory card and a USB flash disk;
the USB storage Host represents a Host of USB Host equipment, for example, a USB flash disk is inserted into a computer, the computer is the Host of the USB flash disk, and the USB flash disk is inserted into a mobile phone, and the mobile phone is the Host of the USB flash disk;
the touch panel represents a touch screen, and like a mobile phone, a display also uses the touch screen;
the touch IC represents a touch screen main control chip, and when the screen is touched, the chip informs the display main control chip of the coordinates of the point touched on the screen, for example: the left-most to right-most coordinates of the currently used touch panel are from 0 to 4094, and the top-most to bottom coordinates are also from 0 to 4094. when touching the middle of the screen, the chip tells the display that the touch coordinates are (2047);
a touch indicates touching the touch screen, at which time the touch screen touch IC will return the coordinates of the touch.
RTD2797 indicates the model of the display main control chip.
USB represents the USB of a computer, and the typeC signal contains the USB signal, such as a mobile phone with a typeC interface and a computer, which can be used as a USB flash disk.
The USB Hub refers to a device that can extend one USB interface to a plurality of interfaces and can make the interfaces used simultaneously.
The Switch chip is used when being used as a switching channel, the two USB simultaneously receive the Switch chip, the Switch chip can be controlled to allow the USB channel, the Switch chip is used for controlling two USB signals to enter the Switch chip, the Switch chip is switched to allow which USB channel to be opened, the display main control chip can control a register of the Switch chip through an IIC protocol, the channel is switched, and the USB channel is enabled to be acted.
As shown in fig. 1, the specific operation steps of the present invention are:
s1, connecting two different USB host devices on the display device with PIP or PBB function through a connection interface; the display device is provided with a touch screen main control chip, a display main control chip, a Switch chip and a USB Hub chip (optional); the model of the touch screen main control chip is SW 4101C; the model of the display main control chip is RTD 2797; the model of the Switch chip is SGM 7229; the USB Hub chip is of a model number FE8.1-FSOP 16A.
The USB Hub chip is connected with a plurality of connection interfaces which can be used for connecting other devices.
S2, detecting whether a touch condition exists on the display screen of the display device through a touch screen main control chip on the display device; when the touch screen main control chip detects that no touch condition exists on the display screen of the display device, the switching operation is not carried out; when the touch screen main control chip detects that a touch condition exists on the display screen of the display device, performing the next operation;
s3, detecting the coordinates of a touch point on the display screen through a touch screen main control chip on the display device, and transmitting the coordinates of the touch point to a display main control chip in the display device;
s4, after receiving the touch point coordinate, the display main control chip judges which display area of the USB host device the touch point coordinate belongs to;
s5, the display main control chip judges whether the USB host equipment which establishes the transmission channel currently is the same as the USB host equipment which is judged in the step S4; when the two devices are the same USB host device, the switching operation is not carried out; when the USB host equipment and the USB host equipment are not the same, carrying out the next operation;
s6, the main control chip of the display controls the register of the Switch chip through the IC protocol, and the Switch chip switches the transmission channels of the two USB host devices, so that the USB host device which establishes the transmission channel with the display device is switched to another USB host device, and the switching operation is completed.
Each loop of the program reads the coordinates returned by the touch IC and judges whether the user has touch action; if the user touches, judging whether the touch is in the area displayed by the same USB host equipment as the last touch; if the two types of the USB host equipment are different, switching the transmission channel to the USB host equipment in the touch area, and if the two types of the USB host equipment are the same, not switching.
As shown in fig. 4, the step of determining which display area of the USB host device the touch point coordinate belongs to by the display main control chip includes the following steps:
(1) the coordinate range of the touch of the Display is touch _ X and touch _ Y, the corresponding ranges are (0-4094), the Display ranges of the Display are Display _ X and Display _ Y, the ranges are Display _ X (0-3840) and Display _ Y (0-2160); (the touch coordinate is more accurate if the range of the touch coordinate is larger and more accurate if the range of the touch coordinate is smaller, and if the range of the touch coordinate is smaller, the touch coordinate can not be reflected by a small distance by sliding a finger, so that the touch coordinate is larger than the displayed coordinate in general.)
(2) The above assumptions result in that the ratio of the touch and display ranges is X _ ratio 4094/3840-1.066, V _ ratio 4094/2160-1.895;
(3) setting the main picture as Source1 and the Sub picture as Source2, and setting the width and height of the Source2 picture in the display range as Sub _ H and Sub _ V; the Source2 pictures have the respective diagonal points A, B, and the position a display is known and adjustable, set to Sub _ X, Sub _ Y, also within the display range;
(4) it can be derived that the display range of the source2 is a rectangular range from A to B, and the positions are A (SubX, SubY), B (SubX + SubH, SubY + SubV), respectively;
(5) the mapping of the corresponding A, B point to touch coordinates ranges from a _ touch (Sub _ X _ ratio, Sub _ Y _ V _ ratio), B _ touch ((Sub _ X + Sub _ H) × ratio, (Sub _ Y + Sub _ V) × V _ ratio);
(6) the touch range coordinate of the rectangle where the source2 is located is obtained through the above description, and the touch point coordinate is returned to the display main control chip by the touch IC when the touch is performed; if the touch point coordinates are within the A _ touch and B _ touch rectangle ranges, the touch is said to occur within the source source2 range, otherwise the touch is said to occur outside the source2 (i.e., within the source1 range);
(7) the display main control chip controls the Switch chip to Switch according to the touch coordinate, if the touch point coordinate is located in the range from A _ touch to B _ touch rectangle, the USB host equipment is switched to the USB host equipment of source2, and at the moment, the USB host equipment of source2 can access the data in the display equipment; if the touch occurs outside the rectangular range of the A-touch and the B-touch, the USB host device is switched to the host of the Source1, and the host of the Source1 can access the data in the memory chip of the display device.
Assuming that the host of the Source1 is a computer and the host of the Source2 is a mobile phone, when a user needs to display the computer and the mobile phone pictures at the same time and needs to store the mobile phone data in the computer, the user can touch the mobile phone picture Source2 first, at the moment, the mobile phone identifies the storage chip of the display device, then the mobile phone data is stored in the storage chip, and then touch the PC picture Source1, at the moment, the computer identifies the storage chip of the display device, and the data is copied from the storage chip and stored in the computer.
The touch screen main control chip (model number is SW4101C) has two channels for transmitting data, one is to transmit the touch coordinate to the display main control chip when touching through a serial port, and the other is to transmit the touch data to the USB host device through USB to realize the control of the USB host device. (Explanation: mouse-like action)
When the display area of the USB host equipment is touched, the USB host equipment reads the touch data of the touch chip, and the current display area is controlled through touch.
The coordinate mapping of the touch chip to the USB host device is completed by the touch chip.
Application scenarios: PIP/PBP (for example, FIG. 4), source1 is a computer, source2 is a mobile phone, and when a touch occurs in source1 area, the touch can complete the control of your computer, and when a touch occurs in source2 area, the touch can complete the control of your mobile phone.
According to the invention, people can simultaneously connect two USB host devices to the display device, so that the display images of the two USB host devices are simultaneously displayed on the display device, when different transmission channels need to be switched, the transmission channels between the two USB host devices and the display device can be switched through the Switch chip only by touching the display image of the USB host device to be connected on the touch screen of the display device, the operation is simpler and faster, and convenience is brought to the use of people.