CN110959256B - Control method, MCU, touch equipment and storage medium - Google Patents

Control method, MCU, touch equipment and storage medium Download PDF

Info

Publication number
CN110959256B
CN110959256B CN201980002408.3A CN201980002408A CN110959256B CN 110959256 B CN110959256 B CN 110959256B CN 201980002408 A CN201980002408 A CN 201980002408A CN 110959256 B CN110959256 B CN 110959256B
Authority
CN
China
Prior art keywords
channels
mcu
voltages
sampling frequency
channel
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
CN201980002408.3A
Other languages
Chinese (zh)
Other versions
CN110959256A (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 CN110959256A publication Critical patent/CN110959256A/en
Application granted granted Critical
Publication of CN110959256B publication Critical patent/CN110959256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/94Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
    • H03K17/96Touch switches
    • H03K17/962Capacitive touch switches
    • 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/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)
  • Electronic Switches (AREA)

Abstract

The application provides a control method, MCU, touch equipment and storage medium, and the method is applied to micro control unit MCU, and MCU is connected with N touch button through N passageway, and N passageway and N touch button one-to-one, and N is the integer that is greater than 1, and the method includes: collecting voltages on all channels in a first channel set at a first sampling frequency; wherein the first set of channels includes at least one channel; if the voltages of all channels in the first channel set meet a first preset condition, acquiring the voltages on the N channels at a second sampling frequency; processing the voltages on the N channels to output corresponding control instructions; wherein the first sampling frequency is less than the second sampling frequency. The MCU does not need to work at the second sampling frequency for a long time, and the power consumption of the MCU is reduced.

Description

Control method, MCU, touch equipment and storage medium
Technical Field
The present invention relates to the field of touch technologies, and in particular, to a control method, an MCU, a touch device, and a storage medium.
Background
At present, touch control equipment is frequently used in daily life of people, such as gas cookers, touch control lamps and the like. Among these touch devices are: a micro control unit (Microcontroller Unit, MCU) and a plurality of touch keys, wherein a channel exists between the MCU and each touch key, and a touch sensor is disposed under each touch key, so the above touch keys may also be referred to as touch sensing electrodes.
The operating principle of the touch control equipment is as follows: be provided with touch module and time-recorder in the MCU, a plurality of channels work based on same time-recorder, arbitrary touch button can be understood as a electric capacity, the touch module periodically scans a plurality of channels in proper order (gather the output voltage of electric capacity touch sensor promptly), when the finger presses on this touch button, human body can become a electric capacity with ground, this electric capacity is in the same place with touch button concatenation to lead to the electric capacity grow of touch button, and then the output voltage of electric capacity touch sensor diminishes, software program handles scan data in the MCU, and then judge whether the finger presses the touch button, and judge which way passageway is pressed by the finger.
Because the MCU needs to scan a plurality of channels at a certain sampling frequency for a long time, the MCU has higher power consumption.
Disclosure of Invention
The application provides a control method, an MCU, touch equipment and a storage medium, and solves the problem of high power consumption in the prior art. In addition, as a preferable scheme, the technical problem that the response of the MCU is not timely when the sampling frequency is reduced is solved.
In a first aspect, the present invention provides a control method, the method being applied to a micro control unit MCU, the MCU being connected to N touch keys through N channels, the N channels corresponding to the N touch keys one to one, N being an integer greater than 1, the method comprising:
collecting voltages on all channels in a first channel set at a first sampling frequency; wherein the first set of channels includes at least one channel of the N channels;
if the voltages of all channels in the first channel set meet a first preset condition, acquiring the voltages on the N channels at a second sampling frequency;
processing the voltages on the N channels to output corresponding control instructions;
wherein the first sampling frequency is less than the second sampling frequency.
Optionally, the first preset condition includes:
the number of channels meeting the second preset condition reaches the preset first number;
wherein the second preset condition includes:
aiming at multi-frame voltage data on one channel, the number of the first voltages reaches a preset second number;
the first voltage is the voltage on the channel within a first preset threshold range;
or alternatively
The first preset condition includes:
the number of second voltages reaches a third number; the second voltage is the voltage of any frame on any channel within a second preset threshold range.
Optionally, collecting voltages on the N channels at the second sampling frequency further comprises:
after voltages on the N channels are acquired at the second sampling frequency, voltages on all channels in the first set of channels are acquired at the first sampling frequency.
Optionally, after the voltages on the N channels are collected at the second sampling frequency, the method specifically includes:
after the multi-frame voltage data on the N channels is acquired at the second sampling frequency.
Optionally, before collecting voltages on all channels in the first set of channels at the first sampling frequency, further comprising:
determining the current sampled times;
determining a first channel set according to the current sampled times and a preset sampling mapping table;
the sampling mapping table is used for representing a one-to-one mapping relation between the sampled times and the first channel set, and the sampled times refer to the times of sampling at the first sampling frequency.
Optionally, the sampling mapping table satisfies the following condition:
when traversing all of the sampled times in the sample map, N channels have been acquired at the first acquisition frequency.
Optionally, the number of channels in the first set of channels is less than N; or alternatively
The number of channels in the first set of channels is 1.
In a second aspect, the present invention provides an MCU, the MCU being connected to N touch keys through N channels, the N channels corresponding to the N touch keys one to one, N being an integer greater than 1, the MCU comprising:
the acquisition module is used for acquiring the voltages on all channels in the first channel set at a first sampling frequency; wherein the first set of channels includes at least one channel of the N channels;
the acquisition module is further used for acquiring the voltages on the N channels at the second sampling frequency if the voltages of all the channels in the first channel set meet a first preset condition;
the processing module is used for processing the voltages on the N channels so as to output corresponding control instructions;
wherein the first sampling frequency is less than the second sampling frequency.
Optionally, the first preset condition includes:
the number of channels meeting the second preset condition reaches the preset first number;
wherein the second preset condition includes:
aiming at multi-frame voltage data on one channel, the number of the first voltages reaches a preset second number;
the first voltage is the voltage on the channel within a first preset threshold range;
or alternatively
The first preset condition includes:
the number of second voltages reaches a third number; the second voltage is a voltage on any channel within a second preset threshold range.
Optionally, the acquisition module is further configured to:
after the voltages on the N channels are collected at the second sampling frequency, the voltages of any frame on all channels in the first set of channels are collected at the first sampling frequency.
Optionally, after the voltages on the N channels are collected at the second sampling frequency, the method specifically includes:
after the multi-frame voltage data on the N channels is acquired at the second sampling frequency.
Optionally, the method further comprises: a determining module; the determining module is specifically configured to:
determining the current sampled times;
determining a first channel set according to the current sampled times and a preset sampling mapping table;
the sampling mapping table is used for representing a one-to-one mapping relation between the sampled times and the first channel set, and the sampled times refer to the times of sampling at the first sampling frequency.
Optionally, the sampling mapping table satisfies the following condition:
when traversing all of the sampled times in the sample map, N channels have been acquired at the first acquisition frequency.
Optionally, the number of channels in the first set of channels is less than N; or alternatively
The number of channels in the first set of channels is 1.
In a third aspect, the present invention provides an MCU for performing the control method according to the first aspect and the optional aspects.
In a fourth aspect, the present invention provides a touch device, including: the MCU is connected with the N touch keys through N channels, the N channels are in one-to-one correspondence with the N touch keys, N is an integer greater than 1, and the MCU is used for executing the control method related to the first aspect and the optional scheme.
In a fifth aspect, the present invention provides a readable storage medium comprising program instructions which, when run on a computer, cause the computer to perform the control method of the first aspect and optionally related thereto.
In the control method, voltages on all channels in a first channel set are collected at a first sampling frequency, the first sampling frequency is smaller than a second sampling frequency, namely, the MCU is enabled to work in a low-power consumption mode, whether the voltages of all channels in the first channel set meet a first preset condition is judged, if the voltages meet the first preset condition, a high-power consumption mode is entered, and the voltages on N channels are collected at the second sampling frequency. According to the control method provided by the invention, the MCU is enabled to work in the low-power-consumption mode preferentially, and when the first preset condition is met, the MCU is switched to the high-power-consumption mode, so that the power consumption of the MCU is reduced. In addition, in order to reduce the power consumption, if the first sampling frequency is too low, the response timeliness of the MCU to the touch keys of the user is reduced, and as a preferred method, the number of channels in the first channel set is set to be smaller than N, namely only the voltage on a part of channels is collected, so that the power consumption of the MCU is reduced, and the response timeliness of the MCU is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic diagram of connection of an MCU and a touch key;
FIG. 2 is a flow chart of a control method according to an exemplary embodiment of the present invention;
FIG. 3 is a flow chart of a control method according to another exemplary embodiment of the present invention;
fig. 4 is a schematic structural diagram of an MCU according to an exemplary embodiment of the present invention.
Detailed Description
For the purposes of making 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 drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
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, for example, in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described above, the current touch device includes: a micro control unit (Microcontroller Unit, MCU) and touch keys, wherein a channel exists between the MCU and the touch keys. FIG. 1 is a schematic diagram illustrating connection between an MCU and a touch key, as shown in FIG. 1, a typical touch key currently in existence includes: the touch keys are all provided with touch sensors below, so that the touch keys can also be called touch sensing electrodes, such as keys 0, 1 and 2 in fig. 1 are all key type touch keys, key 3 is a circular type touch key, and key 4 is a slide type touch key. The sliding bar type touch key is equivalent to being composed of 3 touch keys or units, the circular type touch key is equivalent to being composed of 4 touch keys or units, and each touch key or unit is connected with the MCU through a channel, for example: the keys 0, 1 and 2 are respectively connected with the MCU through channels 0, 1 and 2, the circular touch key 3 is respectively connected with the MCU through channels 3, 4,5 and 6, and the circular touch key 4 is respectively connected with the MCU through channels 7, 8 and 9. It should be noted that, the touch key to be mentioned below in this application may be the above key type touch key, or one of the slide bar type touch keys, or one of the circular type touch keys.
The working principle of MCU is: the MCU is assumed to support 24 paths, namely, the MCU is connected with 24 keys through 24 paths, and the MCU collects voltages on the 24 paths based on the same timer. When a user presses a certain key, a capacitor is formed between the user and the ground, the key can be also regarded as a capacitor, the capacitance value is larger than before, correspondingly, the voltage on the channel is larger than before, the MCU periodically collects 24 channels of channel voltages, and when detecting that the certain channel voltage meets the preset threshold range, the MCU sends out corresponding instructions. However, since the MCU needs to detect the channel voltage for a long time, the MCU is always in a working state, the power consumption of the MCU is large, and the power consumption of the touch device corresponding to the MCU is increased, if the battery is used to supply power to the touch device, the working time of the battery is shortened.
The application provides a control method, an MCU, touch equipment and a storage medium, and solves the problem of high power consumption in the prior art.
Fig. 2 is a flowchart of a control method according to an exemplary embodiment of the present invention. As shown in fig. 2, the present invention provides a control method, which is applied to a micro control unit MCU, wherein the MCU is connected with N touch keys through N channels, the N channels are in one-to-one correspondence with the N touch keys, and N is an integer greater than 1. As shown in fig. 3, the method comprises the steps of:
s101, the MCU collects voltages on all channels in the first channel set at a first sampling frequency.
More specifically, the first set of channels includes at least one channel; the channel is a channel between the MCU and the touch key. Collecting voltages on all channels in a first channel set at a first sampling frequency, specifically: when one sampling period is finished, the MCU starts a new sampling period, and during the new sampling period, the MCU sequentially collects the voltages of all channels in the first channel set.
S102, the MCU judges whether the voltages of all channels in the first channel set meet a first preset condition; if yes, entering S103; otherwise, the process proceeds to S101.
More specifically, the first preset condition includes: the number of channels meeting the second preset condition reaches the preset first number; wherein the second preset condition includes: for one channel, the number of the first voltages reaches a preset second number; the first voltage is a voltage within a first preset threshold range.
For example: the first set of channels includes 3 channels, a first number of 2 and a second number of 8. The channels in the first channel set are respectively marked as: channel 1, channel 2 and channel 3. For each channel, 10 frames of voltage data on the channel are collected over a period of time. And respectively judging whether 10 frames of voltage data on the channel 1 are within a first preset threshold range, if 7 frames of voltage data on the channel 1 are within the first preset threshold range, the first voltage quantity on the channel 1 is 7, the first voltage quantity is smaller than the preset voltage, and the channel 1 does not meet a second preset condition. If 8 frames of voltage data and 9 frames of voltage data are respectively arranged on the channel 2 and the channel 3 and are within the first preset threshold range, the channel 2 and the channel 3 meet the second preset condition. And if the number of the channels meeting the second preset condition is 2, the voltages of all the channels in the first channel set meet the first preset condition.
Optionally, the first preset condition includes: the number of second voltages reaches a third number; the second voltage is a voltage on any channel within a second preset threshold range.
For example: the first set of channels includes 3 channels and the third number is 20. The channels in the first channel set are respectively marked as: channel 1, channel 2 and channel 3. For each channel, 10 frames of voltage data on the channel are collected over a period of time. If the number of voltages satisfying the second preset threshold range on the channel 1, the channel 2 and the channel 3 is respectively: 6. 7, 8, the number of second voltages is 21. The number of second voltages reaches the third number, and therefore, the voltages of all channels in the first channel set satisfy the first preset condition.
S103, the MCU collects voltages on the N channels at a second sampling frequency.
More specifically, the first sampling frequency is less than the second sampling frequency. The MCU collects the voltages on the N channels at the second sampling frequency specifically as follows: when one sampling period is finished, the MCU starts a new sampling period, and the MCU sequentially collects the voltages of N channels during the new sampling period.
S104, processing the voltages on the N channels to output corresponding control instructions.
More specifically, when the MCU collects voltages on the N channels, the voltages on the N channels are processed, and corresponding control instructions are output according to the processing results.
The control principle of the control method provided by the invention is described below: the MCU preferentially works in a low-power consumption mode, wherein the low-power consumption mode is to collect all channel voltages in the first channel set at the first collection frequency. And judging whether the mode switching condition is met, namely whether all channel voltages in the first channel set meet a first preset condition, and if the mode switching condition is met, switching to a high-power consumption mode. The voltages on the N channels are collected at the second sampling frequency, the voltages on the N channels are processed, and corresponding control instructions are output. By enabling the MCU to work in the low power consumption mode preferentially, after the user presses the key, the MCU enters the high power consumption mode, and therefore power consumption of the MCU can be reduced.
Optionally, the control method provided by the invention further comprises the following steps: after the MCU collects the voltages on the N channels at the second sampling frequency, the MCU collects the voltages on all channels in the first channel set at the first sampling frequency. The above steps may be between S103 and S104, or may be after S104. After detecting that the user presses the key, the MCU enters a high power consumption mode, and when the MCU collects voltages on N channels, the MCU enters a low power consumption mode, so that the time of the MCU running in the high power consumption mode can be reduced, and the power consumption of the MCU is further reduced.
In this embodiment, after the MCU collects the multi-frame voltages on N channels at the second sampling frequency, it enters a low power consumption mode, that is, collects the voltages on all channels in the first channel set at the first sampling frequency. After the MCU collects the multi-frame voltages on the N channels at the second sampling frequency, that is, after each channel of the N channels has multi-frame voltage data, the MCU can generate a control instruction according to the multi-frame voltages on the N channels, so that the control reliability is improved.
In the control method provided by the embodiment, the MCU collects voltages on the channels of the first set at the first sampling frequency, and determines whether the voltages on all the channels in the first set meet the first preset condition, and if so, collects voltages on the N channels at the second sampling frequency. Wherein the first sampling frequency is less than the second sampling frequency. The MCU does not need to work at the second sampling frequency for a long time, and preferentially works at the low frequency, so that the power consumption of the MCU is reduced.
Fig. 3 is a flowchart of a control method according to an exemplary embodiment of the present invention. As shown in fig. 3, the present invention provides a control method, which is applied to a micro control unit MCU, wherein the MCU is connected with N touch keys through N channels, the N channels are in one-to-one correspondence with the N touch keys, and N is an integer greater than 1. As shown in fig. 3, the method comprises the steps of:
s201, the MCU determines the current sampled times.
More specifically, the sampled number refers to the number of times sampling is performed at the first sampling frequency. All channels in the first channel set are collected once. When the sampled times have reached a preset value, an initialization process is required for the sampled times.
S202, the MCU determines a first channel set according to the current sampled times and a preset sampling mapping table.
More specifically, the sampling map is used to represent a one-to-one mapping relationship of the sampled times to the first set of channels. The sample mapping table satisfies the following condition: when traversing all of the sampled times in the sample map, N channels have been acquired at the first acquisition frequency.
As an alternative, the number of channels in the first set of channels is smaller than N, i.e. part of the channels are comprised in the first set of channels. To ensure that each channel is acquired, it is necessary to acquire it in turn. For example: MCU supports and gathers 24 way passageways, marks in proper order: 1. 2,3, … …, 24. The first channel set includes 3 channels, then 8 acquisitions are required to have 24 channels acquired. The sample map is shown in table 1 below:
table 1 sample mapping table
Number of times of sampling 0 1 2 3
First channel set 1,2,3 4,5,6 7,8,9 10,11,12
Number of times of sampling 4 5 6 7
First channel set 13,14,15 16,17,18 19,20,21 22,23,24
In the above-mentioned sampling mapping table, the sampled times 0 to 7 correspond to 8 first channel sets, and the channel sets formed by the 8 first channel sets are {1,2,3 … …,24}, and when the first channel sets are sampled to reach one round, sampling of all paths can be realized.
As an alternative, the number of channels in the first channel set may be 1, i.e. the voltage on 1 channel is collected at the first frequency, and the MCU power consumption may be minimized. The MCU supports 24 paths of acquisition, the first channel set comprises 1 path of channels, and a sampling mapping table is shown in the following table 2:
table 2 sample mapping table
Number of times of sampling 0 1 2 3 4 5 6 7
First channel set 1 2 3 4 5 6 7 8
Number of times of sampling 8 9 10 11 12 13 14 15
First channel set 9 10 11 12 13 14 15 16
Number of times of sampling 16 17 18 19 20 21 22 23
First channel set 17 18 19 20 21 22 23 24
As another alternative, the number of channels in the first set of channels may be equal to N, i.e. all channels are comprised in the first set of channels. For example: the MCU supports 24 channels to be collected, the first channel set comprises 24 channels, and the 24 channels can be collected only by once collection. The sample map is shown in table 3 below:
table 3 sample mapping table
Number of times of sampling 1
First channel set 1,2,3……,24
In the above-described sample mapping table, the first set of channels already includes 24 channels.
S203 to S206 are the same as S101 to S104 in the embodiment shown in fig. 2, and are not described here again.
The control principle of the control method provided by the invention is described below: and configuring a frequency division coefficient of a timer, and configuring a sampling mapping table and a preset threshold range of channel voltage. The system source clock provides a first timer through a first frequency divider and the system source clock provides a second timer through a second frequency divider. The sample map is shown in table 1, where only 3 channels are sampled at each sampling. When the system enters the low power consumption mode for the first time, the sampled times are 0 times, the corresponding first channel set is {1,2,3}, the system source clock provides a first timer for the MCU, the first timer starts to count, and the voltages of 3 channels are sequentially collected. After the first timer times out, the MCU processes the acquired data and judges whether the data needs to be switched to a high power consumption mode. In the timing process of the first timer, only the first timer works, and other parts of the MCU do not work. After the first timer times out, other parts of the MCU work again, and higher energy consumption cannot be generated. If the acquired voltage meets the first preset condition, the system source clock provides a second timer for the MCU. The second timer starts timing, sequentially collects voltages on 24 channels, then generates interruption, and the MCU processes data and outputs corresponding instructions. After the voltage on 24 channels is collected, a system source clock provides a first timer and enters a low power consumption mode, at the moment, the sampled times are updated to 1, the corresponding first channel set is {4,5,6}, and sampling is carried out at a first sampling frequency. When the sampled times are updated to 7, if the low power consumption mode is entered again, the sampled times need to be updated, and the acquired times are updated to 0.
In the control method provided by the embodiment, the number of the acquisition channels in the low-power consumption mode is reduced, the MCU can be further reduced, and full coverage of all channels is realized under the condition of reducing the acquisition channels in turn in a mode of acquisition, so that quick response is realized when a user presses a touch key.
Fig. 4 is a schematic structural diagram of an MCU according to an exemplary embodiment of the present invention. As shown in fig. 4, the present invention provides an MCU, which is connected to N touch keys through N channels, where N channels are in one-to-one correspondence with N touch keys, N is an integer greater than 1, and the MCU includes:
an acquisition module 301, configured to acquire voltages on all channels in the first channel set at a first sampling frequency; wherein the first set of channels includes channels;
the acquisition module 301 is further configured to acquire voltages on the N channels at the second sampling frequency if voltages of all channels in the first channel set meet a first preset condition;
the processing module 302 is configured to process voltages on the N channels to output corresponding control instructions;
wherein the first sampling frequency is less than the second sampling frequency.
Optionally, the first preset condition includes:
the number of channels meeting the second preset condition reaches the preset first number;
wherein the second preset condition includes:
for one channel, the number of the first voltages reaches a preset second number;
the first voltage is the voltage on the channel within a first preset threshold range;
the first preset condition includes: the number of second voltages reaches a third number; the second voltage is a voltage on any channel within a second preset threshold range.
Optionally, the acquisition module 301 is further configured to:
after the voltages on the N channels are collected, the voltages on all channels in the first set of channels are collected at a first sampling frequency.
Optionally, the method further comprises: a determining module 303; the determining module is specifically configured to:
determining the current sampled times;
determining a first channel set according to the current sampled times and a preset sampling mapping table;
the sampling mapping table is used for representing a one-to-one mapping relation between the sampled times and the first channel set.
Optionally, the sampling mapping table satisfies the following condition: when traversing all of the sampled times in the sample map, N channels have been acquired at the first acquisition frequency.
Optionally, the number of channels in the first set of channels is less than N;
or alternatively
The number of channels in the first set of channels is 1.
The MCU provided in the present application may execute the above-mentioned control method, and the content and effects thereof may refer to the embodiment of the method, which is not described herein.
The present application further provides an MCU, where the MCU is configured to execute the above-mentioned control method, and the content and effects thereof may refer to the embodiment of the method, which will not be described herein.
The present application also provides a touch device, which exemplarily includes: MCU and N touch button, MCU pass through N passageway with N touch button is connected, N passageway with N touch button one-to-one, N is the integer that is greater than 1.
Exemplary, as shown in fig. 1, typical touch keys currently exist including: the key type touch keys, the slide bar type touch keys and the circular type touch keys, such as keys 0, 1 and 2 in fig. 1 are all key type touch keys, the key 3 is a circular type touch key, and the key 4 is a slide bar type touch key. The slide bar type touch key is equivalent to being composed of 3 touch keys or units, and the round type touch key is equivalent to being composed of 4 touch keys or units.
Each touch key or unit is connected to the MCU through a channel, for example: the keys 0, 1 and 2 are respectively connected with the MCU through channels 0, 1 and 2, the key 3 is respectively connected with the MCU through channels 3, 4,5 and 6, and the key 4 is respectively connected with the MCU through channels 7, 8 and 9. The MCU is configured to execute the above-mentioned control method, and the content and effects thereof may refer to the method embodiment section, which is not described herein.
The present application further provides a readable storage medium, including program instructions, which when executed on a computer, cause the computer to perform a control method as described above, and the content and effects thereof may refer to the method embodiment section, which is not described herein.
The present application further provides a computer program product, which includes program instructions for trying out the control method described above, and the content and effects thereof may refer to the method embodiment section, which is not described herein.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (15)

1. The control method is characterized by being applied to a Micro Control Unit (MCU), wherein the MCU is connected with N touch keys through N channels, the N channels are in one-to-one correspondence with the N touch keys, and N is an integer greater than 1, and the method comprises the following steps:
collecting voltages on all channels in a first channel set at a first sampling frequency; wherein the first set of channels includes at least one of the channels of the N channels;
if the voltages of all channels in the first channel set meet a first preset condition, acquiring the voltages on the N channels at a second sampling frequency;
processing the voltages on the N channels to output corresponding control instructions;
wherein the first sampling frequency is less than the second sampling frequency;
the number of channels in the first channel set is less than N; or alternatively
The number of channels in the first set of channels is 1.
2. The method of claim 1, wherein the first preset condition comprises:
the number of channels meeting the second preset condition reaches a preset first number;
the second preset condition includes: aiming at multi-frame voltage data on one channel, the number of the first voltages reaches a preset second number;
the first voltage is the voltage on the channel within a first preset threshold range;
or alternatively
The first preset condition includes:
the number of second voltages reaches a third number; the second voltage is the voltage of any frame on any channel within a second preset threshold range.
3. The method according to claim 1 or 2, further comprising:
after the voltages on the N channels are acquired at the second sampling frequency, the voltages on all channels in the first channel set are acquired at the first sampling frequency.
4. A method according to claim 3, wherein after the voltages on the N channels are acquired at the second sampling frequency, the method specifically comprises:
after the multi-frame voltage data on the N channels are acquired at the second sampling frequency.
5. The method according to claim 1 or 2, characterized in that before said collecting voltages on all channels of the first set of channels at the first sampling frequency, further comprises:
determining the current sampled times;
determining a first channel set according to the current sampled times and a preset sampling mapping table;
the sampling mapping table is used for representing a one-to-one mapping relation between the sampled times and the first channel set.
6. The method of claim 5, wherein the sample mapping table satisfies the following condition:
when traversing all sampled times in the sample map, the N channels have been acquired at the first acquisition frequency.
7. An MCU, its characterized in that, the MCU is connected with N touch button through N passageway, N passageway with N touch button one-to-one, N is the integer that is greater than 1, the MCU includes:
the acquisition module is used for acquiring the voltages on all channels in the first channel set at a first sampling frequency; wherein the first set of channels includes at least one of the channels of the N channels;
the acquisition module is further configured to acquire voltages on the N channels at a second sampling frequency if voltages of all channels in the first channel set meet a first preset condition;
the processing module is used for processing the voltages on the N channels so as to output corresponding control instructions;
wherein the first sampling frequency is less than the second sampling frequency;
the number of channels in the first channel set is less than N; or alternatively
The number of channels in the first set of channels is 1.
8. The MCU of claim 7, wherein the first preset condition comprises:
the number of channels meeting the second preset condition reaches the preset first number;
the second preset condition includes: aiming at multi-frame voltage data on one channel, the number of the first voltages reaches a preset second number;
the first voltage is a voltage within a preset threshold range;
or alternatively
The first preset condition includes:
the number of second voltages reaches a third number; the second voltage is the voltage of any frame on any channel within a second preset threshold range.
9. The MCU of claim 7 or 8, wherein the acquisition module is further configured to:
after the voltages on the N channels are acquired at the second sampling frequency, the voltages on all channels in the first channel set are acquired at the first sampling frequency.
10. The MCU of claim 9, wherein after the voltages on the N channels are collected at the second sampling frequency, specifically comprising:
and acquiring multi-frame voltage data on the N channels at the second sampling frequency.
11. The MCU of claim 7 or 8, further comprising: a determining module; the determining module is specifically configured to:
determining the current sampled times;
determining a first channel set according to the current sampled times and a preset sampling mapping table;
the sampling mapping table is used for representing a one-to-one mapping relation between the sampled times and the first channel set.
12. The MCU of claim 11, wherein the sample mapping table satisfies the following condition:
when traversing all sampled times in the sample map, the N channels have been acquired at the first acquisition frequency.
13. An MCU, characterized in that it is adapted to perform a control method according to any of claims 1-6.
14. A touch device, comprising: the MCU is connected with the N touch keys through N channels, the N channels are in one-to-one correspondence with the N touch keys, N is an integer greater than 1, and the MCU is used for executing the control method according to any one of claims 1-6.
15. A readable storage medium comprising program instructions which, when run on a computer, cause the computer to perform the control method of any one of claims 1 to 6.
CN201980002408.3A 2019-10-31 2019-10-31 Control method, MCU, touch equipment and storage medium Active CN110959256B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/114697 WO2021081890A1 (en) 2019-10-31 2019-10-31 Control method, mcu, touch control device, and storage medium

Publications (2)

Publication Number Publication Date
CN110959256A CN110959256A (en) 2020-04-03
CN110959256B true CN110959256B (en) 2024-01-23

Family

ID=69985842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201980002408.3A Active CN110959256B (en) 2019-10-31 2019-10-31 Control method, MCU, touch equipment and storage medium

Country Status (2)

Country Link
CN (1) CN110959256B (en)
WO (1) WO2021081890A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113282194A (en) * 2021-05-31 2021-08-20 中微半导体(深圳)股份有限公司 Low-power-consumption touch detection awakening method and device
CN113419126B (en) * 2021-06-21 2022-12-30 合肥美的暖通设备有限公司 Performance parameter recording method and device, frequency converter, air conditioning equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013129304A1 (en) * 2012-03-02 2013-09-06 Necカシオモバイルコミュニケーションズ株式会社 Touch panel device, information processing device, touch detection method and storage medium
US9013429B1 (en) * 2012-01-14 2015-04-21 Cypress Semiconductor Corporation Multi-stage stylus detection
CN106527701A (en) * 2016-10-26 2017-03-22 国家电网公司 Intelligent wearable device applied to operation and maintenance of wind turbine generator
CN109154873A (en) * 2017-03-16 2019-01-04 深圳市汇顶科技股份有限公司 Touch detecting method and system
CN109426712A (en) * 2017-08-28 2019-03-05 北京小米移动软件有限公司 Unlocked by fingerprint method, apparatus and electronic equipment
CN110310391A (en) * 2019-05-21 2019-10-08 深圳绿米联创科技有限公司 Touch awakening method, device, electronic equipment and storage medium
CN110362225A (en) * 2019-06-18 2019-10-22 腾讯科技(成都)有限公司 Touch screen sample frequency control method, device, medium and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908876A (en) * 2010-07-23 2010-12-08 中颖电子有限公司 Capacitance type touch key system and micro-control unit thereof
US9092098B2 (en) * 2011-04-19 2015-07-28 Cypress Semiconductor Corporation Method and apparatus to improve noise immunity of a touch sense array
TWI442279B (en) * 2011-07-18 2014-06-21 Acer Inc Multiple sampling rate circuits and methods
KR102276911B1 (en) * 2015-01-14 2021-07-13 삼성전자주식회사 Touch controller, touch sensing device and touch sensing method
CN105652193B (en) * 2015-12-31 2018-11-02 深圳Tcl数字技术有限公司 It is adapted to detection device and method for terminal and keypad
GB2565305A (en) * 2017-08-08 2019-02-13 Cambridge Touch Tech Ltd Device for processing signals from a pressure-sensing touch panel
CN108259044B (en) * 2018-02-26 2021-09-07 上海东软载波微电子有限公司 Touch key scanning method and device and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9013429B1 (en) * 2012-01-14 2015-04-21 Cypress Semiconductor Corporation Multi-stage stylus detection
WO2013129304A1 (en) * 2012-03-02 2013-09-06 Necカシオモバイルコミュニケーションズ株式会社 Touch panel device, information processing device, touch detection method and storage medium
CN106527701A (en) * 2016-10-26 2017-03-22 国家电网公司 Intelligent wearable device applied to operation and maintenance of wind turbine generator
CN109154873A (en) * 2017-03-16 2019-01-04 深圳市汇顶科技股份有限公司 Touch detecting method and system
CN109426712A (en) * 2017-08-28 2019-03-05 北京小米移动软件有限公司 Unlocked by fingerprint method, apparatus and electronic equipment
CN110310391A (en) * 2019-05-21 2019-10-08 深圳绿米联创科技有限公司 Touch awakening method, device, electronic equipment and storage medium
CN110362225A (en) * 2019-06-18 2019-10-22 腾讯科技(成都)有限公司 Touch screen sample frequency control method, device, medium and electronic equipment

Also Published As

Publication number Publication date
WO2021081890A1 (en) 2021-05-06
CN110959256A (en) 2020-04-03

Similar Documents

Publication Publication Date Title
CN110959256B (en) Control method, MCU, touch equipment and storage medium
Yan et al. Energy-efficient continuous activity recognition on mobile phones: An activity-adaptive approach
CN109947812B (en) Continuous missing value filling method, data analysis device, terminal and storage medium
CN102788910B (en) Noise detection, scanning and frequency hopping method of mutual capacitance touch screen
CN109182462B (en) Method and device for judging whether detection indexes are positive or negative
CN101853168A (en) Method and device for arranging desktop icons
CN104777383A (en) Non-invasive electrical load monitoring and load decomposing device
CN109470957B (en) Non-invasive electrical appliance identification method based on Frey's distance
EP3547088A1 (en) Noise detection method and device, electronic apparatus, and computer readable storage medium
CN107084556B (en) Control method, device and the computer readable storage medium of condenser
CN103892830A (en) Emotion detection method and system based on human skin resistance changes
CN103268349A (en) Central clinical case database system based on cloud services
CN105138134A (en) Electromyographic signal recognition segmentation method
CN103837836A (en) Synchronous detection battery sensor
CN103323773B (en) Battery electricity display processing method, system and mobile terminal
CN203964992U (en) A kind of distributed water reservoir level monitoring system
CN107492688B (en) A kind of battery maintenance method, apparatus and vehicle
CN210040455U (en) Battery management system and voltage sampling control circuit and electric automobile thereof
CN106228244A (en) A kind of energy based on self adaptation association rule mining depolymerizes method
CN104750965A (en) User exercise state determination method and device
CN113159988B (en) User electric appliance load state analysis method, device, equipment and readable storage medium
CN103006205B (en) Device and method for electrocardiosignal baseline recognition
CN105699807A (en) A supercapacitor electrical characteristic parameter monitoring system and an identification method
CN104090682A (en) Touch system of touch screen and implementing method thereof
CN103235024A (en) Mobile phone system for testing blood sugar, and testing method thereof

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