Touch anti-interference method, chip, circuit, storage medium and program product
By combining the touch module and detection module with the same configuration in the touch chip, touch parameters are calibrated in real time, and touch value jumping caused by external interference in the prior art is solved, and good touch anti-interference effect is achieved and cost savings are saved.
Patent Information
- Application Number
- CN202411994488.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-25
AI Technical Summary
The existing touch MCUs cannot effectively respond when facing strong external interference, resulting in changes in the parameters of the touch module, jumping keys or not pressing, and the prior art is difficult to effectively correct the touch value, which increases the application cost.
By combining the touch module and detection module with the same configuration in the touch chip, the touch parameters of the touch module are calibrated in real time using the detection parameters of the detection module to eliminate the influence of strong external interference and realize anti-interference in touch.
It effectively eliminates the impact of external interference on the touch value, avoids the problem of accidentally triggering of touch, enables the touch chip to operate normally, and saves the cost of increasing the anti-interference circuit.
Smart Images

Figure CN119883035A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signal processing, and in particular relates to a touch anti-interference method, a chip, a circuit, a storage medium and a program product. Background Art
[0002] The existing touch MCU (Microcontroller Unit, single-chip microcontroller computer / single-chip computer) has no effective countermeasures for touch interference. The touch module inside the chip contains complex circuits, and adopts charge transfer to realize capacitance value acquisition and convert the capacitance into touch count value. Strong external interference will cause the parameters of the chip touch module to change. The touch module will jump keys or cannot be pressed in certain interference frequency bands. The touch value will suddenly increase or decrease, and there will be abnormal changes in the touch value for a long time. The touch module of the touch chip has many working parameters, such as charging voltage, reference voltage, etc. As long as these parameters are affected, the touch value of the touch module will change accordingly.
[0003] Since external conductive interference enters the chip through the power supply, the parameters of the chip touch module change, which in turn causes the touch value to change. The existing technology is relatively complicated to detect the change of each touch parameter. Even if the touch parameter change is detected, it cannot be used to effectively correct the touch value. The anti-interference ability of the circuit can only be improved by adding peripheral hardware circuits, but this method greatly increases the application cost. Another method is to rely on software for filtering, but the effect of software filtering is very limited, and relying solely on software algorithm filtering is far from enough. Therefore, there is an urgent need for a touch chip anti-interference technology that can not only solve the current anti-interference problem but also save costs. Summary of the invention
[0004] The object of the present invention is to provide a touch anti-interference method, chip, circuit, storage medium and program product to solve the above problems existing in the prior art.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, a touch anti-interference method is provided, comprising:
[0007] The touch channel is used to collect the first working parameter sampling value of the touch module in real time, and the detection channel is used to collect the second working parameter sampling value of the detection module in real time, wherein the touch module and the detection module are touch sensing devices with the same configuration and are connected to the same working power supply;
[0008] Retrieve the preset detection channel parameter reference value;
[0009] Calculate the corrected touch parameter value according to the first working parameter sampling value, the second working parameter sampling value and the detection channel parameter reference value;
[0010] Perform touch output based on touch parameter values.
[0011] In a possible design, the real-time acquisition of the first working parameter sampling value of the touch module through the touch channel and the real-time acquisition of the second working parameter sampling value of the detection module through the detection channel include:
[0012] Control a switch corresponding to a certain signal sampling channel to connect to the touch module, and use the signal sampling channel after the touch module is connected as the touch channel; control a switch corresponding to another signal sampling channel to connect to the detection module, and use the signal sampling channel after the detection module is connected as the detection channel;
[0013] The first working parameter sampling value of the touch module is collected in real time through the touch channel, and the second working parameter sampling value of the detection module is collected in real time through the detection channel.
[0014] In a possible design, before retrieving the preset detection channel parameter reference value, the method further includes:
[0015] The touch module and the detection module are powered on, and before the touch module is used for touch, the initial working parameter sampling values of the detection module are collected several times through the detection channel, and the average value of the initial working parameter sampling values is used as the detection channel parameter reference value.
[0016] In a possible design, the step of calculating the corrected touch parameter value according to the first working parameter sample value, the second working parameter sample value and the detection channel parameter reference value includes:
[0017] The first working parameter sampling value, the second working parameter sampling value and the detection channel parameter reference value are substituted into a preset touch parameter correction formula for calculation to obtain a corrected touch parameter value, and the touch parameter correction formula is S=C1-(C2-R), wherein S is the corrected touch parameter value, C1 is the first working parameter sampling value, C2 is the second working parameter sampling value, and R is the detection channel parameter reference value.
[0018] In one possible design, the first operating parameter sampling value includes a first operating voltage sampling value, the second operating parameter sampling value includes a second operating voltage sampling value, and the detection channel parameter reference value includes a detection channel voltage reference value.
[0019] In a second aspect, a touch anti-interference chip is provided, the chip comprising a touch module, a detection module and a processor, the processor respectively establishing signal connections with the touch module and the detection module, and the processor is used to execute any one of the methods described in the first aspect.
[0020] In a possible design, the chip adopts an MCU chip.
[0021] In a third aspect, a touch anti-interference circuit is provided, comprising a touch module, a detection module and a processor, wherein the processor is provided with a plurality of signal sampling channels, each signal sampling channel is provided with a switching switch, the switching switch comprises a fixed end and two moving ends, the fixed end is connected to the signal sampling channel, the two moving ends are respectively connected to the touch module and the detection module, and the processor is used to execute any one of the methods described in the first aspect.
[0022] In a fourth aspect, a storage medium is provided, wherein instructions are stored on the storage medium, and when the instructions are executed on a processor, the processor executes any one of the methods described in the first aspect. At the same time, a program product is also provided, and when the program product is executed on a processor, the method described in the first aspect is executed.
[0023] Beneficial effect: The present invention combines a touch module and a detection module of the same configuration into a touch chip, and uses the detection parameters of the detection module to calibrate the touch parameters of the touch module in real time, thereby eliminating the influence of strong external interference and achieving good touch anti-interference effect. It effectively solves the problem of false touch triggering caused by touch value fluctuations caused by external interference, enables the touch chip to operate normally, and does not require additional anti-interference circuits, which can effectively save costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 This is a schematic diagram of the steps of the method in Example 1 of the present invention;
[0026] Figure 2 This is a schematic diagram of the chip structure in Example 2 of the present invention;
[0027] Figure 3 It is a circuit diagram of the touch part of the existing touch MCU;
[0028] Figure 4The figure is a schematic diagram of the touch part circuit of the touch anti-interference circuit of the present invention. DETAILED DESCRIPTION
[0029] It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. The specific structures and functional details disclosed herein are only used to describe the exemplary embodiments of the present invention. However, the present invention can be embodied in many alternative forms, and it should not be understood that the present invention is limited to the embodiments set forth herein.
[0030] It should be understood that, unless otherwise clearly specified and limited, the corresponding terms should be understood in a broad sense, for example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be an electrical connection, a direct connection, an indirect connection through an intermediate medium, or the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments can be understood according to specific circumstances.
[0031] In the following description, certain details are provided to facilitate a complete understanding of the example embodiments. However, it will be appreciated by those of ordinary skill in the art that the example embodiments may be implemented without these certain details. For example, devices may be shown in block diagrams to avoid obscuring the examples with unnecessary details. In other embodiments, well-known processes, structures, and techniques may not be shown in unnecessary detail to avoid obscuring the embodiments.
[0032] Embodiment 1:
[0033] This embodiment provides a touch anti-interference method, which can be used in a processor of a touch chip, such as Figure 1 As shown, the method comprises the following steps:
[0034] S1. The first working parameter sampling value of the touch module is collected in real time through the touch channel, and the second working parameter sampling value of the detection module is collected in real time through the detection channel. The touch module and the detection module are touch sensing devices with the same configuration and connected to the same working power supply. In specific implementation, when there is external interference and the user performs a touch application, the processor can control the switch corresponding to a certain signal sampling channel to connect the touch module, and use the signal sampling channel after the touch module is connected as the touch channel, and control the switch corresponding to another signal sampling channel to connect the detection module, and use the signal sampling channel after the detection module is connected as the detection channel. Then, the first working parameter sampling value of the touch module is collected in real time through the touch channel, and the second working parameter sampling value of the detection module is collected in real time through the detection channel. The first working parameter sampling value includes the first working voltage sampling value, and the second working parameter sampling value includes the second working voltage sampling value.
[0035] S2. Retrieve the preset detection channel parameter reference value. In specific implementation, before retrieving the detection channel parameter reference value, power on the touch module and the detection module, and before using the touch module for touch, collect several (e.g., 10) initial working parameter sampling values of the detection module through the detection channel, and use the average value of each initial working parameter sampling value as the detection channel parameter reference value, the initial working parameter sampling value includes the initial working voltage sampling value, and the detection channel parameter reference value includes the detection channel voltage reference value.
[0036] S3. Calculate the corrected touch parameter value according to the first working parameter sampling value, the second working parameter sampling value and the detection channel parameter reference value. In specific implementation, the first working parameter sampling value, the second working parameter sampling value and the detection channel parameter reference value can be substituted into the preset touch parameter correction formula for calculation to obtain the corrected touch parameter value, and the touch parameter correction formula is S=C1-(C2-R), where S is the corrected touch parameter value, C1 is the first working parameter sampling value, C2 is the second working parameter sampling value, and R is the detection channel parameter reference value.
[0037] S4. Perform touch output based on the touch parameter value. The touch chip finally generates a corresponding touch signal based on the touch parameter value to achieve touch output.
[0038] This method combines a touch module and a detection module of the same configuration into a touch control chip, and uses the detection parameters of the detection module to calibrate the touch parameters of the touch module in real time, thereby eliminating the influence of strong external interference and achieving a good touch control anti-interference effect. It effectively solves the problem of false touch triggering caused by touch value jumps caused by external interference, enables the touch chip to operate normally, and does not require additional anti-interference circuits, which can effectively save costs.
[0039] Embodiment 2:
[0040] This embodiment provides a touch anti-interference chip, such as Figure 2 As shown, it includes a touch module, a detection module, a processor, a memory and a data interface, wherein:
[0041] Data interface, used to establish signal connection between the processor and the touch module and detection module;
[0042] A memory for storing instructions;
[0043] The processor is used to read the instructions stored in the memory and execute the touch anti-interference method in embodiment 1 according to the instructions.
[0044] Optionally, the chip is an MCU chip.
[0045] Optionally, the chip further includes an internal bus, through which the processor, memory and data interface can be interconnected, and the internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory can include, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a flash memory, a first-in first-out memory (FIFO) and / or a first-in last-out memory (FILO), etc. The processor can be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0046] The touch part of the existing touch MCU has only a single touch module, and the touch channels are scanned cyclically and cannot be scanned simultaneously. The touch module parameters will change in real time after being disturbed. Therefore, when different touch channels are scanned, the touch internal voltage is not synchronized. Figure 3 As shown, TK1-TK4 are different touch channels, K1-K4 are switches corresponding to the touch channel connections, these switches can only connect or disconnect the touch module, and the touch channel can only scan one channel at a time. After the channel scan is completed, the touch parameter value of the current channel will be obtained.
[0047] The present embodiment further provides a touch anti-interference circuit, including a touch module, a detection module and a processor, wherein the processor is provided with a signal sampling channel, each signal sampling channel is provided with a switch, the switch includes a fixed end and two movable ends, the fixed end is connected to the signal sampling channel, and the two movable ends are respectively connected to the touch module and the detection module, and the processor is used to execute the touch anti-interference method in Embodiment 1. The touch part of the present touch anti-interference circuit is as follows Figure 4 As shown, a touch module is added to the existing touch module, and the added touch module is used as a detection module. The detection module is configured in the same way as the touch module. When the touch parameters of the two are changed by external interference, the parameters of the touch module and the detection module are disturbed to the same extent. In addition, the problem of interference synchronization must be achieved so that the signal sampling channel can be connected to both the touch module and the detection module. That is, TK1-TK4 are different signal sampling channels, and K1-K4 are switches connected to the corresponding signal sampling channels. These switches are similar to single-pole double-throw switches, which can be connected to both the touch module and the detection module. When a certain signal sampling channel is used as a touch channel for touch scanning, another signal sampling channel can be connected to the detection module as a detection channel for scanning, which can ensure synchronous sampling. The detection module is configured in the same way as the touch module. When the parameters of the touch module change due to external interference, the parameters of the detection module and the touch module change together, and the amplitude of the change caused by the interference is also consistent. For example, when the signal sampling channel TK1 is scanning the touch module, the signal sampling channel TK2 is connected to the detection module for scanning at the same time. Only when both are scanned at the same time can synchronous detection be achieved. When the touch scan of the signal sampling channel TK1 and the detection scan of the signal sampling channel TK2 are completed at the same time, the signal sampling channel TK1 is used as the detection channel and the signal sampling channel TK2 is used as the touch channel to continue detection. In this way, it can be ensured that each signal sampling channel can be scanned normally. At the same time, the initial working parameter sampling value of the detection channel can be used as the detection channel parameter reference value to calibrate the parameter sampling value of the touch channel.
[0048] Embodiment 3:
[0049] This embodiment provides a storage medium, on which instructions are stored, and when the instructions are executed on a processor, the processor executes the touch anti-interference method in Embodiment 1. The storage medium refers to a carrier for storing data, which may include but is not limited to a flash memory, a USB flash drive, and / or a memory stick, and the processor may be a general-purpose processor, a dedicated processor, a processor network, or other programmable devices.
[0050] This embodiment also provides a program product, when the program product is run on a processor, the touch anti-interference method in Embodiment 1 is executed. The processor may be a general-purpose processor, a dedicated processor, a processor network or other programmable devices.
[0051] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A touch anti-interference method, characterized in that: include: The touch channel is used to collect the first working parameter sampling value of the touch module in real time, and the detection channel is used to collect the second working parameter sampling value of the detection module in real time, wherein the touch module and the detection module are touch sensing devices with the same configuration and are connected to the same working power supply; Retrieve the preset detection channel parameter reference value; Calculate the corrected touch parameter value according to the first working parameter sampling value, the second working parameter sampling value and the detection channel parameter reference value; Perform touch output based on touch parameter values.
2. A touch anti-interference method according to claim 1, characterized in that: The method of collecting the first working parameter sampling value of the touch module in real time through the touch channel and collecting the second working parameter sampling value of the detection module in real time through the detection channel includes: Control a switch corresponding to a certain signal sampling channel to connect to the touch module, and use the signal sampling channel after the touch module is connected as the touch channel; control a switch corresponding to another signal sampling channel to connect to the detection module, and use the signal sampling channel after the detection module is connected as the detection channel; The first working parameter sampling value of the touch module is collected in real time through the touch channel, and the second working parameter sampling value of the detection module is collected in real time through the detection channel.
3. A touch anti-interference method according to claim 1, characterized in that: Before retrieving the preset detection channel parameter reference value, the method further includes: The touch module and the detection module are powered on, and before the touch module is used for touch, the initial working parameter sampling values of the detection module are collected several times through the detection channel, and the average value of the initial working parameter sampling values is used as the detection channel parameter reference value.
4. A touch anti-interference method according to claim 1, characterized in that: The step of calculating the corrected touch parameter value according to the first working parameter sampling value, the second working parameter sampling value and the detection channel parameter reference value includes: The first working parameter sampling value, the second working parameter sampling value and the detection channel parameter reference value are substituted into a preset touch parameter correction formula for calculation to obtain a corrected touch parameter value, and the touch parameter correction formula is S=C1-(C2-R), wherein S is the corrected touch parameter value, C1 is the first working parameter sampling value, C2 is the second working parameter sampling value, and R is the detection channel parameter reference value.
5. A touch anti-interference method according to claim 1, characterized in that: The first working parameter sampling value includes a first working voltage sampling value, the second working parameter sampling value includes a second working voltage sampling value, and the detection channel parameter reference value includes a detection channel voltage reference value.
6. A touch anti-interference chip, characterized in that: The chip includes a touch module, a detection module and a processor, the processor establishes signal connections with the touch module and the detection module respectively, and the processor is used to execute the touch anti-interference method according to any one of claims 1-5.
7. The touch anti-interference chip according to claim 6, characterized in that: The chip is an MCU chip.
8. A touch anti-interference circuit, characterized in that: It includes a touch module, a detection module and a processor, the processor is provided with a plurality of signal sampling channels, each signal sampling channel is provided with a switching switch, the switching switch includes a fixed end and two moving ends, the fixed end is connected to the signal sampling channel, the two moving ends are respectively connected to the touch module and the detection module, and the processor is used to execute the touch anti-interference method described in any one of claims 1-5.
9. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions are executed on the processor, the processor executes the method according to any one of claims 1 to 5.
10. A program product, characterized in that When the program product is run on a processor, the touch anti-interference method according to any one of claims 1 to 5 is executed.