CN110945464B - Identification method of sliding signal, MCU, touch equipment and storage medium - Google Patents

Identification method of sliding signal, MCU, touch equipment and storage medium Download PDF

Info

Publication number
CN110945464B
CN110945464B CN201980002442.0A CN201980002442A CN110945464B CN 110945464 B CN110945464 B CN 110945464B CN 201980002442 A CN201980002442 A CN 201980002442A CN 110945464 B CN110945464 B CN 110945464B
Authority
CN
China
Prior art keywords
value
pressing position
determining
touch
sliding window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201980002442.0A
Other languages
Chinese (zh)
Other versions
CN110945464A (en
Inventor
朱明�
李庆斌
周伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Publication of CN110945464A publication Critical patent/CN110945464A/en
Application granted granted Critical
Publication of CN110945464B publication Critical patent/CN110945464B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0414Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position

Abstract

The application provides a sliding signal identification method, an MCU, touch equipment and a storage medium. The method is applied to a Micro Control Unit (MCU), a touch sensing controller is integrated on the MCU, and the touch sensing controller is connected with N touch keys through N channels and is used for acquiring touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1; the method comprises the following steps: if the first value corresponding to the last pressing position is an effective value, acquiring a second value corresponding to the current pressing position, wherein the last pressing position and the current pressing position correspond to at least one of N touch keys; and determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window. Therefore, the sliding operation direction of the user for the sensor can be accurately identified, and the identification accuracy of the touch sensor is improved.

Description

Identification method of sliding signal, MCU, touch equipment and storage medium
Technical Field
The application relates to the technical field of touch control, in particular to a sliding signal identification method, an MCU, touch control equipment and a storage medium.
Background
Touch devices are frequently used in daily life of people, such as gas cookers, touch lamps, and the like. Among these touch devices are: and a micro control unit (Microcontroller Unit, MCU) integrated with a touch sensor controller, wherein a channel exists between the touch sensor controller and a touch key on the touch screen or the touch panel, so that the direction of a sliding signal for the touch device is determined according to a signal acquired by the channel.
Currently, a general method for judging a sliding direction is to record a position of initial contact and a position of departure of a finger of a user, then subtract a value corresponding to the position of departure from a value corresponding to the position of initial contact, and judge the sliding direction according to the positive and negative of a difference value.
However, in the above-described method, only the position change upon contact and separation is recorded, and if the user slides in the opposite direction during the middle, the state information of the middle sliding is lost, so that the action behavior of the user cannot be accurately described. In addition, in the special case of the circular touch sensor connected end to end, when the finger slides from the tail to the head, the sliding direction cannot be correctly determined in the above manner.
Disclosure of Invention
The application provides a sliding signal identification method, an MCU, a touch control device and a storage medium, which can accurately identify the sliding operation direction of a user aiming at a sensor and improve the identification precision of the touch sensor.
In a first aspect, an embodiment of the present application provides a method for identifying a sliding signal, which is applied to a MCU, where a touch sensing controller is integrated on the MCU, and the touch sensing controller is connected to N touch keys through N channels, and is used to collect touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1; the method comprises the following steps:
if the first value corresponding to the last pressing position is an effective value, acquiring a second value corresponding to the current pressing position, wherein the last pressing position and the current pressing position correspond to at least one of the N touch keys;
and determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window.
In one possible design, before acquiring the second value corresponding to the current pressing position, the method further includes:
according to the clockwise sequence, constructing the numerical values corresponding to all areas on the annular structure arranged by the N touch keys; wherein the corresponding values of the areas at different positions are different.
In one possible design, before acquiring the second value corresponding to the current pressing position, the method further includes:
reading a first numerical value corresponding to the last pressing position;
if the first numerical value is an invalid marking value, determining that the first numerical value is an invalid value; when the conversion amount of the electric signal generated by the pressing position is smaller than a preset threshold value, setting the first numerical value as an invalid marking value;
and if the first value is not the invalid flag value, determining that the first value is a valid value.
In one possible design, before determining the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window, the method further includes:
determining a first sliding window and a second sliding window on the annular structure according to the last pressing position; wherein the first sliding window is positioned on the right side of the last pressing position; the second sliding window is positioned at the left side of the last pressing position;
and determining a first value interval corresponding to the first sliding window and a second value interval corresponding to the second sliding window.
In one possible design, the determining the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window includes:
If the second value is located in the first value interval, determining that the direction of the sliding signal is clockwise;
and if the second value is in the second value interval, determining that the direction of the sliding signal is anticlockwise.
In one possible design, the method further comprises:
if the second numerical value is not located in the first value interval and the second value interval, acquiring an absolute value of a difference value between the first numerical value and the second numerical value;
if the absolute value of the difference value is larger than the length of the value interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an invalid value;
and if the absolute value of the difference is not greater than the length of the value interval corresponding to any touch key, determining a second value corresponding to the current pressing position as an effective value.
In one possible design, the obtaining the second value corresponding to the current pressing position includes:
collecting pressing operation aiming at the touch key;
if the change condition of the electric signal corresponding to the pressing operation accords with the change condition of a preset reference signal, a pressing position corresponding to the pressing operation is obtained;
And converting the pressing position into the second value according to the values corresponding to the areas on the annular structure where the N touch keys are arranged.
In one possible design, determining the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window includes:
according to the last pressing position, a first out-of-range sliding window and a second out-of-range sliding window are determined on the annular structure; the first out-of-range sliding window is positioned on the right side of the last pressing position; the second out-of-range sliding window is positioned at the left side of the last pressing position;
determining a third value interval corresponding to the first out-of-range sliding window and a fourth value interval corresponding to the second out-of-range sliding window;
if the second value is located in the third value interval, determining that the direction of the sliding signal is a counterclockwise direction;
and if the second value is positioned in the fourth value interval, determining that the direction of the sliding signal is clockwise.
In a second aspect, an embodiment of the present application provides an MCU, where a touch sensing controller is integrated on the MCU, and the touch sensing controller is connected to N touch keys through N channels, and is configured to collect touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1; the MCU includes:
The acquisition module is used for acquiring a second value corresponding to the current pressing position when the first value corresponding to the last pressing position is an effective value, wherein the last pressing position and the current pressing position correspond to at least one of the N touch keys;
the first determining module is used for determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window.
In one possible design, the method further comprises: a construction module for:
according to the clockwise sequence, constructing the numerical values corresponding to all areas on the annular structure arranged by the N touch keys; wherein the corresponding values of the areas at different positions are different.
In one possible design, the method further comprises: the judging module is used for:
reading a first numerical value corresponding to the last pressing position;
if the first numerical value is an invalid marking value, determining that the first numerical value is an invalid value; when the conversion amount of the electric signal generated by the pressing position is smaller than a preset threshold value, setting the first numerical value as an invalid marking value;
and if the first value is not the invalid flag value, determining that the first value is a valid value.
In one possible design, the method further comprises: a second determining module, configured to:
Determining a first sliding window and a second sliding window on the annular structure according to the last pressing position; wherein the first sliding window is positioned on the right side of the last pressing position; the second sliding window is positioned at the left side of the last pressing position;
and determining a first value interval corresponding to the first sliding window and a second value interval corresponding to the second sliding window.
In one possible design, the first determining module is specifically configured to:
if the second value is located in the first value interval, determining that the direction of the sliding signal is clockwise;
and if the second value is in the second value interval, determining that the direction of the sliding signal is anticlockwise.
In one possible design, the method further comprises: a processing module for:
if the second numerical value is not located in the first value interval and the second value interval, acquiring an absolute value of a difference value between the first numerical value and the second numerical value;
if the absolute value of the difference value is larger than the length of the value interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an invalid value;
And if the absolute value of the difference is not greater than the length of the value interval corresponding to any touch key, determining a second value corresponding to the current pressing position as an effective value.
In one possible design, the acquisition module is specifically configured to:
collecting pressing operation aiming at the touch key;
if the change condition of the electric signal corresponding to the pressing operation accords with the change condition of a preset reference signal, a pressing position corresponding to the pressing operation is obtained;
and converting the pressing position into the second value according to the values corresponding to the areas on the annular structure where the N touch keys are arranged.
In one possible design, the first determining module is further configured to:
according to the last pressing position, a first out-of-range sliding window and a second out-of-range sliding window are determined on the annular structure; the first out-of-range sliding window is positioned on the right side of the last pressing position; the second out-of-range sliding window is positioned at the left side of the last pressing position;
determining a third value interval corresponding to the first out-of-range sliding window and a fourth value interval corresponding to the second out-of-range sliding window;
If the second value is located in the third value interval, determining that the direction of the sliding signal is a counterclockwise direction;
and if the second value is positioned in the fourth value interval, determining that the direction of the sliding signal is clockwise.
In a third aspect, an embodiment of the present application provides a touch device, including: the micro control unit MCU is integrated with a touch sensing controller, and the touch sensing controller is connected with N touch keys through N channels and used for acquiring touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1; the MCU is configured to perform the method for identifying a sliding signal according to any of the first aspects.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium comprising: program instructions which, when run on a computer, cause the computer to execute the program instructions to implement the method of identifying a sliding signal as claimed in any one of the first aspects.
According to the sliding signal identification method, the MCU, the touch equipment and the storage medium, the micro control unit MCU is used for acquiring a first value corresponding to the last pressing position, and if the first value is an effective value, a second value corresponding to the current pressing position is acquired; and determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window. The MCU is integrated with a touch sensing controller, and the touch sensing controller is connected with N touch keys through N channels and is used for acquiring touch signals of the N touch keys; the last pressed position and the current pressed position correspond to at least one of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1. The method can accurately identify the sliding operation direction of the user for the sensor, and improves the identification accuracy of the touch sensor.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will simply refer to the drawings used in the description of the embodiments or the prior art. It will be apparent to those of ordinary skill in the art that the drawings in the following description are of some embodiments of the present application and that other drawings may be derived from these drawings without inventive faculty.
FIG. 1 is a schematic diagram of an application scenario of the present application;
FIG. 2 is a flowchart of a method for identifying a sliding signal according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of coordinates of a circular touch sensor according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a position of a dual sliding window according to an embodiment of the present disclosure;
FIG. 5 is a flow chart of dual sliding window determination according to an embodiment of the present disclosure;
FIG. 6 is a schematic flow chart of out-of-range processing and dual sliding window determination according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of an MCU according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The technical scheme of the present application is described in detail below with specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Touch devices are frequently used in daily life of people, such as gas cookers, touch lamps, and the like. Among these touch devices are: the touch control device comprises a micro control unit (Microcontroller Unit, MCU) and touch keys, wherein the MCU is integrated with a touch sensing controller, and a channel exists between the touch sensing controller and the touch keys, so that the direction of a sliding signal aiming at the touch control device is determined according to signals acquired by the channel. The touch key can be arranged on the touch screen or the touch panel without the display function, and the electrode array is arranged below the touch key, when a finger of a user presses the touch key, a capacitor is formed between the electrode array and the finger, so that a corresponding voltage change signal is generated, and the voltage change signal is collected by the touch sensing controller of the MCU through the channel, so that the MCU can generate a control signal corresponding to the touch key according to the voltage change signal. The slave touch-sensing controller integrated in the MCU may also be referred to as a touch-sensing circuit. The channel may be a metal electrode wire or a channel formed by adding a resistor, a capacitor, other components or circuits to the metal electrode wire.
Currently, a general method for judging a sliding direction is to record a position of initial contact and a position of departure of a finger of a user, then subtract a value corresponding to the position of departure from a value corresponding to the position of initial contact, and judge the sliding direction according to the positive and negative of a difference value.
However, in the above-described method, only the position change upon contact and separation is recorded, and if the user slides in the opposite direction during the middle, the state information of the middle sliding is lost, so that the action behavior of the user cannot be accurately described. In addition, in the special case of the circular touch sensor connected end to end, when the finger slides from the tail to the head, the sliding direction cannot be correctly determined in the above manner.
Aiming at the technical problems, the application provides a sliding signal identification method, an MCU, touch equipment and a storage medium, which can accurately identify the sliding operation direction of a user aiming at a sensor and improve the identification precision of the touch sensor. The kernel in the present application may be a core arithmetic unit in products such as a micro control unit (Microcontroller Unit, MCU), a central processing unit (Central Processing Unit/Processor, CPU), etc. for performing operations of calculation, receiving/storing commands, data processing, etc.
Fig. 1 is a schematic diagram of an application scenario of the present application, and as shown in fig. 1, the touch device includes: the micro-control unit (Microcontroller Unit, MCU) and touch keys, wherein the MCU is integrated with a touch sensing controller, and the touch sensing controller is connected with the N touch keys through N channels and used for acquiring touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1. For example, as shown in fig. 1, a circular touch key is equivalent to a touch key or unit consisting of 6 touch keys, each touch key or unit being connected to a touch sensing controller through a channel, for example: the keys 0, 1, 2, 3, 4, 5 are connected with the touch sensing controller through channels 0, 1, 2, 3, 4, 5 respectively. And the MCU acquires data of each channel of the circular touch sensor controller according to a preset frequency to complete data acquisition. Then, whether the collected value has a pressing action is judged according to whether the change condition of the electric signal corresponding to the pressing operation accords with the change condition of a preset reference signal, for example, whether the collected value has the pressing action is judged according to the change of the voltage value of the channel. If the pressing action is performed, the pressing position is converted into a second value according to the values corresponding to the areas on the annular structure, wherein the N touch keys are arranged on the annular structure. And then, determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window. Therefore, the sliding operation direction of the user for the sensor can be accurately identified, and the identification accuracy of the touch sensor is improved.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a method for identifying a sliding signal, which is provided in an embodiment of the present application, and is applied to a micro control unit MCU, where a touch sensor controller is integrated on the MCU, and the touch sensor controller is connected to N touch keys through N channels, so as to collect touch signals of the N touch keys; the N touch keys are arranged into an annular structure, N is an integer greater than 1, as shown in fig. 2, and the method comprises the following steps:
step S201: and if the first value corresponding to the last pressing position is an effective value, acquiring the second value corresponding to the current pressing position.
In this embodiment, the last pressed position and the current pressed position correspond to at least one of the N touch keys. Firstly, reading a first numerical value corresponding to the last pressing position; if the first value is an invalid flag value, determining that the first value is an invalid value; when the conversion amount of the electric signal generated by the pressing position is smaller than a preset threshold value, setting a first numerical value as an invalid marking value; if the first value is not an invalid flag value, the first value is determined to be a valid value. And when the first value corresponding to the last pressing position is a valid value, reading the second value corresponding to the current pressing position.
Illustratively, a pressing operation for a touch key is collected; if the change condition of the electric signal corresponding to the pressing operation accords with the change condition of the preset reference signal, a pressing position corresponding to the pressing operation is obtained; and converting the pressing position into a second value according to the values corresponding to the areas on the annular structure where the N touch keys are arranged. Similarly, it may be determined whether the second value corresponding to the current pressing position is a valid value in the above manner, and if so, step S202 is performed; and if the second numerical value is an invalid value, the second numerical value corresponding to the current pressing position is read again until the read second numerical value is an valid value.
Step S202: and determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window.
In this embodiment, the correspondence between different values and the pressed position is known in advance, so the position of the last press and the position of the current press can be determined according to the first value and the second value. Optionally, the numerical values corresponding to the areas on the annular structure where the N touch keys are arranged can be constructed according to the clockwise order; wherein the corresponding values of the areas at different positions are different.
In a specific implementation process, first, coordinates are established for a circular touch sensor, fig. 3 is a schematic diagram of coordinates of the circular touch sensor provided in an embodiment of the present application, and as shown in fig. 3, n touch keys are all arranged on the circular touch sensor, and are respectively key 0, key 1, key 2, … and key n in a clockwise order. The left position of key 0 is set to 0 and the right position of key n is set to a maximum value 255. Of course, the maximum lifting value may be adjusted to 1023, for example, according to the actual accuracy requirement. The relative distance of each key center position point is 256/n. After the coordinates are established, the pressing position value of 0 to 255 can be calculated by pressing action at any position on the circular touch sensor. During the sliding process, the position information is calculated in real time at the frequency of data acquisition. It should be noted that, electrodes arranged in an array are arranged below the touch keys, so that the pressed positions can be determined according to the electric signal conversion of each electrode, and the accuracy of the determined positions is far greater than the accuracy of key indication.
Optionally, determining a first sliding window and a second sliding window on the annular structure according to the last pressing position; wherein the first sliding window is positioned on the right side of the last pressing position; the second sliding window is positioned at the left side of the last pressing position; and determining a first value interval corresponding to the first sliding window and a second value interval corresponding to the second sliding window. If the second value is located in the first value interval, determining that the direction of the sliding signal is clockwise; if the second value is located in the second value interval, the direction of the sliding signal is determined to be anticlockwise.
For example, a circular touch sensor disposed on a touch screen is taken as an example for detailed description, and the circular touch sensor is provided with touch keys that are arranged in an annular manner, so that the circular touch sensor can reflect not only a pressed/non-pressed state and pressed position information, but also a direction (clockwise or counterclockwise) of a sliding operation for the touch keys through an algorithm. In this embodiment, a sliding direction discriminating method of double sliding windows and out-of-limit processing is adopted to improve accuracy of touch action recognition. The basic design thought of the double sliding windows is that the finger calculates and records the current finger pressing position in real time in the sliding process, and the current position is taken as a center point, and the left side and the right side of the double sliding windows are respectively divided into a judging window. Outputting a left sliding event if the position calculated by the next data acquisition or several data acquisitions falls on the left sliding window, outputting a right sliding event if the position calculated by the next data acquisition or several data acquisitions falls on the right sliding window, and outputting no event if the pressing position falls outside the two windows. After the slide event is output, the position is updated to the current pressing position, and the next discrimination is started. The out-of-range processing is an indispensable part of the circular touch sensor, and the main idea is that before judging the sliding direction, whether data is out of range or not is judged first, normal sliding direction judgment is carried out without out of range, and if out of range, left sliding or right sliding is judged according to the variation. When the finger slides from the head to the tail or from the tail to the head, the position change amount is large, and by utilizing the data characteristic, the sliding condition of the finger during the boundary crossing can be judged.
For example, the sliding directions of the circular touch sensor are classified into clockwise and counterclockwise directions, so after determining the position information, two sliding windows need to be designed to discriminate the sliding directions. FIG. 4 is a schematic view of the positions of the dual sliding windows according to an embodiment of the present application, as shown in FIG. 4, the first sliding window and the second sliding window may be defined on the annular structure centering around the pressing position; the first sliding window is positioned on the right side of the last pressing position and used for representing a window range sliding clockwise; the second sliding window is positioned on the left side of the last pressed position and is used for representing the window range sliding anticlockwise. The length of the sliding window can be set to a fixed value, such as 256/(2 n), and can be flexibly adjustable according to the frequency of data acquisition. The position of the sliding window may be calculated from the pressed position. Let last-pressed position last_coordinate be x, then the first value interval corresponding to the first sliding window may be set as [ x+256/(2 n), x+256/n ], and the second value interval corresponding to the second sliding window may be set as [ x-256/n, x-256/(2 n) ].
Optionally, if the second value is not located in the first value interval and the second value interval, acquiring an absolute value of a difference value between the first value and the second value; if the absolute value of the difference value is larger than the length of the value interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an invalid value; and if the absolute value of the difference value is not greater than the length of the value interval corresponding to any touch key, determining a second value corresponding to the current pressing position as an effective value.
Fig. 5 is a schematic flow chart of dual sliding window discrimination according to an embodiment of the present application, as shown in fig. 5, in a specific operation process, firstly, the MCU collects data of each channel of the circular touch sensor controller according to a preset frequency, so as to complete data collection. Then, whether the collected value has a pressing action or not is judged according to the condition that the change condition of the electric signal corresponding to the pressing operation accords with the change condition of a preset reference signal, for example, whether the collected value has the pressing action or not is judged according to the change of the voltage value of the channel. If the pressing action is performed, the pressing position is converted into a second numerical position according to the numerical value corresponding to each region on the annular structure arranged by the N touch keys. If the pressing action is not performed, the first value last_association corresponding to the last pressing position is set to be an invalid value-1, and the MCU continues data acquisition. Then, it is determined whether the first value last_integral corresponding to the last pressed position is a valid value. If the last_coordinate is not the effective value, the second value position corresponding to the current pressing position is assigned to the last_coordinate, and the MCU continues data acquisition. If last_pivot is a valid value, the position of the sliding window is determined according to the finger pressing position. Let the first value last_coordinate corresponding to the last pressed position be x, the first value interval representing the clockwise direction is [ x+256/(2 n), x+256/n ], and the second value interval representing the counterclockwise window direction is [ x-256/n, x-256/(2 n) ]. If the second value is located in the first value interval, that is, the second value position corresponding to the current pressing position is in the clockwise window position [ x+256/(2 n), x+256/n ], determining that the direction of the sliding signal is clockwise, and assigning the second value position corresponding to the current pressing position to last_coordinate. If the second value is located in the second value interval, that is, the second value position corresponding to the current pressing position is located in the anticlockwise window position [ x-256/n, x-256/(2 n) ], determining that the direction of the sliding signal is anticlockwise, and assigning the second value position corresponding to the current pressing position to last_coordinate. If the second value position is not located in the first value interval and the second value interval, the absolute value |position-x| of the difference value between the first value and the second value is obtained, and the |position-x| is compared with the length 256/n of the value interval. If the absolute value of the difference value is larger than the length of a value interval corresponding to any touch key, namely |position-x| >256/n, determining that the current pressing position is invalid, and returning to continuously collecting the next pressing after setting the first value last_coordinate as an invalid value; if the absolute value of the difference value is not greater than the length of the value interval corresponding to any touch key, namely |position-x| is not more than 256/n, determining the second value corresponding to the current pressing position as an effective value, not outputting any event, and continuing to judge the sliding direction. The last_pivot is set to an invalid value at |position-x| >256/n in order to avoid misjudging the double-finger alternate click as a sliding operation. In summary, through the technical scheme of the application, various operation conditions during sliding, such as slow sliding or fast sliding, can be effectively met. For slow sliding, the calculated positions can be slowly accumulated to the positions of the sliding windows through multiple times of acquisition, and correct sliding is output. For fast sliding, the high refresh rate of data acquisition can enable the sliding position to fall into the window range, and correct sliding identification can be performed.
Optionally, determining a first out-of-range sliding window and a second out-of-range sliding window on the annular structure according to the last pressing position; the first out-of-range sliding window is positioned on the right side of the last pressing position; the second out-of-range sliding window is positioned at the left side of the last pressing position; determining a third value interval corresponding to the first out-of-range sliding window and a fourth value interval corresponding to the second out-of-range sliding window; if the second value is located in the third value interval, determining that the direction of the sliding signal is a counterclockwise direction; if the second value is located in the fourth value interval, the direction of the sliding signal is determined to be clockwise.
Illustratively, when the finger slides from the right side of the 0 position to the left side 255, the amount of change in data increases but slides counterclockwise at this time, and when the finger slides from the left side of 255 to the right side of the 0 position, the amount of change in data decreases but slides clockwise at this time. Coordinate out-of-range processing is required for this case. The out-of-range processing needs to determine a first out-of-range sliding window and a second out-of-range sliding window on the annular structure according to the last pressing position; the first out-of-range sliding window is positioned on the right side of the last pressing position; the second out-of-range sliding window is positioned on the left side of the last pressed position. According to the description, the third value interval corresponding to the first out-of-range sliding window is determined to be [ x+256-256/n, x+256-256/(2 n) ], the fourth value interval corresponding to the second out-of-range sliding window is determined to be [ x- (256-256/(2 n)), and x- (256-256/n) ], wherein x represents the value corresponding to the last pressing position.
Fig. 6 is a schematic flow chart of the out-of-range processing and the dual sliding window determination according to an embodiment of the present application, where, as shown in fig. 6, the flow chart shown in fig. 6 is different from the flow chart shown in fig. 5 in that before determining whether the second value is in the first value interval or the second value interval, out-of-range processing logic is added first, that is, determining whether the second value is in the third value interval or the fourth value interval. In a specific processing flow, if the second value is located in the third value interval, that is, the second value position corresponding to the current pressing position is located in the counterclockwise window position [ x+256-256/n, x+256-256/(2 n) ], the direction of the sliding signal is determined to be counterclockwise, and the second value position corresponding to the current pressing position is assigned to last_association. If the second value is located in the fourth value interval, that is, the second value position corresponding to the current pressing position is located in the clockwise window position [ x- (256-256/(2 n)), x- (256-256/n) ], determining that the direction of the sliding signal is the reverse clockwise direction, and assigning the second value position corresponding to the current pressing position to last_coordinate. If the second position is not located in the third value interval and the fourth value interval, further judging whether the second position is located in the first value interval and the second value interval, and not further described herein.
In this embodiment, the MCU obtains a first value corresponding to the previous pressing position, and if the first value is an effective value, obtains a second value corresponding to the current pressing position; and determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window. The MCU is integrated with a touch sensing controller, and the touch sensing controller is connected with N touch keys through N channels and is used for acquiring touch signals of the N touch keys; the last pressed position and the current pressed position correspond to at least one of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1. The method can accurately identify the sliding operation direction of the user for the sensor, and improves the identification accuracy of the touch sensor.
FIG. 7 is a schematic diagram of an MCU integrated with a touch sensor controller connected to N touch keys through N channels for collecting touch signals of the N touch keys according to an embodiment of the present application; wherein N touch keys are arranged into an annular structure, and N is an integer greater than 1; as shown in fig. 7, the MCU includes:
The acquisition module 701 is configured to acquire a second value corresponding to the current pressing position when the first value corresponding to the last pressing position is an effective value, where the last pressing position and the current pressing position correspond to at least one of the N touch keys;
the first determining module 702 is configured to determine a direction of the sliding signal according to a relationship between the second value and a value interval corresponding to the sliding window.
In one possible design, the method further comprises: a construction module 703, configured to:
according to the clockwise sequence, constructing the numerical values corresponding to all the areas on the annular structure where the N touch keys are arranged; wherein the corresponding values of the areas at different positions are different.
In one possible design, the method further comprises: a judging module 704, configured to:
reading a first numerical value corresponding to the last pressing position;
if the first value is an invalid flag value, determining that the first value is an invalid value; when the conversion amount of the electric signal generated by the pressing position is smaller than a preset threshold value, setting a first numerical value as an invalid marking value;
if the first value is not an invalid flag value, the first value is determined to be a valid value.
In one possible design, the method further comprises: a second determining module 705, configured to:
Determining a first sliding window and a second sliding window on the annular structure according to the last pressing position; wherein the first sliding window is positioned on the right side of the last pressing position; the second sliding window is positioned at the left side of the last pressing position;
and determining a first value interval corresponding to the first sliding window and a second value interval corresponding to the second sliding window.
In one possible design, the first determining module 702 is specifically configured to:
if the second value is located in the first value interval, determining that the direction of the sliding signal is clockwise;
if the second value is located in the second value interval, the direction of the sliding signal is determined to be anticlockwise.
In one possible design, the method further comprises: a processing module 706, configured to:
if the second numerical value is not located in the first value interval and the second value interval, acquiring an absolute value of a difference value between the first numerical value and the second numerical value;
if the absolute value of the difference value is larger than the length of the value interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an invalid value;
and if the absolute value of the difference value is not greater than the length of the value interval corresponding to any touch key, determining a second value corresponding to the current pressing position as an effective value.
In one possible design, the acquisition module 701 is specifically configured to:
collecting pressing operation for a touch key;
if the change condition of the electric signal corresponding to the pressing operation accords with the change condition of the preset reference signal, a pressing position corresponding to the pressing operation is obtained;
and converting the pressing position into a second value according to the values corresponding to the areas on the annular structure where the N touch keys are arranged.
In one possible design, the first determining module 702 is further configured to:
according to the last pressing position, determining a first out-of-range sliding window and a second out-of-range sliding window on the annular structure; the first out-of-range sliding window is positioned on the right side of the last pressing position; the second out-of-range sliding window is positioned at the left side of the last pressing position;
determining a third value interval corresponding to the first out-of-range sliding window and a fourth value interval corresponding to the second out-of-range sliding window;
if the second value is located in the third value interval, determining that the direction of the sliding signal is a counterclockwise direction;
if the second value is located in the fourth value interval, the direction of the sliding signal is determined to be clockwise.
The MCU provided in the present application may perform the above method for identifying a sliding signal, and the content and effects thereof may refer to the method embodiment section, which is not described herein.
The present application also provides a touch device, which exemplarily includes: the micro control unit MCU is integrated with a touch sensing controller, and the touch sensing controller is connected with N touch keys through N channels and is used for acquiring touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1. For example, as shown in fig. 1, a circular touch key is equivalent to a touch key or unit consisting of 6 touch keys, each touch key or unit being connected to a touch sensing controller through a channel, for example: the keys 0, 1, 2, 3, 4, 5 are connected with the touch sensing controller through channels 0, 1, 2, 3, 4, 5 respectively. The content and effects of the above-mentioned identification method for the sliding signal by using the MCU may refer to the embodiment of the method, and will not be described herein.
The present application further provides a readable storage medium, which includes program instructions, when the program instructions are executed on a computer, cause the computer to execute the method for identifying a sliding signal as described above, and the content and effects thereof may refer to the method embodiment section, which is not repeated herein.
The present application further provides a computer program product, which includes program instructions for testing the above-mentioned method for identifying a sliding signal, and the content and effects thereof may refer to the method embodiment section, which is not described herein.

Claims (14)

1. The identification method of the sliding signal is characterized by being applied to a Micro Control Unit (MCU), wherein a touch sensing controller is integrated on the MCU and is connected with N touch keys through N channels for acquiring the touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1; the method comprises the following steps:
if the first value corresponding to the last pressing position is an effective value, acquiring a second value corresponding to the current pressing position, wherein the last pressing position and the current pressing position correspond to at least one of the N touch keys;
determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window;
before the second value corresponding to the current pressing position is acquired, the method further comprises the following steps:
according to the clockwise sequence, constructing the numerical values corresponding to all areas on the annular structure arranged by the N touch keys; wherein the corresponding values of the areas at different positions are different;
before determining the direction of the sliding signal according to the relation between the second value and the value interval corresponding to the sliding window, the method further comprises:
Determining a first sliding window and a second sliding window on the annular structure according to the last pressing position; wherein the first sliding window is positioned on the right side of the last pressing position; the second sliding window is positioned at the left side of the last pressing position;
and determining a first value interval corresponding to the first sliding window and a second value interval corresponding to the second sliding window.
2. The method of claim 1, further comprising, prior to obtaining the second value corresponding to the current compression position:
reading a first numerical value corresponding to the last pressing position;
if the first numerical value is an invalid marking value, determining that the first numerical value is an invalid value; when the conversion amount of the electric signal generated by the pressing position is smaller than a preset threshold value, setting the first numerical value as an invalid marking value;
and if the first value is not the invalid flag value, determining that the first value is a valid value.
3. The method according to claim 1, wherein determining the direction of the sliding signal according to the relationship between the second value and the value interval corresponding to the sliding window includes:
If the second value is located in the first value interval, determining that the direction of the sliding signal is clockwise;
and if the second value is in the second value interval, determining that the direction of the sliding signal is anticlockwise.
4. A method according to claim 3, further comprising:
if the second numerical value is not located in the first value interval and the second value interval, acquiring an absolute value of a difference value between the first numerical value and the second numerical value;
if the absolute value of the difference value is larger than the length of the value interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an invalid value;
and if the absolute value of the difference is not greater than the length of the value interval corresponding to any touch key, determining a second value corresponding to the current pressing position as an effective value.
5. The method of claim 1, wherein the obtaining a second value corresponding to the current pressing location comprises:
collecting pressing operation aiming at the touch key;
if the change condition of the electric signal corresponding to the pressing operation accords with the change condition of a preset reference signal, a pressing position corresponding to the pressing operation is obtained;
And converting the pressing position into the second value according to the values corresponding to the areas on the annular structure where the N touch keys are arranged.
6. The method according to any one of claims 1-5, wherein determining the direction of the sliding signal according to the relation between the second value and the value interval corresponding to the sliding window comprises:
according to the last pressing position, a first out-of-range sliding window and a second out-of-range sliding window are determined on the annular structure; the first out-of-range sliding window is positioned on the right side of the last pressing position; the second out-of-range sliding window is positioned at the left side of the last pressing position;
determining a third value interval corresponding to the first out-of-range sliding window and a fourth value interval corresponding to the second out-of-range sliding window;
if the second value is located in the third value interval, determining that the direction of the sliding signal is a counterclockwise direction;
and if the second value is positioned in the fourth value interval, determining that the direction of the sliding signal is clockwise.
7. The MCU is characterized in that a touch sensing controller is integrated on the MCU, and the touch sensing controller is connected with N touch keys through N channels and is used for collecting touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1; the MCU includes:
The acquisition module is used for acquiring a second value corresponding to the current pressing position when the first value corresponding to the last pressing position is an effective value, wherein the last pressing position and the current pressing position correspond to at least one of the N touch keys;
the first determining module is used for determining the direction of the sliding signal according to the relation between the second numerical value and the value interval corresponding to the sliding window;
the construction module is used for constructing the numerical values corresponding to all the areas on the annular structure arranged by the N touch keys according to the clockwise sequence; wherein the corresponding values of the areas at different positions are different;
a second determining module, configured to determine a first sliding window and a second sliding window on the annular structure according to the last pressing position; wherein the first sliding window is positioned on the right side of the last pressing position; the second sliding window is positioned at the left side of the last pressing position;
and determining a first value interval corresponding to the first sliding window and a second value interval corresponding to the second sliding window.
8. The MCU of claim 7, further comprising: the judging module is used for:
Reading a first numerical value corresponding to the last pressing position;
if the first numerical value is an invalid marking value, determining that the first numerical value is an invalid value; when the conversion amount of the electric signal generated by the pressing position is smaller than a preset threshold value, setting the first numerical value as an invalid marking value;
and if the first value is not the invalid flag value, determining that the first value is a valid value.
9. The MCU of claim 7, wherein the first determination module is specifically configured to:
if the second value is located in the first value interval, determining that the direction of the sliding signal is clockwise;
and if the second value is in the second value interval, determining that the direction of the sliding signal is anticlockwise.
10. The MCU of claim 9, further comprising: a processing module for:
if the second numerical value is not located in the first value interval and the second value interval, acquiring an absolute value of a difference value between the first numerical value and the second numerical value;
if the absolute value of the difference value is larger than the length of the value interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an invalid value;
And if the absolute value of the difference is not greater than the length of the value interval corresponding to any touch key, determining a second value corresponding to the current pressing position as an effective value.
11. The MCU of claim 7, wherein the acquisition module is specifically configured to:
collecting pressing operation aiming at the touch key;
if the change condition of the electric signal corresponding to the pressing operation accords with the change condition of a preset reference signal, a pressing position corresponding to the pressing operation is obtained;
and converting the pressing position into the second value according to the values corresponding to the areas on the annular structure where the N touch keys are arranged.
12. The MCU of any of claims 7-11, wherein the first determination module is further configured to:
according to the last pressing position, a first out-of-range sliding window and a second out-of-range sliding window are determined on the annular structure; the first out-of-range sliding window is positioned on the right side of the last pressing position; the second out-of-range sliding window is positioned at the left side of the last pressing position;
determining a third value interval corresponding to the first out-of-range sliding window and a fourth value interval corresponding to the second out-of-range sliding window;
If the second value is located in the third value interval, determining that the direction of the sliding signal is a counterclockwise direction;
and if the second value is positioned in the fourth value interval, determining that the direction of the sliding signal is clockwise.
13. A touch device, comprising: the micro control unit MCU is integrated with a touch sensing controller, and the touch sensing controller is connected with N touch keys through N channels and used for acquiring touch signals of the N touch keys; the N touch keys are arranged into an annular structure, and N is an integer greater than 1; the MCU is adapted to perform the method of identification of a sliding signal as claimed in any one of claims 1-6.
14. A computer-readable storage medium, comprising: program instructions which, when run on a computer, cause the computer to execute the program instructions to implement the method of identifying a sliding signal as claimed in any one of claims 1 to 6.
CN201980002442.0A 2019-10-29 2019-10-29 Identification method of sliding signal, MCU, touch equipment and storage medium Active CN110945464B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/113929 WO2021081738A1 (en) 2019-10-29 2019-10-29 Slide signal recognition method, mcu, touch-control device, and storage medium

Publications (2)

Publication Number Publication Date
CN110945464A CN110945464A (en) 2020-03-31
CN110945464B true CN110945464B (en) 2023-05-02

Family

ID=69913372

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201980002442.0A Active CN110945464B (en) 2019-10-29 2019-10-29 Identification method of sliding signal, MCU, touch equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110945464B (en)
WO (1) WO2021081738A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532226A (en) * 2020-11-05 2021-03-19 广东瑞德智能科技股份有限公司 Novel touch man-machine interaction processing method
CN113437960A (en) * 2021-08-13 2021-09-24 四川中微芯成科技有限公司 Method for realizing annular touch by capacitive touch key
CN114415857B (en) * 2022-01-19 2024-02-09 惠州Tcl移动通信有限公司 Terminal operation method and device, terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009145593A2 (en) * 2008-05-29 2009-12-03 Oh Eui Jin Data input device
CN101641663A (en) * 2007-06-18 2010-02-03 苹果公司 Sensor construction in the user input apparatus
WO2011093678A2 (en) * 2010-01-28 2011-08-04 Kim Jun Control method of touch device and touch device using the same
CN103472948A (en) * 2013-09-03 2013-12-25 小米科技有限责任公司 Method and device for remote-control processing of touch screen terminal and terminal
CN103472949A (en) * 2013-09-03 2013-12-25 小米科技有限责任公司 Method and device for remote-control processing of touch screen terminal and terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1808751A1 (en) * 2005-12-23 2007-07-18 The Swatch Group Research and Development Ltd. Touch-sensitive electronic control device for performing a cursor function
KR101259116B1 (en) * 2006-09-29 2013-04-26 엘지전자 주식회사 Controller and Method for generation of key code on remote controller thereof
CN102612212A (en) * 2012-02-23 2012-07-25 鸿富锦精密工业(深圳)有限公司 Lamp and switch device thereof
CN103001625B (en) * 2012-12-11 2016-09-21 深圳Tcl新技术有限公司 Capacitive touch key panel and control method, electronic installation
CN106301325B (en) * 2016-08-11 2019-12-27 青岛海信电器股份有限公司 Touch identification method and device of capacitive touch key
CN106354418B (en) * 2016-11-16 2019-07-09 腾讯科技(深圳)有限公司 A kind of control method and device based on touch screen

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101641663A (en) * 2007-06-18 2010-02-03 苹果公司 Sensor construction in the user input apparatus
WO2009145593A2 (en) * 2008-05-29 2009-12-03 Oh Eui Jin Data input device
WO2011093678A2 (en) * 2010-01-28 2011-08-04 Kim Jun Control method of touch device and touch device using the same
CN103472948A (en) * 2013-09-03 2013-12-25 小米科技有限责任公司 Method and device for remote-control processing of touch screen terminal and terminal
CN103472949A (en) * 2013-09-03 2013-12-25 小米科技有限责任公司 Method and device for remote-control processing of touch screen terminal and terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名."Linux-Touchscreen Driver for X".https://blog.51cto.com/prothesman/1411589.2012,全文. *
吴学毅 ; .OSG多点触控自然用户接口框架.计算机系统应用.2017,(第03期),全文. *

Also Published As

Publication number Publication date
WO2021081738A1 (en) 2021-05-06
CN110945464A (en) 2020-03-31

Similar Documents

Publication Publication Date Title
CN110945464B (en) Identification method of sliding signal, MCU, touch equipment and storage medium
JP5451181B2 (en) Sensor device for detecting contact or proximity of an object
EP3410285B1 (en) Electronic device and detection method
CN102043552B (en) The method and apparatus of capacitive position detection
EP0973123A1 (en) Finger sensor operating technique
US8866794B2 (en) Statistical analyzing method and statistical quality indicator for reliability improvement of a capacitive touch device
CN104915586A (en) Screen unlocking method and device of terminal and terminal
US10248231B2 (en) Electronic device with fingerprint detection
CN111078053B (en) Touch data reporting method, device and storage medium
EP3547088A1 (en) Noise detection method and device, electronic apparatus, and computer readable storage medium
US20120262193A1 (en) Waveform dividing method for a capacitive touch control device
US20150193068A1 (en) Method and apparatus for sensing touch pressure of touch panel and touch sensing apparatus using the same
CN108803940B (en) Touch identification method and device and touch display device
US10228792B2 (en) Touch determining device and method, and display device
KR101928318B1 (en) Pressure detection method and pressure detection device
EP3287881B1 (en) Method and device for use in detecting pressure
CN104750333A (en) Touch device and method for updating reference two-dimensional sensing information thereof
CN113316759A (en) Capacitance detection circuit, touch chip and electronic equipment
CN113721139B (en) Key detection method and system
WO2017128584A1 (en) Method and apparatus for identifying type of pressure on pressure screen
CN113126813B (en) Correction method and device for key misjudgment, terminal equipment and storage medium
CN111459346B (en) Capacitive touch device and gesture recognition method, chip and storage medium thereof
CN109298798B (en) Operation control method and device of touch pad and intelligent terminal
CN111078983B (en) Method for determining page to be identified and learning equipment
CN109661644A (en) A kind of pressure touch method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant