CN110945464A - Sliding signal identification method, MCU, touch control equipment and storage medium - Google Patents

Sliding signal identification method, MCU, touch control equipment and storage medium Download PDF

Info

Publication number
CN110945464A
CN110945464A CN201980002442.0A CN201980002442A CN110945464A CN 110945464 A CN110945464 A CN 110945464A CN 201980002442 A CN201980002442 A CN 201980002442A CN 110945464 A CN110945464 A CN 110945464A
Authority
CN
China
Prior art keywords
value
numerical value
determining
touch
pressing position
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.)
Granted
Application number
CN201980002442.0A
Other languages
Chinese (zh)
Other versions
CN110945464B (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, a touch device and a storage medium. The method is applied to a Micro Control Unit (MCU), wherein 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 in an annular structure, and N is an integer greater than 1; the method comprises the following steps: if the first numerical value corresponding to the last pressing position is an effective value, acquiring a second numerical 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 relationship 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 precision of the touch sensor is improved.

Description

Sliding signal identification method, MCU, touch control equipment and storage medium
Technical Field
The present application relates to the field of touch technologies, and in particular, to a method for identifying a sliding signal, an MCU, a touch device, and a storage medium.
Background
Touch devices are frequently used in people's daily life, such as gas cookers, touch lamps, and the like. Among these touch devices are: a Micro Control Unit (MCU), wherein the MCU is integrated with a touch sensor controller, and a channel exists between the touch sensor controller and a touch key on a touch screen or a touch panel, so that the direction of a sliding signal for the touch device is determined according to a signal collected by the channel.
Currently, a common method for judging the sliding direction is to record the initial contact position and the leaving position of the finger of the user, subtract the value corresponding to the leaving position from the value corresponding to the initial contact position, and judge the sliding direction according to the positive and negative of the difference.
However, the above method only records the position change just after the contact and the separation, and if the user slides in the opposite direction in the middle process, the state information of the middle slide 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, when the finger slides from the tail to the head, the sliding direction cannot be correctly determined.
Disclosure of Invention
The application provides a sliding signal identification method, an MCU, a touch 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 micro control unit MCU, where the MCU is integrated with a touch sensing controller, and the touch sensing controller is connected with N touch keys through N channels to collect touch signals of the N touch keys; the N touch keys are arranged in an annular structure, and N is an integer greater than 1; the method comprises the following steps:
if the first numerical value corresponding to the last pressing position is a valid value, acquiring a second numerical 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 relationship between the second numerical value and the value interval corresponding to the sliding window.
In a possible design, before obtaining the second value corresponding to the current pressing position, the method further includes:
according to the clockwise sequence, constructing numerical values corresponding to all areas on the annular structure distributed by the N touch keys; wherein, the corresponding numerical values of the areas at different positions are different.
In a possible design, before obtaining 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 marker value, determining that the first numerical value is an invalid value; when the electric signal transformation quantity generated by the pressing position is smaller than a preset threshold value, setting the first numerical value as an invalid marker value;
if the first value is not an invalid marker value, determining that the first value is a valid value.
In a 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 located to the right of the last press position; the second sliding window is positioned on 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 a 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 numerical value is within the first numerical value interval, determining that the direction of the sliding signal is clockwise;
and if the second numerical value is within the second numerical value interval, determining that the direction of the sliding signal is in the counterclockwise direction.
In one possible design, further comprising:
if the second numerical value is not located in the first numerical value interval and the second numerical 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 is larger than the length of the value-taking 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-taking interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an effective value.
In one possible design, the obtaining a 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 meets the change condition of a preset reference signal, acquiring a pressing position corresponding to the pressing operation;
and converting the pressing position into the second numerical value according to the numerical value corresponding to each area on the annular structure distributed by the N touch keys.
In a possible design, determining a direction of the sliding signal according to a relationship between the second value and a value interval corresponding to the sliding window includes:
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; wherein the first out-of-range sliding window is located to the right of the last press position; the second out-of-range sliding window is located on 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 numerical value is within the third numerical value interval, determining that the direction of the sliding signal is in the counterclockwise direction;
and if the second numerical value is within the fourth numerical 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 to collect touch signals of the N touch keys; the N touch keys are arranged in an annular structure, and N is an integer greater than 1; the MCU includes:
the acquisition module is used for acquiring a second numerical value corresponding to the current pressing position when a first numerical 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;
and the first determining module is used for determining the direction of the sliding signal according to the relationship between the second numerical value and the value interval corresponding to the sliding window.
In one possible design, further comprising: a build module to:
according to the clockwise sequence, constructing numerical values corresponding to all areas on the annular structure distributed by the N touch keys; wherein, the corresponding numerical values of the areas at different positions are different.
In one possible design, further comprising: a determination module configured to:
reading a first numerical value corresponding to the last pressing position;
if the first numerical value is an invalid marker value, determining that the first numerical value is an invalid value; when the electric signal transformation quantity generated by the pressing position is smaller than a preset threshold value, setting the first numerical value as an invalid marker value;
if the first value is not an invalid marker value, determining that the first value is a valid value.
In one possible design, further comprising: a second determination module 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 located to the right of the last press position; the second sliding window is positioned on 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 numerical value is within the first numerical value interval, determining that the direction of the sliding signal is clockwise;
and if the second numerical value is within the second numerical value interval, determining that the direction of the sliding signal is in the counterclockwise direction.
In one possible design, further comprising: a processing module to:
if the second numerical value is not located in the first numerical value interval and the second numerical 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 is larger than the length of the value-taking 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-taking interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is 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 meets the change condition of a preset reference signal, acquiring a pressing position corresponding to the pressing operation;
and converting the pressing position into the second numerical value according to the numerical value corresponding to each area on the annular structure distributed by the N touch keys.
In one possible design, the first determining module is further configured to:
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; wherein the first out-of-range sliding window is located to the right of the last press position; the second out-of-range sliding window is located on 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 numerical value is within the third numerical value interval, determining that the direction of the sliding signal is in the counterclockwise direction;
and if the second numerical value is within the fourth numerical 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 touch control system comprises a Micro Control Unit (MCU), wherein 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 in an annular structure, and N is an integer greater than 1; the MCU is used for executing the identification method of the sliding signal in any one of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including: 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 according to any one of the first aspect.
According to the identification method of the sliding signal, the MCU, the touch control equipment and the storage medium, a first numerical value corresponding to the last pressing position is obtained through the MCU, and if the first numerical value is an effective value, a second numerical value corresponding to the current pressing position is obtained; and determining the direction of the sliding signal according to the relationship between the second numerical value and the value interval corresponding to the sliding window. The touch sensing controller is connected with the N touch keys through N channels and used for collecting touch signals of the N touch keys; the last pressing position and the current pressing position correspond to at least one of the N touch keys; the N touch keys are arranged in an annular structure, and N is an integer larger than 1. The method can accurately identify the sliding operation direction of the user aiming at the sensor, and improves the identification precision 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 drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are examples of the present application and that other drawings may be derived by those skilled in the art without inventive exercise.
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 application;
FIG. 3 is a schematic coordinate diagram of a circular touch sensor according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating the position of dual sliding windows according to an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a dual sliding window determination process according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating cross-border 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 clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, article, or apparatus.
The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Touch devices are frequently used in people's daily life, such as gas cookers, touch lamps, and the like. Among these touch devices are: the touch control device comprises a Micro Control Unit (MCU) and a touch key, wherein the MCU is integrated with a touch sensing controller, and a channel exists between the touch sensing controller and the touch key, so that the direction of a sliding signal aiming at the touch control device is determined according to a signal collected by the channel. The touch key can be arranged on a touch screen or a touch panel without a display function, the electrode array is arranged below the touch key, when a user presses the touch key with a finger, a capacitor is formed between the electrode array and the finger, a corresponding voltage change signal is generated, the voltage change signal is collected by a touch sensing controller of the MCU through a channel, and the MCU can generate a control signal corresponding to the touch key according to the voltage change signal. The slave touch sense controller integrated in the MCU may also be referred to as a touch sense circuit. The channel may be a metal electrode wire, or may also be a channel formed by a metal electrode wire plus a resistor, a capacitor, other components or circuits.
Currently, a common method for judging the sliding direction is to record the initial contact position and the leaving position of the finger of the user, subtract the value corresponding to the leaving position from the value corresponding to the initial contact position, and judge the sliding direction according to the positive and negative of the difference.
However, the above method only records the position change just after the contact and the separation, and if the user slides in the opposite direction in the middle process, the state information of the middle slide 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, when the finger slides from the tail to the head, the sliding direction cannot be correctly determined.
In view of the above technical problems, the present application provides a method for identifying a sliding signal, an MCU, a touch device, and a storage medium, which can accurately identify a sliding operation direction of a user with respect to a sensor, and improve an identification precision of the touch sensor. The kernel in the present application may be a core arithmetic Unit in a product such as a Microcontroller Unit (MCU), a Central Processing Unit (CPU), and the like, and is used to complete operations such as computation, receiving/storing commands, data processing, and the like.
Fig. 1 is a schematic diagram of an application scenario of the present application, and as shown in fig. 1, a touch device includes: the touch control system comprises a Micro Control Unit (MCU) and touch keys, wherein the MCU is integrated with a touch sensing controller which is connected with the N touch keys through N channels and used for collecting touch signals of the N touch keys; the N touch keys are arranged in a ring structure, and N is an integer greater than 1. Illustratively, as shown in fig. 1, the circular touch key is equivalently composed of 6 touch keys or units, and each touch key or unit is connected with the touch sensing controller through a channel, for example: the keys 0, 1, 2, 3, 4 and 5 are respectively connected with the touch sensing controller through channels 0, 1, 2, 3, 4 and 5. And the MCU collects data of each channel of the circular touch sensing controller according to a preset frequency to finish data collection. 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 meets the change condition of the preset reference signal, for example, whether the pressing action exists is judged according to the change of the voltage value of the channel. And if the touch key is a pressing action, converting the pressing position into a second numerical value according to the numerical value corresponding to each area on the annular structure distributed by the N touch keys. 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 precision of the touch sensor is improved.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated 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 according to an embodiment of the present application, where the method is applied to a micro control unit MCU, and the MCU is integrated with a touch sensor controller, and the touch sensor controller is connected to N touch keys through N channels to collect touch signals of the N touch keys; as shown in fig. 2, the method includes the following steps:
step S201: and if the first numerical value corresponding to the last pressing position is an effective value, acquiring a second numerical 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 numerical value is an invalid marker value, determining that the first numerical value is an invalid value; when the electric signal transformation quantity 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 numerical value corresponding to the last pressing position is an effective value, reading a second numerical value corresponding to the current pressing position.
Illustratively, the pressing operation for the touch key is collected; if the change condition of the electric signal corresponding to the pressing operation meets the change condition of a preset reference signal, acquiring a pressing position corresponding to the pressing operation; and converting the pressing position into a second numerical value according to the numerical value corresponding to each area on the annular structure distributed by the N touch keys. 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 the second value is a valid value, step S202 is executed; and if the second numerical value is an invalid value, re-reading the second numerical value corresponding to the current pressing position until the read second numerical value is an effective 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 pressing position is known in advance, and therefore the position of the last pressing and the position of the current pressing can be determined according to the first value and the second value. Optionally, the numerical values corresponding to the regions on the annular structure where the N touch keys are arranged may be constructed in a clockwise order; wherein, the corresponding numerical values of the areas at different positions are different.
In a specific implementation process, coordinates are first established for the circular touch sensor, fig. 3 is a schematic coordinate diagram of the circular touch sensor provided in an embodiment of the present application, and as shown in fig. 3, n touch keys are commonly provided on the circular touch sensor, and are key 0, key 1, key 2, …, and key n, respectively, 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 of 255. Of course, the maximum value can be increased to 1023 according to the actual accuracy requirement. The relative distance of each key center location point is 256/n. After the coordinates are established, the pressing motion at any position on the circular touch sensor can calculate the pressing position value from 0 to 255. During the sliding process, the position information can be calculated in real time according to the frequency of data acquisition. It should be noted that, the electrodes arranged in an array are disposed below the touch key, so that the pressed position can be determined according to the electrical signal transformation of each electrode, and the determined position accuracy is much higher than the accuracy of the key indication.
Optionally, determining a first sliding window and a second sliding window on the ring structure according to the last pressing position; wherein the first sliding window is positioned at the right side of the last pressing position; the second sliding window is positioned on 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 within the first value interval, determining that the direction of the sliding signal is clockwise; and if the second value is within the second value interval, determining that the direction of the sliding signal is in the anticlockwise direction.
For example, a circular touch sensor disposed on the touch screen is taken as an example to describe in detail, and the circular touch sensor is provided with touch keys arranged in a ring shape, so that the circular touch sensor can not only reflect a pressed/non-pressed state and pressed position information, but also judge a direction (clockwise or counterclockwise direction) of a sliding operation for the touch keys through an algorithm. In the embodiment, a sliding direction distinguishing method of double sliding windows and border crossing processing is adopted, so that the accuracy of touch action recognition is improved. The basic design idea of the double-sliding window 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 central point, and the left side and the right side of the current position are respectively divided into a distinguishing window. And if the position calculated by the next or several data acquisition falls into the left sliding window, outputting a left sliding event, if the position calculated by the next or several data acquisition falls into the right sliding window, outputting a right sliding event, and if the pressing position falls out of the two windows, not outputting any event. After the sliding event is output, the position is updated to the current pressing position, and the next judgment is started. The boundary crossing processing is an indispensable part of the circular touch sensor, and the main idea is that before the sliding direction judgment, whether data cross the boundary or not is judged, the normal sliding direction judgment is carried out if the data do not cross the boundary, and if the data cross the boundary, the left sliding or the 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 variation of the position is large, and the sliding condition of the finger in the boundary crossing process can be judged by utilizing the data characteristic.
Illustratively, the sliding directions of the circular touch sensor are divided into clockwise and counterclockwise directions, so after the position information is determined, two sliding windows need to be designed to distinguish the sliding directions. FIG. 4 is a schematic diagram of the position of the dual sliding windows provided in an embodiment of the present application, as shown in FIG. 4, a first sliding window and a second sliding window may be defined on the ring structure with the pressing position as the center; the first sliding window is positioned on the right side of the last pressing position and used for representing the window range sliding clockwise; the second sliding window is located on the left side of the last pressed position and is used for representing the window range of the counterclockwise sliding. The length of the sliding window can be set to a fixed value, such as 256/(2n), and can be flexibly adjusted according to the frequency of data acquisition. The position of the sliding window can be calculated from the pressed position. Let last _ coordinate be x, then the first value interval corresponding to the first sliding window may be set as [ x +256/(2n), 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, obtaining an absolute value of a difference between the first value and the second value; if the absolute value of the difference is larger than the length of the value-taking 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 that the second value corresponding to the current pressing position is an effective value.
Exemplarily, fig. 5 is a schematic flow chart of the dual-sliding window determination provided in an embodiment of the present application, and as shown in fig. 5, in a specific operation process, an MCU first collects data of each channel of a circular touch sensor controller according to a preset frequency to complete data collection. Then, whether the collected value has a pressing action or not is judged according to the fact that the change condition of the electric signal corresponding to the pressing operation meets the change condition of the preset reference signal, for example, whether the pressing action exists or not is judged according to the change of the voltage value of the channel. And if the touch key is a pressing action, converting the pressing position into a second numerical position according to the numerical value corresponding to each area on the annular structure distributed by the N touch keys. If the pressing action is not the pressing action, the first value last _ code corresponding to the last pressing position is set to be an invalid value-1, and the MCU continues to acquire data. Then, it is determined whether the first value last _ coordinate corresponding to the last pressing position is a valid value. And if last _ cordinate is not a valid value, assigning a second numerical value position corresponding to the current pressing position to last _ cordinate, and continuously acquiring data by the MCU. If last _ coordinate is a valid value, the position of the sliding window is determined according to the finger pressing position. And if the first value last _ coordinate corresponding to the last pressing position is x, the first value interval in the clockwise direction is [ x +256/(2n), x +256/n ], and the second value interval in the counterclockwise window direction is [ x-256/n, x-256/(2 n) ]. And if the second numerical value is located in the first value range, namely the second numerical value position corresponding to the current pressing position is located in a clockwise window position [ x +256/(2n), x +256/n ], determining that the direction of the sliding signal is clockwise, and assigning the second numerical value position corresponding to the current pressing position to last _ cordinate. And if the second numerical value is located in the second value range, namely the second numerical value position corresponding to the current pressing position is located in a counterclockwise window position [ x-256/n, x-256/(2 n) ], determining that the direction of the sliding signal is in the counterclockwise direction, and assigning the second numerical value position corresponding to the current pressing position to last _ cordinate. If the second numerical value position is not located in the first numerical value interval and the second numerical value interval, obtaining an absolute value | position-x | of a difference value between the first numerical value and the second numerical value, and comparing the | position-x | with the length 256/n of the numerical value interval. If the absolute value of the difference value is larger than the length of the value-taking interval corresponding to any touch key, namely | position-x | is larger than 256/n, the current pressing position is determined to be invalid, and the next pressing is continuously collected after the first numerical value last _ cordinate is set as 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, namely | position-x | > is not greater than 256/n, determining that the second numerical value corresponding to the current pressing position is an effective value, outputting no event, and continuing to judge the sliding direction. Last _ coordinate is set to invalid value when | position-x | >256/n, in order to avoid misjudging the double-finger alternate click as a sliding operation. In conclusion, by 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 position can be slowly accumulated to the position of a sliding window through multiple acquisition, and correct sliding is output. For fast sliding, the high refresh rate of data acquisition can make the sliding position fall within the window range, and also can make correct sliding identification.
Optionally, determining a first out-of-range sliding window and a second out-of-range sliding window on the ring-shaped structure according to the last pressing position; wherein the first out-of-range sliding window is positioned on the right side of the last pressing position; the second border crossing sliding window is positioned on 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 within the third value interval, determining that the direction of the sliding signal is in the counterclockwise direction; and if the second value is within the fourth value interval, determining that the direction of the sliding signal is clockwise.
Illustratively, when the finger slides from the position on the right side of the 0 position to the position on the left side 255, the amount of change in the data increases, but this time it slides counterclockwise, and when the finger slides from the position on the left side of 255 to the position on the right side of the 0 position, the amount of change in the data decreases, but this time it slides clockwise. Coordinate boundary crossing processing is required for this case. The border crossing processing needs to determine a first border crossing sliding window and a second border crossing sliding window on the annular structure according to the last pressing position; wherein 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 located to the left of the last press position. According to the above description, it is determined that the third value section corresponding to the first boundary-crossing sliding window is [ x + 256-.
Fig. 6 is a schematic flowchart of a process of the boundary crossing processing and the dual sliding window determination provided in an embodiment of the present application, and as shown in fig. 6, the process shown in fig. 6 is different from the process shown in fig. 5 in that before determining whether the second value is in the first value-taking interval or the second value-taking interval, a boundary crossing processing logic is added first, that is, it is determined whether the second value is in the third value-taking interval or the fourth value-taking interval. In a specific processing flow, if the second value is located in the third value-taking interval, that is, the second value position corresponding to the current pressing position is within the counterclockwise window position [ x + 256-. If the second value is located in the fourth value range, that is, the second value position corresponding to the current pressing position is within the clockwise window position [ x- (256-plus 256/(2n)), x- (256-plus 256/n) ], determining that the direction of the sliding signal is clockwise and counterclockwise, and assigning the second value position corresponding to the current pressing position to last _ cordinate. If the second numerical value position is not located in the third value interval and the fourth value interval, whether the second numerical value position is located in the first value interval and the second value interval is further judged, and the description is omitted here.
In this embodiment, a first numerical value corresponding to a last pressing position is obtained through the micro control unit MCU, and if the first numerical value is an effective value, a second numerical value corresponding to a current pressing position is obtained; 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 touch sensing controller is connected with the N touch keys through N channels and used for collecting touch signals of the N touch keys; the last pressing position and the current pressing position correspond to at least one of the N touch keys; the N touch keys are arranged in a ring structure, and N is an integer greater than 1. The method can accurately identify the sliding operation direction of the user aiming at the sensor, and improves the identification precision of the touch sensor.
Fig. 7 is a schematic diagram of an MCU according to an embodiment of the present application, in which a touch sensing controller is integrated on the MCU, and the touch sensing controller is connected to N touch keys through N channels to collect touch signals of the N touch keys; the N touch keys are arranged in 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 numerical value corresponding to a current pressing position when a first numerical value corresponding to a 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;
a first determining module 702, configured to determine a direction of the sliding signal according to a relationship between the second value and the value interval corresponding to the sliding window.
In one possible design, further comprising: a building module 703 for:
according to the clockwise sequence, numerical values corresponding to all areas on the annular structure distributed by the N touch keys are constructed; wherein, the corresponding numerical values of the areas at different positions are different.
In one possible design, further comprising: a determining module 704, configured to:
reading a first numerical value corresponding to the last pressing position;
if the first numerical value is an invalid marker value, determining that the first numerical value is an invalid value; when the electric signal transformation quantity 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, further comprising: 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 at the right side of the last pressing position; the second sliding window is positioned on 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 within the first value interval, determining that the direction of the sliding signal is clockwise;
and if the second value is within the second value interval, determining that the direction of the sliding signal is in the anticlockwise direction.
In one possible design, further comprising: a processing module 706 configured to:
if the second numerical value is not in the first numerical value interval and the second numerical 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 is larger than the length of the value-taking 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 that the second value corresponding to the current pressing position is an effective value.
In one possible design, the acquisition module 701 is specifically configured to:
collecting pressing operation aiming at a touch key;
if the change condition of the electric signal corresponding to the pressing operation meets the change condition of a preset reference signal, acquiring a pressing position corresponding to the pressing operation;
and converting the pressing position into a second numerical value according to the numerical value corresponding to each area on the annular structure distributed by the N touch keys.
In one possible design, the first determining module 702 is further configured to:
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; wherein the first out-of-range sliding window is positioned on the right side of the last pressing position; the second border crossing sliding window is positioned on 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 within the third value interval, determining that the direction of the sliding signal is in the counterclockwise direction;
and if the second value is within the fourth value interval, determining that the direction of the sliding signal is clockwise.
The MCU provided in this application can execute the above method for identifying a sliding signal, and the content and effect thereof can refer to the method embodiment section, which is not described herein again.
The present application further provides a touch device, exemplarily, the touch device includes: the touch sensing controller is connected with the N touch keys through N channels and used for collecting touch signals of the N touch keys; the N touch keys are arranged in a ring structure, and N is an integer greater than 1. Illustratively, as shown in fig. 1, the circular touch key is equivalently composed of 6 touch keys or units, and each touch key or unit is connected with the touch sensing controller through a channel, for example: the keys 0, 1, 2, 3, 4 and 5 are respectively connected with the touch sensing controller through channels 0, 1, 2, 3, 4 and 5. The content and effect of the MCU for executing the method for identifying a sliding signal can refer to the embodiment of the method, which is not described herein again.
The present application further provides a readable storage medium, which includes program instructions, and when the program instructions are run on a computer, the computer executes the method for identifying a sliding signal as described above, and the content and effect of the method can refer to the embodiment of the method, which is not described herein again.
The present application further provides a computer program product, which includes a program instruction, where the program instruction is used for testing the method for identifying a sliding signal as described above, and the content and effect of the method can refer to the section of the embodiment of the method, which is not described herein again.

Claims (18)

1. The method for identifying 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 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 in an annular structure, and N is an integer greater than 1; the method comprises the following steps:
if the first numerical value corresponding to the last pressing position is a valid value, acquiring a second numerical 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 relationship between the second numerical value and the value interval corresponding to the sliding window.
2. The method of claim 1, further comprising, prior to obtaining the second value corresponding to the current compression position:
according to the clockwise sequence, constructing numerical values corresponding to all areas on the annular structure distributed by the N touch keys; wherein, the corresponding numerical values of the areas at different positions are different.
3. 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 marker value, determining that the first numerical value is an invalid value; when the electric signal transformation quantity generated by the pressing position is smaller than a preset threshold value, setting the first numerical value as an invalid marker value;
if the first value is not an invalid marker value, determining that the first value is a valid value.
4. The method of claim 1, further comprising, before determining the direction of the sliding signal according to a relationship between the second value and a value range corresponding to the sliding window:
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 located to the right of the last press position; the second sliding window is positioned on 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.
5. The method according to claim 4, 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 comprises:
if the second numerical value is within the first numerical value interval, determining that the direction of the sliding signal is clockwise;
and if the second numerical value is within the second numerical value interval, determining that the direction of the sliding signal is in the counterclockwise direction.
6. The method of claim 5, further comprising:
if the second numerical value is not located in the first numerical value interval and the second numerical 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 is larger than the length of the value-taking 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-taking interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an effective value.
7. The method of claim 2, wherein the obtaining a second numerical value corresponding to the current compression position comprises:
collecting pressing operation aiming at the touch key;
if the change condition of the electric signal corresponding to the pressing operation meets the change condition of a preset reference signal, acquiring a pressing position corresponding to the pressing operation;
and converting the pressing position into the second numerical value according to the numerical value corresponding to each area on the annular structure distributed by the N touch keys.
8. The method according to any one of claims 1 to 7, 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 comprises:
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; wherein the first out-of-range sliding window is located to the right of the last press position; the second out-of-range sliding window is located on 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 numerical value is within the third numerical value interval, determining that the direction of the sliding signal is in the counterclockwise direction;
and if the second numerical value is within the fourth numerical value interval, determining that the direction of the sliding signal is clockwise.
9. 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 used for collecting touch signals of the N touch keys; the N touch keys are arranged in an annular structure, and N is an integer greater than 1; the MCU includes:
the acquisition module is used for acquiring a second numerical value corresponding to the current pressing position when a first numerical 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;
and the first determining module is used for determining the direction of the sliding signal according to the relationship between the second numerical value and the value interval corresponding to the sliding window.
10. The MCU of claim 9, further comprising: a build module to:
according to the clockwise sequence, constructing numerical values corresponding to all areas on the annular structure distributed by the N touch keys; wherein, the corresponding numerical values of the areas at different positions are different.
11. The MCU of claim 9, further comprising: a determination module configured to:
reading a first numerical value corresponding to the last pressing position;
if the first numerical value is an invalid marker value, determining that the first numerical value is an invalid value; when the electric signal transformation quantity generated by the pressing position is smaller than a preset threshold value, setting the first numerical value as an invalid marker value;
if the first value is not an invalid marker value, determining that the first value is a valid value.
12. The MCU of claim 9, further comprising: a second determination module 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 located to the right of the last press position; the second sliding window is positioned on 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.
13. The MCU of claim 12, wherein the first determining module is specifically configured to:
if the second numerical value is within the first numerical value interval, determining that the direction of the sliding signal is clockwise;
and if the second numerical value is within the second numerical value interval, determining that the direction of the sliding signal is in the counterclockwise direction.
14. The MCU of claim 13, further comprising: a processing module to:
if the second numerical value is not located in the first numerical value interval and the second numerical 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 is larger than the length of the value-taking 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-taking interval corresponding to any touch key, determining that a second numerical value corresponding to the current pressing position is an effective value.
15. The MCU of claim 10, 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 meets the change condition of a preset reference signal, acquiring a pressing position corresponding to the pressing operation;
and converting the pressing position into the second numerical value according to the numerical value corresponding to each area on the annular structure distributed by the N touch keys.
16. The MCU of any one of claims 9-15, wherein the first determining module is further configured to:
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; wherein the first out-of-range sliding window is located to the right of the last press position; the second out-of-range sliding window is located on 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 numerical value is within the third numerical value interval, determining that the direction of the sliding signal is in the counterclockwise direction;
and if the second numerical value is within the fourth numerical value interval, determining that the direction of the sliding signal is clockwise.
17. A touch device, comprising: the touch control system comprises a Micro Control Unit (MCU), wherein 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 in an annular structure, and N is an integer greater than 1; the MCU is used for executing the identification method of the sliding signal according to any one of claims 1-8.
18. 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 identification of a sliding signal according to any one of claims 1 to 8.
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 true CN110945464A (en) 2020-03-31
CN110945464B 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)

Cited By (2)

* 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

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415857B (en) * 2022-01-19 2024-02-09 惠州Tcl移动通信有限公司 Terminal operation method and device, terminal and storage medium

Citations (7)

* 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
US20100090968A1 (en) * 2006-09-29 2010-04-15 Jae Kyung Lee Method of generating key code in coordinate recognition device and video device controller using the same
WO2011093678A2 (en) * 2010-01-28 2011-08-04 Kim Jun Control method of touch device and touch device using the same
CN103472949A (en) * 2013-09-03 2013-12-25 小米科技有限责任公司 Method and device for remote-control processing of touch screen terminal and terminal
CN103472948A (en) * 2013-09-03 2013-12-25 小米科技有限责任公司 Method and device for remote-control processing of touch screen terminal and terminal
US20190212916A1 (en) * 2016-11-16 2019-07-11 Tencent Technology (Shenzhen) Company Limited Touch screen-based control method and apparatus

Family Cites Families (4)

* 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
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100090968A1 (en) * 2006-09-29 2010-04-15 Jae Kyung Lee Method of generating key code in coordinate recognition device and video device controller using the same
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
CN103472949A (en) * 2013-09-03 2013-12-25 小米科技有限责任公司 Method and device for remote-control processing of touch screen terminal and terminal
CN103472948A (en) * 2013-09-03 2013-12-25 小米科技有限责任公司 Method and device for remote-control processing of touch screen terminal and terminal
US20190212916A1 (en) * 2016-11-16 2019-07-11 Tencent Technology (Shenzhen) Company Limited Touch screen-based control method and apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名: "\"Linux-Touchscreen Driver for X\"" *
吴学毅;: "OSG多点触控自然用户接口框架" *

Cited By (2)

* 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

Also Published As

Publication number Publication date
WO2021081738A1 (en) 2021-05-06
CN110945464B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN110945464A (en) Sliding signal identification method, MCU, touch control 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
CN105579808A (en) Hard press rejection
CN103218075B (en) The touch-control monitoring method of a kind of Touch Screen and terminal
CN104915586A (en) Screen unlocking method and device of terminal and terminal
US10248231B2 (en) Electronic device with fingerprint detection
CN104391627B (en) Control method and electronic equipment
US20130249852A1 (en) Statistical analyzing method and statistical quality indicator for reliability improvement of a capacitive touch device
CN104866226A (en) Terminal device and method for controlling same
CN110199247A (en) Noise detecting method and device, electronic equipment and computer readable storage medium
KR20170135061A (en) Method and device for acquiring input
CN105589588A (en) Touch system, touch pen, touch device and control method thereof
JP2016177343A (en) Signal processing apparatus, input device, signal processing method, and program
CN114145759A (en) Myoelectric signal compensation method and device, myoelectric detection device and storage medium
US20160139734A1 (en) Input device
CN107870685B (en) Touch operation identification method and device
JP5949010B2 (en) INPUT CONTROL DEVICE, INPUT CONTROL PROGRAM, AND INPUT CONTROL METHOD
CN104750333A (en) Touch device and method for updating reference two-dimensional sensing information thereof
US20180032186A1 (en) Touch determining device and method, and display device
CN111124109A (en) Interactive mode selection method, intelligent terminal, equipment and storage medium
US11175821B2 (en) Pressure touch method and terminal
CN114487784A (en) Capacitance detection circuit, touch chip and electronic equipment
CN110941339B (en) Gesture sensing method, electronic equipment and storage medium

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