An apparatus for simulating the sending of touch signals by a HY46xx series touch screen chip
By simulating the signal conversion of the HY46xx series touch screen chip using a signal conversion device, the problem of low efficiency in manual operation was solved, and computer command control of touch screen operation was realized, improving testing efficiency and equipment applicability.
Patent Information
- Application Number
- CN202510719650.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-05-30
AI Technical Summary
In existing technologies, manual clicking or swiping operations are required at specific locations on the touchscreen to test whether the UI switching function is working properly, and control commands need to be issued from the host computer to control multiple production devices, resulting in low testing efficiency.
The signal conversion device, which uses the HY46xx series touch screen chip as an analog, includes a signal input module, a signal processing module, and a signal output module. It uses the main control chip to receive and parse serial port data, and simulates touch function through the IIC communication protocol to realize the connection and control between the computer or embedded device and the touch screen host.
It reduces repetitive manual operations, improves testing efficiency, can simulate various touchscreen control signals, and expands the application scope of signal conversion equipment.
Smart Images

Figure CN120653502B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial production control and dynamic detection technology, specifically to a device that simulates the transmission of touch signals by a HY46xx series touch screen chip. Background Technology
[0002] A touchscreen is a device that can detect and locate touches from a user's finger or a stylus, allowing users to interact with electronic devices by directly touching the screen. The development of touchscreen technology has greatly improved the human-computer interaction experience, making operation more intuitive and convenient. In the design of device screen displays, a user interface (UI) is typically designed to facilitate human-computer interaction, clearly displaying the device's various functions and status. Users can turn device functions on, off, or switch between them by clicking corresponding areas on the touchscreen. Touchscreen design usually uses a control chip to analyze and process user actions such as clicks and swipes, obtaining information such as the number of touch points, touch point coordinates, and touch point pressure, and then sending the current user's touchscreen operation to the host computer. For UI testing personnel, to verify whether the UI on the touchscreen conforms to the set logic, it is usually necessary to click or swipe at specific locations on the touchscreen to test whether the UI switching function is normal. In industrial production scenarios, it is necessary to use a host computer to control production equipment, requiring the host computer to issue control commands to select and apply equipment functions.
[0003] Currently, for UI interface testing personnel, in order to verify whether the UI interface on the touch screen conforms to the set logic, it is usually necessary to click or slide at specific locations on the touch screen to test whether the UI interface switching function is normal. In addition, it is necessary to use a host computer to control the production equipment, requiring the host computer to issue control commands to select and apply equipment functions. It is also necessary to control multiple identical production equipment at the same time, which leads to the need for manual execution of simple and repetitive click and slide operations, resulting in low testing efficiency. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] To address the shortcomings of existing technologies, this invention provides a device for simulating the sending of touch signals by HY46xx series touchscreen chips. This solves the problem of needing to perform click or swipe operations at specific locations on the touchscreen to test the normal operation of the UI interface switching function, and the need to control the production equipment using a host computer, requiring the host computer to issue control commands to select and apply equipment functions, and the need to control multiple identical production equipment simultaneously, which leads to the need for manual execution of simple and repetitive click and swipe operations, resulting in low testing efficiency.
[0006] (II) Technical Solution
[0007] To achieve the above objectives, the present invention provides the following technical solution: a device for simulating the transmission of touch signals by a HY46xx series touch screen chip, comprising a signal conversion device, wherein the signal conversion device consists of a signal input module, a signal processing module and a signal output module, and wherein the signal conversion device is equipped with a main control chip;
[0008] The signal input module receives serial port data sent by a computer and other embedded devices, and the serial port data is sent according to the serial port data transmission format.
[0009] The signal processing module uses the main control chip to receive and parse serial port data, simulating the data protocol of the touch screen chip.
[0010] The signal output module sends a touch request to the touch screen host and sends the touch data to the touch screen host through the IIC communication protocol to realize the simulated touch function. The signal output module uses pin headers to lead out the signal line for easy connection and pairing with the touch screen host.
[0011] Preferably, the signal input module uses CH340N as a USB-to-serial chip, connecting the computer to the signal conversion device via a USB data cable for serial communication. Additionally, the signal conversion device has a serial port interface led out from a pin header for easy connection to other embedded devices. When using it, a jumper cap is needed to select the specific serial port to use.
[0012] Preferably, the main control chip is an STM32F103C8T6 chip, and the signal output module uses the STM32F103C8T6 to receive and process serial port data, and to send the processed data to the touch screen host using the IIC communication protocol.
[0013] Preferably, when the serial port data is sent in the serial port data transmission format, the number of touch points to be sent, the state of each touch point, and the horizontal and vertical coordinates of each touch point on the touch screen are first determined. For cases with fewer than 11 touch points, the horizontal and vertical coordinates of the extra touch points are set to 0, the mode is selected as Reserved, and the data of each touch point is stored in an array in the serial port data transmission format, waiting for the serial port to send the data to the main control chip.
[0014] Preferably, the states of each contact point include Down, Up, and Contact. The first contact mode is set to Down, the continuous contact and sliding mode is set to Contact, and the release mode is set to Up.
[0015] Preferably, the main control chip stores the data sent via serial port into the data receiving area, performs data splicing and touch point mode judgment on the data in the receiving area according to the serial port data transmission format, records the horizontal and vertical coordinates, touch point mode, and assigns a touch point ID for each touch point, and stores all touch point information in the IIC data transmission buffer according to the IIC data communication protocol. In addition, it can burn the communication protocols of other touch screen chips through the SWD program burning interface to realize the control of the touch screen host by other touch screen chips.
[0016] Preferably, when the main control chip receives serial port data sent by a computer or embedded device, it transfers the data to a Bit58 array buffer. To determine the accuracy of the received serial port data, the data from Bit1 to Bit57 in the buffer is accumulated, and the lower eight bits are compared with Bit58. If the two data are the same, the chip sends the character "T" to the computer via the serial port to indicate that the communication was successful. If the two serial port data do not match, the chip sends the character "F" to the computer to indicate that the communication failed and requests a re-communication.
[0017] Preferably, the IIC data communication protocol is a synchronous communication protocol, which requires the host to initiate a communication request, the slave to send an acknowledgment signal, the master control chip to pull the INT pin low to initiate a touch event to the touch screen host, the touch screen host to send an IIC start signal, the slave device address signal and the data address signal that need to be acknowledged, and then enter a data receiving waiting state. After the master control chip receives and matches the correct slave device address and data offset address, it sends the data in the IIC data sending buffer. When the touch screen host receives the IIC data, it will execute the required touch task.
[0018] Preferably, the main control chip stores the parsed touch data in the corresponding structure. According to the IIC data transmission protocol given by the HY46xx series touch screen chip, the data in the structure is organized into the IIC data transmission buffer. The main control chip pulls the INT pin low to trigger the host to request the touch screen event. The host sends the touch screen IIC slave address and data offset address to the main control chip. The main control chip enters the IIC receive interrupt to acknowledge the address information sent by the host and sends the data in the IIC data buffer to the host. After the data transmission is completed, the INT pin is pulled high to indicate that the touch event has ended.
[0019] (III) Beneficial Effects
[0020] Compared with the prior art, the present invention provides a device for simulating the transmission of touch signals by a HY46xx series touch screen chip, which has the following advantages:
[0021] 1. By sending touch point coordinate data to the signal conversion device of this invention via the serial port of a computer or other embedded device, operation of the touch screen can be realized, thus expanding the application scope of the signal conversion device.
[0022] 2. By converting manual clicks or swipes on the touchscreen into computer commands, the simple, repetitive manual labor is reduced during the touchscreen testing phase.
[0023] 3. For different touchscreens that use IIC for communication, it is only necessary to modify the data communication protocol in the signal conversion device to simulate various touchscreen control signals. Attached Figure Description
[0024] Figure 1 This invention provides a device for simulating the transmission of touch signals by a HY46xx series touchscreen chip, showing the output pin diagram of the HY46xx series chip.
[0025] Figure 2 This is a schematic diagram of the printed circuit board of the signal conversion device (SCE) in the device for simulating the transmission of touch signals by the HY46xx series touch screen chip proposed in this invention.
[0026] Figure 3 This is a 3D model diagram of the signal conversion device (SCE) in the device for simulating the transmission of touch signals by the HY46xx series touch screen chip proposed in this invention;
[0027] Figure 4a The circuit principle of the signal conversion device (SCE) in the device for simulating the transmission of touch signals by the HY46xx series touch screen chip proposed in this invention. Figure 1 ;
[0028] Figure 4b The circuit principle of the signal conversion device (SCE) in the device for simulating the transmission of touch signals by the HY46xx series touch screen chip proposed in this invention. Figure 2 ;
[0029] Figure 5 This is a control flowchart of the signal conversion device (SCE) in a device for simulating the transmission of touch signals by a HY46xx series touch screen chip, as proposed in this invention.
[0030] Figure 6 This is a flowchart of the UI interface of a microwave-steam-oven combo machine controlled by PC commands in an experimental example of the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] Example: Refer to Appendix Figure 1-5 A device for simulating the transmission of touch signals by a HY46xx series touch screen chip includes a signal conversion device, which consists of a signal input module, a signal processing module, and a signal output module. The signal conversion device is equipped with a main control chip, which is an STM32F103C8T6 chip.
[0033] The signal input module receives serial data sent by a computer or other embedded devices. The serial data is sent according to the serial data transmission format. The signal input module selects CH340N as the USB to serial chip. The computer is connected to the signal conversion device using a USB data cable for serial communication. In addition, the signal conversion device has a serial port interface brought out by a pin header for easy connection with other embedded devices. When using it, a jumper cap is needed to select the specific serial port to use.
[0034] The main control chip stores the data sent via serial port into the data receiving area. It performs data splicing and contact mode judgment on the data in the receiving area according to the serial port data transmission format, records the horizontal and vertical coordinates, contact mode, and assigns a contact ID for each contact. It stores the contact information in the IIC data transmission buffer according to the IIC data communication protocol. Additionally, it uses the SWD programming interface to program other touchscreen chip communication protocols, enabling control of the touchscreen host by other touchscreen chips. When the main control chip receives serial port data from a computer or embedded device, it transfers the data to a Bit58 array buffer. To determine the accuracy of the received serial port data, it accumulates the data from Bit1 to Bit57 in the buffer, takes the lower eight bits, and compares them with Bit58. If the two data are the same, it sends the character "T" to the computer via serial port to indicate successful communication. If the two serial port data do not match, it sends the character "F" to the computer to indicate communication failure and requests a re-communication.
[0035] The Signal Conversion Device (SCE) uses an STM32F103C8T6 (abbreviated as STM32) as the main control chip. This chip receives serial port signals and parses the serial port data into IIC signals emitted by the analog touch screen. The chip has UART and IIC peripherals, and has UART and IIC interrupt receiving and sending functions, which facilitates timely reception of serial port information sent by computers or embedded devices. The analog touch screen signals are sent using the IIC peripherals. In order to convert the voltage applicable to the computer serial port to the voltage accepted by the STM32 main control chip, the Signal Conversion Device (SCE) uses a CH340N chip to achieve compatibility between the two voltages, so that a single data cable can be used to directly connect to the invention device, realizing direct communication between the computer and the invention device.
[0036] The Signal Conversion Device (SCE) defines the following protocol to meet the serial communication requirements of the device, enabling the device to correctly parse the serial information sent by the computer or embedded device. The device can enable up to 11 touch points of a touch screen controlled by the HY46xx series chip to work simultaneously.
[0037] Table 1 Serial Port Data Transmission Format
[0038]
[0039]
[0040] The signal processing module uses the main control chip to receive and parse serial port data, simulating the data protocol of the touch screen chip. The signal output module uses STM32F103C8T6 to receive and process serial port data, and send the processed data to the touch screen host using the IIC communication protocol. When the serial port data is sent according to the serial port data transmission format, the number of touch points to be sent, the state of each touch point, and the horizontal and vertical coordinates of the touch screen at each touch point are first determined. The states of each touch point include Down, Up, and Contact. The touch point is set to Down mode for the first contact, Contact mode for continuous contact and sliding mode, and Up mode for release. For cases with less than 11 touch points, the horizontal and vertical coordinates of the extra touch points are set to 0, and the mode is selected as Reserved. The data of each touch point is stored in an array according to the serial port data transmission format, waiting for the serial port to send the data to the main control chip.
[0041] The signal output module sends a touch request to the touchscreen host and transmits the touch data to the touchscreen host via the IIC communication protocol to realize the simulated touch function. The signal output module uses pin headers to lead out the signal lines for easy connection and pairing with the touchscreen host. The IIC data communication protocol is a synchronous communication protocol that requires the host to initiate a communication request and the slave to send an acknowledgment signal. The master control chip pulls the INT pin low to initiate a touch event to the touchscreen host. The touchscreen host sends an IIC start signal, the slave device address signal and the data address signal that need to be acknowledged, and then enters a data reception waiting state. After the master control chip receives and matches the correct slave device address and data offset address, it sends the data in the IIC data transmission buffer. When the touchscreen host receives the IIC data, it will execute the required touch task.
[0042] Table 2. IIC Data Communication Protocol for HY46xx Series Touch Screen Chips
[0043]
[0044]
[0045]
[0046]
[0047] The main control chip stores the parsed touch data into the corresponding structure. According to the IIC data transmission protocol given by the HY46xx series touch screen chip, the data in the structure is organized into the IIC data transmission buffer. The main control chip pulls the INT pin low to trigger the host's request for the touch screen event. The host sends the touch screen IIC slave address and data offset address to the main control chip. The main control chip enters the IIC receive interrupt to acknowledge the address information sent by the host and sends the data in the IIC data buffer to the host. After the data transmission is completed, the INT pin is pulled high to indicate that the touch event has ended.
[0048] like Figure 1 The displayed pins are the output pins of the HY46xx series chip. These pins send the touch data processed by the HY46xx series chip to the reading device. The reading device parses the touch event according to the HY46xx series chip data communication protocol. The INT pin is used to indicate the initiation of a touch event. A touch event occurs when the INT pin generates a falling edge. The RESET pin is used to reset the HY46xx series chip. Before the chip is powered on, RESET is pulled low for more than 5ms. Then the chip is powered on. After power-on, wait for more than 5ms before pulling the RESET pin high. Read and write operations can only be performed on the chip after the RESET pin has been pulled high for 1000ms. SCL and SDA are the clock line and data line of IIC communication, respectively. VDD is the chip power supply pin, and GND is the chip ground pin.
[0049] In use, this invention utilizes the serial port of a computer or embedded device to send the coordinates of the target point to be clicked or swiped as serial data to the signal conversion device (SCE) of this invention. The signal conversion device (SCE) processes the serial data and simulates the control commands issued by the touch screen chip, thereby enabling operation of the UI interface of the controlled device. By sending touch point coordinate data to the signal conversion device (SCE) via the serial port of a computer or other embedded device, operation of the touch screen is achieved, expanding the application scope of the signal conversion device (SCE). By converting manual clicks or swipes on the touch screen into computer command control, the simple repetitive and continuous manual labor is reduced during the touch screen testing phase. Furthermore, for different touch screens using IIC communication, only the data communication protocol in the signal conversion device (SCE) needs to be modified to simulate various touch screen control signals.
[0050] Experimental example;
[0051] The signal conversion device (SCE) provided by this invention is used to control the UI interface of a microwave-steam-oven combination appliance;
[0052] The microwave-steam-grill combo uses the HY4635 chip as the touchscreen control chip. This chip monitors the touchscreen actions of the user in real time and sends the touch actions to the microwave oven's main controller using IIC signals. The main controller parses the IIC signal content and slides or jumps the microwave oven's UI interface according to the user's touchscreen actions. The purpose of this case is to control the microwave oven's UI interface by sending commands from the PC, thereby realizing various operation functions of the microwave oven.
[0053] In this case, the signal conversion device (SCE) provided by this invention acts as a communication bridge between the microwave oven and the PC. It converts the serial port commands sent from the PC into IIC commands that the microwave oven's main controller can recognize and read. With the help of this signal conversion device (SCE), the effect of sending serial port commands through the PC and then clicking and sliding at any position on the microwave oven's UI interface is successfully achieved. The operation process is as follows: Figure 6 As shown, Figure 6 This is a flowchart of the UI interface for controlling a microwave-steam-oven combination appliance via PC commands;
[0054] For touch point states, if clicking the touchscreen is required, the touch event in the serial port data is "pressed"; if swiping the touchscreen is required, the touch event in the serial port data is "contacted", and the touch event is changed to "released" at the release point.
[0055] It should be noted that the term "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0056] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An apparatus for simulating the sending of touch signals by a HY46xx series touch screen chip, comprising signal conversion equipment, characterized in that: The signal conversion device is composed of a signal input module, a signal processing module and a signal output module, and is provided with a main control chip; The signal input module receives serial port data sent by a computer or other embedded device, and the serial port data is sent in a serial port data sending format; when the serial port data is sent in the serial port data sending format, the number of contacts to be sent, the state of each contact and the horizontal and vertical coordinates of the touch screen where each contact is located are determined first; for the case that there are not 11 contacts, the horizontal and vertical coordinates of the excess contacts are set to 0, the mode selection is Reserved, and the data of each contact is stored in an array in the serial port data sending format, and the data is sent to the main control chip by the serial port; The signal processing module receives serial port data by the main control chip and analyzes the data, simulates the data protocol of the touch screen chip, stores the data sent by the serial port into a data receiving area, performs data splicing and contact mode judgment on the data in the data receiving area according to the serial port data sending format, records the horizontal and vertical coordinates of each contact, the contact mode and the assigned contact ID, and stores all the contact information in the IIC data sending buffer area according to the IIC data communication protocol; in addition, other touch screen chip communication protocols are burned in through the SWD program burning interface, so as to realize the control of the touch screen host by other touch screen chips. The signal output module sends a touch request to the touch screen host and sends touch data to the touch screen host through the IIC data communication protocol to realize the simulation touch function; the signal output module uses a pin to lead out the signal line, so as to facilitate the connection and pairing with the touch screen host; the IIC data communication protocol is a synchronous communication protocol, and a communication request needs to be initiated by the host and a response signal needs to be sent by the slave; the main control chip initiates a touch event by pulling down the INT pin to the touch screen host; the touch screen host sends an IIC start signal, a slave device address signal and a data address signal which need to be responded, and then enters a data receiving waiting state; the main control chip sends the data in the IIC data sending buffer area after receiving and matching the correct slave device address and data offset address; and the touch screen host will execute the required touch task after receiving the IIC data.
2. The device for transmitting touch signals of an analog HY46xx series touch screen chip according to claim 1, characterized in that: The signal input module selects CH340N as a USB-to-serial chip, and a computer end is connected to the signal conversion device by a USB data line for serial port communication; in addition, there is a serial port interface in the signal conversion device which is led out by a pin, so as to facilitate the connection with other embedded devices; and a jumper cap needs to be used to select the specific serial port in use.
3. The device for transmitting touch signals of an analog HY46xx series touch screen chip according to claim 1, characterized in that: The main control chip adopts an STM32F103C8T6 chip, and the signal output module uses the STM32F103C8T6 to receive, process and send the processed data to the touch screen host by the IIC communication protocol.
4. The device for transmitting touch signals of an analog HY46xx series touch screen chip according to claim 1, characterized in that: The state of each contact includes Down, Up and Contact; the first contact mode of the contact is set to Down, the continuous contact and sliding mode of the contact is set to Contact, and the mode of the contact when released is set to Up.
5. The apparatus for transmitting touch signals of an analog HY46xx series touch screen chip according to claim 1, wherein: The master control chip receives serial port data sent by a computer or an embedded device, and stores the data into a Bit58 array buffer area. In order to determine the accuracy of the serial port data reception, the data from Bit1 to Bit57 in the buffer area are accumulated, and the lower eight bits are compared with Bit58. If the two data are the same, a character "T" is sent to the computer by the serial port to indicate that the current communication is successful. If the two serial port data are not matched, a character "F" is sent to the computer to indicate that the current communication fails and re-communication is requested.
6. The apparatus for transmitting touch signals of an analog HY46xx series touch screen chip according to claim 1, wherein: The master control chip stores the parsed contact data into a corresponding structure, arranges the data in the structure into an IIC data sending buffer area according to an IIC data transmission protocol given by the HY46xx series touch screen chip, pulls down the INT pin to trigger the request of the host to the touch screen event, sends the touch screen IIC slave address and data offset address to the master control chip, enters the IIC receiving interrupt response address information sent by the host, and sends the data in the IIC data buffer area to the host. After the data sending is completed, the INT pin is pulled up to indicate that the touch event is ended.
Citation Information
Patent Citations
IView-TK touch debugging system
CN115408216A
Thigh touch sensing system and method based on finger control
CN117666800A