Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
The embodiment of the invention provides a method for switching the working state of electronic equipment by using a key, which can effectively reduce the power consumption of a mobile phone and has low cost, and the electronic equipment applying the method for switching the working state of the electronic equipment by using the key.
As shown in fig. 1 and fig. 6, a method for switching an operating state of an electronic device using a key according to an embodiment of the present invention includes the following steps:
s1, when at least one key 2 of the plurality of keys on the electronic device 1 is pressed, outputting a key identification signal corresponding to the pressed key 2;
s2, judging whether the pressed key 2 belongs to a part of keys which are preset in a plurality of keys and used for switching the electronic equipment 1 from the standby dormant state to the normal working state or not according to the key identification signal;
s3, when the pressed key 2 belongs to a part of keys preset among the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operation state, the electronic device 1 is switched from the standby dormant state to the normal operation state.
In the method for switching the operating state of the electronic device by using the keys provided in this embodiment, when the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state as shown in fig. 6, the operating state of the electronic device 1 is switched from the standby dormant state to the normal operating state, which means that the key 2 preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state in the embodiment of the present invention is only a part of keys of the plurality of keys on the electronic device 1, and is not all keys 2 of the plurality of keys;
when the key 2 which is not preset in the plurality of keys on the electronic device 1 and can be used for switching the electronic device 1 from the standby dormant state to the normal working state is pressed down, the electronic device 1 is not switched from the standby dormant state to the normal working state, so that when the electronic device 1 is in the standby dormant state, how to operate the keys by mistake does not cause the power consumption waste of the electronic device 1;
because the keys 2 which belong to the plurality of keys and are preset for switching the electronic equipment 1 from the standby dormant state to the normal working state are only partial keys of the plurality of keys of the electronic equipment 1, compared with any key 2 of all keys 2 in the prior art, the probability of misoperation of any key 2 of the partial keys is smaller, and the possibility of power consumption waste of the electronic equipment 1 caused by misoperation is smaller;
moreover, because the mobile phone is a common electronic device 1 provided with a plurality of keys, the application of the technical scheme of the invention can be used for reducing the probability of misoperation of the keys 2 on the mobile phone, and further reducing the possibility of power consumption waste of the electronic device 1 caused by misoperation of the keys 2, thereby solving the technical problem that the power consumption waste of the mobile phone is larger due to higher probability of misoperation of the keys of the mobile phone in the prior art;
in addition, when the method for switching the working state of the electronic device 1 by using the key 2 provided by the embodiment of the invention is applied to reduce the power consumption of the mobile phone, the display of the mobile phone can achieve the purpose of reducing the power consumption of the mobile phone without adopting an expensive semitransparent LCD, so that the method for switching the working state of the electronic device 1 by using the key 2 provided by the embodiment of the invention has the advantage of low cost compared with the prior art.
As shown in fig. 2 and fig. 6, as an implementation manner of the embodiment, the method for outputting the key identification signal corresponding to the pressed key in the embodiment includes the following steps:
s11, outputting a key identification signal corresponding to the number of rows of the pressed key 2;
s12, a key identification signal corresponding to the number of rows of the pressed key 2 is outputted.
In this embodiment, the sequence of step S11 and step S12 is not limited, step S12 may be executed before step S11, and step S11 and step S12 may be executed simultaneously.
In the prior art, the circuit connection relationship of the keys 2 on most electronic devices 1 and the arrangement of the positions on hardware are that the keys 2 are arranged on the keyboard 3 in a matrix, so that the positions of each key 2 on most electronic devices 1 can be accurately found out through the number of columns and the number of rows, and further, when one key 2 on the keyboard 3 is pressed, which key 2 on the electronic device 1 is specifically pressed is determined by judging the number of rows and the number of columns of the pressed key 2.
Of course, the key identification signal in this embodiment may not correspond to the number of columns or rows of the pressed key 2, for example: the parameters such as the amplitude, the frequency or the phase of the key identification signal output when different keys 2 are pressed can be set differently, so that which key 2 is pressed can be determined according to the parameters such as the amplitude, the frequency or the phase of the key identification signal.
As shown in fig. 4 and fig. 6, as another embodiment of this embodiment, a method for outputting a key identification signal corresponding to a pressed key in this embodiment includes the following steps:
s11, outputting a key identification signal corresponding to the number of rows of the pressed key 2;
s111, judging that the row number of the pressed key 2 belongs to the row number of one key 2 of the preset partial keys for switching the electronic equipment 1 from the standby dormant state to the normal working state in the plurality of keys according to the key identification signal corresponding to the row number of the pressed key 2, and outputting a key identification signal corresponding to the row number of the pressed key 2; or,
as shown in fig. 4 and 6, the method for outputting a key identification signal corresponding to a pressed key in the present embodiment includes the following steps:
s12, outputting a key identification signal corresponding to the row number of the pressed key 2;
s121, according to the key identification signal corresponding to the row number of the pressed key 2, determining that the row number of the pressed key 2 belongs to the row number of one key 2 of the preset partial keys for switching the electronic device 1 from the standby dormant state to the normal operating state, and outputting the key identification signal corresponding to the row number of the pressed key 2.
Since most electronic devices 1 have a plurality of rows and columns of keys 2 on the keyboard 3, for example: the common mobile phone is usually provided with 5 rows and 3 columns of keys 2, and in order to reduce the possibility of misoperation of the keys 2, the smaller the number of the partial keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal working state is, the better the number is, and 1-2 keys 2 are preferred.
In this case, there will be a situation that there are no preset partial keys on partial columns and partial rows on the keyboard 3 for switching the electronic device 1 from the standby/dormant state to the normal operation state, therefore, at this time, it is only necessary to determine whether the column or row of the pressed key 2 belongs to the column or row of one of the keys 2 of the partial keys preset among the keys for switching the electronic device 1 from the standby sleep state to the normal operation state, so as to determine whether the pressed key 2 belongs to the partial keys preset among the keys for switching the electronic device 1 from the standby sleep state to the normal operation state, further, it is not necessary to determine whether the number of rows or columns of the pressed key 2 is the preset number of rows or columns of one key 2 of the partial keys for switching the electronic device 1 from the standby sleep state to the normal operation state.
It can be seen that, in this embodiment, it is not necessary to output both the key identification signal corresponding to the row number of each pressed key 2 and the key identification signal corresponding to the column number of each pressed key 2 when each key 2 is pressed, and further it is not necessary to determine the column number or row number of the pressed key 2 according to the key identification signal, so that the time for outputting the key identification signal corresponding to the column number or row number of the pressed key 2 is saved to a certain extent, and the efficiency of determining the pressed key 2 is improved.
The following describes the above technical solution provided by the embodiment of the present invention in more detail by taking a mobile phone with 15 keys 2 on a keyboard 3 as an example as shown in fig. 5:
suppose that the key "+" and the key "0" of the 15 keys 2 shown in fig. 5 belong to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state;
when the key "3" is pressed, firstly, a key identification signal corresponding to the number of columns of the key "3" is output, and then, according to the key identification signal corresponding to the number of columns of the key "3", the number of columns of the key "3" is judged to be a third column, and since the third column is different from the number of columns of any key 2 in the keys "×" and "0", at this time, a judgment result can be obtained as follows:
the pressed key 2 does not belong to a part of keys preset in the plurality of keys and used for switching the electronic equipment 1 from the standby dormant state to the normal working state;
therefore, the method obtains the judgment result without outputting the key identification signal corresponding to the row number of the key 3 and further without judging the row number of the key 3;
when the key "0" is pressed, firstly, a key identification signal corresponding to the column number of the key "0" is output, then, according to the key identification signal corresponding to the column number of the key "0", the column number of the key "0" is judged to be a second column, the second column is the same as the column number of the key "+" and the key "0" in the key "0", then, a key identification signal corresponding to the row number of the key "0" is output, according to the key identification signal corresponding to the row number of the key "0", the row number of the key "0" is judged to be a fifth row, the row number is also the same as the row number of the key "0", and the column number and the row number of the key "0" in the key "0" are all the same, so that the judgment result is that:
the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operation state.
As shown in fig. 3 and fig. 6, in this embodiment, the method for determining whether the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state according to the key identification signal includes the following steps:
s21, identifying and recording the number of rows of the pressed keys 2 according to the key identification signal corresponding to the number of rows of the pressed keys 2, and determining whether the number of rows of the pressed keys 2 belongs to one of the preset number of rows of the partial keys for switching the electronic device 1 from the standby sleep state to the normal operation state; and/or the presence of a gas in the gas,
s22, identifying and recording the number of rows of the pressed keys 2 according to the key identification signal corresponding to the number of rows of the pressed keys 2, and determining whether the number of rows of the pressed keys 2 belongs to the number of rows of one of the partial keys preset in the plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operation state;
s23, when the number of columns and the number of rows of the pressed key 2 are respectively the number of columns and the number of rows of the same key 2 of the partial keys preset in the plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operation state, the determination result is:
the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operation state.
When the method for determining whether the pressed key 2 belongs to the partial keys preset among the plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operation state according to the key identification signal provided in the present embodiment includes step S21 and step S22, step S21 may be executed first, and step S22 may be executed second, that is, whether the pressed key 2 belongs to one of the partial keys preset among the plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operation state is determined by determining the number of columns of the pressed key 2 first and then determining the number of rows of the pressed key 2.
Naturally, similar to the above method, in this embodiment, the step S22 may be executed first, and then the step S21 is executed, that is, whether the pressed key 2 belongs to one of the partial keys preset in the plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operation state is judged by judging the row number of the pressed key 2 first and then judging the column number of the pressed key 2.
The following still takes a mobile phone with 15 keys 2 on the keyboard 3 as an example as shown in fig. 5 to describe the above technical solution provided by the embodiment of the present invention in more detail:
the key "+" and the key "0" "in the 15 keys 2 are assumed to be part of keys preset in the keys and used for switching the electronic equipment 1 from the standby dormant state to the normal working state;
when the key 2 of the 15 keys 2 on the keyboard 3 is pressed down, firstly, a key identification signal corresponding to the column number of the key 1 is output, then, the column number of the key 1 is identified and recorded as a first column according to the key identification signal corresponding to the column number of the key 1, then, a key identification signal corresponding to the row number of the key 1 is output, and then, the row number of the key 1 is identified and recorded as a second row according to the key identification signal corresponding to the row number of the key 1;
the number of columns of the key "1" is the same as that of the key "+" and that of the key "+" in the key "0", but the number of rows of the key "1" is different from that of the key "+" and that of the key "0", that is, the fifth row, the determination result is:
the pressed key 2 does not belong to a part of preset keys for switching the electronic equipment 1 from the standby dormant state to the normal working state;
when the key "0" is pressed, firstly, outputting a key identification signal corresponding to the column number of the key "0", then, identifying and recording the column number of the key "0" as a second column according to the key identification signal corresponding to the column number of the key "0", then, outputting a key identification signal corresponding to the row number of the key "0", and then, identifying and recording the row number of the key "0" as a fifth row according to the key identification signal corresponding to the row number of the key "0";
the number of columns of the pressed key "0" is the same as the number of columns of the key "0" in the key "0", and the number of rows of the key "0" is the same as the number of rows of the key "0", i.e., the fifth row, so that the result of the determination at this time is:
the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operation state.
The embodiment of the invention also provides the electronic equipment applying the method for switching the working state of the electronic equipment by using the keys.
As shown in fig. 6, the electronic device 1 provided in the embodiment of the present invention includes a keyboard 3, a signal circuit 4, and a control module 5, wherein: the keyboard 3 is provided with a plurality of keys, and the signal circuit 4 is respectively connected with the keys 2 and the control module 5;
a signal circuit 4 for outputting a key identification signal corresponding to the pressed key 2 when at least one key 2 among the plurality of keys is pressed;
the control module 5 is used for judging whether the pressed key 2 belongs to a part of keys which are preset in the plurality of keys and used for switching the electronic equipment 1 from the standby dormant state to the normal working state or not according to the key identification signal;
the control module 5 is further configured to switch the electronic device 1 from the standby dormant state to the normal operating state when the pressed key 2 belongs to a part of keys preset among the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state.
In the electronic device 1 provided in the embodiment of the present invention, the control module 5 can be configured to switch the operating state of the electronic device 1 from the standby dormant state to the normal operating state only when the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state, and thus, in the embodiment of the present invention, the key 2 preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state is only a part of the plurality of keys on the keyboard 3 of the electronic device 1, and is not all the keys 2 in the plurality of keys;
when the key 2 which is not preset and can be used for switching the electronic equipment 1 from the standby dormant state to the normal working state is pressed down in the plurality of keys on the keyboard 3 of the electronic equipment 1, the electronic equipment 1 is not switched from the standby dormant state to the normal working state, so that when the electronic equipment 1 is in the standby dormant state, how to operate the keys by mistake does not cause the power consumption waste of the electronic equipment 1;
because the keys 2 which belong to the plurality of keys and are preset for switching the electronic equipment 1 from the standby dormant state to the normal operating state are only partial keys of the plurality of keys of the electronic equipment 1, compared with any key 2 of all keys 2 in the prior art, any key 2 of the partial keys has a lower probability of being operated by mistake, and the possibility of wasting the power consumption of the electronic equipment 1 caused by misoperation is also lower;
moreover, because the mobile phone is a common electronic device 1 provided with a plurality of keys, the application of the technical scheme of the invention can be used for reducing the probability of misoperation of the keys 2 on the mobile phone, and further reducing the possibility of power consumption waste of the electronic device 1 caused by misoperation of the keys 2, thereby solving the technical problem that the power consumption waste of the mobile phone is larger due to higher probability of misoperation of the keys of the mobile phone in the prior art;
in addition, when the electronic device 1 provided by the embodiment of the present invention is a mobile phone, the display of the mobile phone can achieve the purpose of reducing the power consumption of the mobile phone without using a semitransparent LCD with high price, so that the electronic device 1 provided by the embodiment of the present invention has the advantage of low cost compared with the prior art.
From the above, it can be seen that: since the electronic device 1 provided in the embodiment of the present invention has the same/corresponding specific technical features as the method for switching the operating state of the electronic device 1 using the key 2 provided in the embodiment of the present invention, the same technical effects can be produced, and the same technical problems can be solved.
The signal circuit 4 in the embodiment of the present invention is configured to output a key identification signal corresponding to the number of rows of the pressed keys 2; a signal circuit 4 for outputting a key identification signal corresponding to the number of rows of the pressed key 2;
the control module 5 is configured to identify and record the number of rows of the pressed keys 2 according to the key identification signal corresponding to the number of rows of the pressed keys 2, and determine whether the number of rows of the pressed keys 2 belongs to the number of rows of one of the keys, which is preset among the plurality of keys and used for switching the electronic device 1 from the standby sleep state to the normal operating state;
the control module 5 is further configured to identify and record the number of rows of the pressed keys 2 according to the key identification signal corresponding to the number of rows of the pressed keys 2, and determine whether the number of rows of the pressed keys 2 belongs to the number of rows of one of the partial keys preset in the plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operating state;
when the number of columns and the number of rows of the pressed key 2 are respectively the number of columns and the number of rows of the same key 2 in a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state, the judgment result of the control module 5 is as follows:
the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operation state.
In the prior art, the circuit connection relationship of the keys 2 on most electronic devices 1 and the arrangement of the positions on hardware are that the keys 2 are arranged on the keyboard 3 in a matrix, so that the positions of each key 2 on most electronic devices 1 can be accurately found out through the number of columns and the number of rows, and further, when one key 2 on the keyboard 3 is pressed, which key 2 on the electronic device 1 is specifically pressed is determined by judging the number of rows and the number of columns of the pressed key 2.
Of course, the key identification signal in this embodiment may not correspond to the number of columns or rows of the pressed key 2, for example: the parameters such as the amplitude, the current or the frequency of the key identification signal output when different keys 2 are pressed can be set differently, so that which key 2 is pressed can be determined according to the parameters such as the amplitude, the current or the frequency of the key identification signal.
In this embodiment, whether the pressed key 2 belongs to one of the preset keys for switching the electronic device 1 from the standby dormant state to the normal operating state can be determined by determining the number of columns of the pressed key 2 and then determining the number of rows of the pressed key 2. Naturally, similar to the above method, in this embodiment, it may also be determined whether the pressed key 2 belongs to one of the preset partial keys for switching the electronic device 1 from the standby sleep state to the normal operation state by determining the row number of the pressed key 2 and then determining the column number of the pressed key 2. The following describes the above technical solution provided by the embodiment of the present invention in more detail by taking a mobile phone with 15 keys 2 on a keyboard 3 as an example:
suppose that the key "+" and the key "0" in the 15 keys 2 belong to a part of keys preset in the plurality of keys for switching the electronic equipment 1 from the standby dormant state to the normal working state;
when the key 2 of the 15 keys 2 on the keyboard 3 is pressed down, firstly, a key identification signal corresponding to the column number of the key 1 is output, then, the column number of the key 1 is identified and recorded as a first column according to the key identification signal corresponding to the column number of the key 1, then, a key identification signal corresponding to the row number of the key 1 is output, and then, the row number of the key 1 is identified and recorded as a second row according to the key identification signal corresponding to the row number of the key 1;
the number of columns of the key "1" is the same as that of the key "+" and that of the key "+" in the key "0", but the number of rows of the key "1" is different from that of the key "+" and that of the key "0", that is, the fifth row, the determination result is:
the pressed key 2 does not belong to a part of preset keys for switching the electronic equipment 1 from the standby dormant state to the normal working state;
when the key "0" is pressed, firstly, outputting a key identification signal corresponding to the column number of the key "0", then, identifying and recording the column number of the key "0" as a second column according to the key identification signal corresponding to the column number of the key "0", then, outputting a key identification signal corresponding to the row number of the key "0", and then, identifying and recording the row number of the key "0" as a fifth row according to the key identification signal corresponding to the row number of the key "0";
the number of columns of the pressed key "0" is the same as the number of columns of the key "0" in the key "0", and the number of rows of the key "0" is the same as the number of rows of the key "0", i.e., the fifth row, so that the result of the determination at this time is:
the pressed key "0" belongs to a part of keys preset among the plurality of keys for switching the electronic apparatus 1 from the standby sleep state to the normal operation state.
As an improvement of this embodiment, in this embodiment, the signal circuit 4 is configured to output a key identification signal corresponding to the row number of the pressed key 2 when the control module 5 determines, according to the key identification signal corresponding to the column number of the pressed key 2, that the column number of the pressed key 2 belongs to the column number of one key 2 of the partial keys, which is preset among the plurality of keys and is used for switching the electronic device 1 from the standby sleep state to the normal operating state;
or, the signal circuit 4 is configured to output the key identification signal corresponding to the number of columns of the pressed key 2 when the control module 5 determines, according to the key identification signal corresponding to the number of rows of the pressed key 2, that the number of rows of the pressed key 2 belongs to the number of rows of one key 2 of the partial keys preset in the plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operation state.
Since most electronic devices 1 have a plurality of rows and columns of keys 2 on the keyboard 3, for example: the common mobile phone is usually provided with 5 rows and 3 columns of keys 2, and in order to reduce the possibility of misoperation of the keys 2, the smaller the number of the partial keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal working state is, the better the number is, and 1-2 keys 2 are preferred.
In this case, there will be a situation that there are no preset partial keys on partial columns and partial rows on the keyboard 3 for switching the electronic device 1 from the standby/dormant state to the normal operation state, therefore, at this time, it is only necessary to determine whether the column or row of the pressed key 2 belongs to the column or row of one of the keys 2 of the partial keys preset among the keys for switching the electronic device 1 from the standby sleep state to the normal operation state, so as to determine whether the pressed key 2 belongs to the partial keys preset among the keys for switching the electronic device 1 from the standby sleep state to the normal operation state, further, it is not necessary to determine whether the number of rows or columns of the pressed key 2 is the preset number of rows or columns of one key 2 of the partial keys for switching the electronic device 1 from the standby sleep state to the normal operation state.
It can be seen that, in this embodiment, it is not necessary to output both the key identification signal corresponding to the row number of each pressed key 2 and the key identification signal corresponding to the column number of each pressed key 2 when each key 2 is pressed, and further it is not necessary to determine the column number or row number of the pressed key 2 according to the key identification signal, so that the time for outputting the key identification signal corresponding to the column number or row number of the pressed key 2 is saved to a certain extent, and the efficiency of determining the pressed key 2 is improved.
The following describes the above technical solution provided by the embodiment of the present invention in more detail by taking a mobile phone with 15 keys 2 on a keyboard 3 as an example as shown in fig. 5:
suppose that the key "+" and the key "0" in the 15 keys 2 belong to a part of keys preset in the plurality of keys for switching the electronic equipment 1 from the standby dormant state to the normal working state;
when the key "3" is pressed, firstly, a key identification signal corresponding to the number of columns of the key "3" is output, and then, according to the key identification signal corresponding to the number of columns of the key "3", the number of columns of the key "3" is judged to be a third column, and since the third column is different from the number of columns of any key 2 in the keys "×" and "0", at this time, a judgment result can be obtained as follows:
the pressed key 2 does not belong to a part of keys preset in the plurality of keys and used for switching the electronic equipment 1 from the standby dormant state to the normal working state;
therefore, the method obtains the judgment result without outputting the key identification signal corresponding to the row number of the key 3 and further without judging the row number of the key 3;
when the key "0" is pressed, firstly, a key identification signal corresponding to the column number of the key "0" is output, then, according to the key identification signal corresponding to the column number of the key "0", the column number of the key "0" is judged to be a second column, the second column is the same as the column number of the key "+" and the key "0" in the key "0", then, a key identification signal corresponding to the row number of the key "0" is output, according to the key identification signal corresponding to the row number of the key "0", the row number of the key "0" is judged to be a fifth row, the row number is also the same as the row number of the key "0", and the column number and the row number of the key "0" in the key "0" are all the same, so that the judgment result is that:
the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operation state.
As shown in fig. 6 and 9, in the present embodiment, the key identification signal is an interrupt signal in a digital signal format, the control module 5 includes a key determination unit 51, a signal transmission unit 52, a row signal pin H, and a column signal pin L shown in fig. 7, the signal circuit 4 includes a pull-up power supply VDD and a pull-up resistor R connected to the pull-up power supply VDD, where:
the column signal pin L is connected with the key judgment unit 51, the row signal pin H is connected with the signal sending unit 52, and the row signal pin H is grounded;
the number of the pull-up resistors R and the number of the column signal pins H are the same as the number of columns of the key 2;
the number of the row signal pins H is the same as the row number of the key 2;
each pull-up resistor R is respectively connected with a plurality of keys positioned on the same column, and different pull-up resistors R are respectively connected with different column signal pins L;
each row signal pin H is respectively connected with a plurality of keys positioned on the same row;
when one of the keys 2 is pressed, one of the pull-up resistors R connected to the pressed key 2 is connected to one of the row signal pins H connected to the pressed key 2;
the key judgment unit 51 is configured to, when one of the keys 2 is pressed, identify and record the number of columns and the number of rows of the pressed key 2 according to a change of an electric potential on one column signal pin L connected to the pressed key 2, and judge whether the pressed key 2 belongs to a part of keys preset among the plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operation state according to the number of columns and the number of rows of the pressed key 2;
and a signal transmitting unit 52 for inputting digital signals for driving the potential on the column signal pin L to change to the row signal pin H in order when the key judgment unit 51 identifies and records the number of columns of the pressed key 2.
When any key 2 is not pressed down, each pull-up resistor R is connected with one column signal pin L, and at the moment, the voltage output by the pull-up power supply VDD is input into the column signal pin L through the pull-up resistor R, so that the potential on each column signal pin L is at a high level;
when any one of the plurality of keys 2 is pressed, a pull-up resistor R connected with the pressed key 2 is electrically connected with a row signal pin connected with the pressed key 2, and since the row signal pin H of the key judgment unit 51 is grounded, at this time, the pull-up resistor R connected with the pressed key 2 is grounded, the potential on the column signal pin L connected with the pull-up resistor R changes from high level to low level, that is: generating a falling edge signal;
the key judgment unit 51 senses that the potential on one of the column signal pins L changes from high level to low level: when a falling edge signal is generated, the pin number of the signal pin L, namely the row number of the pressed key 2 connected with the signal pin L, is identified and recorded;
after the key judgment unit 51 records the number of columns of the key 2 connected to the column signal pin L, the key judgment unit 51 outputs a high level and then outputs a low level for each row signal pin H in order (the order may be: from H1 to H5 or from H5 to H1);
at this time, the column signal pin L connected to the pressed key 2 is electrically connected to the row signal pin H connected to the pressed key 2, so that the digital signal output from the key determination unit 51 to the row signal pin H connected to the pressed key 2 is also transmitted to the column signal pin L connected to the pressed key 2, and therefore, when the potential on the column signal pin L connected to the pressed key 2 changes again, i.e., changes from low level to high level, and then changes from high level to low level, and the key determination unit 51 senses that the potential on one of the column signal pins L changes twice to low level, the number of pins of the column signal pin L whose potential appears twice to low level, i.e., the number of rows of the key 2 connected to the row signal pin H, is recorded;
as can be seen from this, the key determination unit 51 can identify and record not only the number of columns of the pressed key 2, but also the number of rows of the pressed key 2 by the change of the potential on the column signal pin L, and after identifying and recording the number of rows and the number of columns of the pressed key 2, the key determination unit 51 can determine whether the pressed key 2 belongs to a partial key preset among a plurality of keys for switching the electronic device 1 from the standby sleep state to the normal operation state.
The following describes the above technical solution provided by the embodiment of the present invention in more detail by taking a mobile phone with 25 keys 2 shown in fig. 7 on a keyboard 3 shown in fig. 6 as an example:
assuming that 25 buttons "+" in the button 2 shown in fig. 7 belong to a part of buttons preset in the plurality of buttons for switching the electronic device 1 from the standby dormant state to the normal operating state, the column number of the button "+" is the first column, and the row number is the fifth row;
when the key "+" and other keys 2 on the keyboard 3 are not pressed, each pull-up resistor R is connected with a column signal pin L, the voltage output by a pull-up power supply VDD is input into the column signal pin L through the pull-up resistor R, and the potential on each column signal pin L is at a high level;
when the key "# is pressed, a pull-up resistor R1 connected to the key" # is electrically connected to the row signal pin H5, and since the row signal pin H5 is grounded and the pull-up resistor R1 is grounded, the potential on the column signal pin H5 connected to the pull-up resistor R1 changes from high level to low level, and at this time, when the key determination unit 51 senses that the potential on the column signal pin H5 changes from high level to low level, the number of columns of the key "# connected to the column signal pin H5 is recorded, that is, the first column is recorded;
after the key judgment unit 51 records the number of columns of the key "+" connected to the column signal pin H5, the key determination unit 51 outputs a high level first and then outputs a low level for each row signal pin H1-H5 in sequence (the sequence may be from H1 to H5 or from H5 to H1), since, when the key "+" is pressed, the column signal pin L1 is electrically connected to the row signal pin H5, therefore, the digital signal outputted from the key determination unit 51 to the row signal pin H5 is also transmitted to the column signal pin L1, so that the potential at the column signal pin L1 changes again, i.e., from low level to high level and then from high level to low level, the key judgment unit 51 senses that the potential at the column signal pin L1 appears low level twice, the fifth row, which records the pin number of row signal pin H5 connected to column signal pin L1, i.e., the number of rows of the pressed key "+";
it can be seen that, the key determination unit 51 can not only identify and record the number of columns of the pressed key "×", but also can record and identify the number of rows of the pressed key "×", and after identifying and recording the number of rows and the number of columns of the pressed key "×", the key determination unit 51 can determine whether the pressed key 2 belongs to a partial key, namely the key "×", preset among the plurality of keys, for switching the electronic device 1 from the standby sleep state to the normal operation state by comparing the number of rows and the number of columns; since the key "+" is the first column and the fifth row, and the pressed key 2 is also the first column and the fifth row, the judgment result is:
the pressed key 2 belongs to a part of keys preset in the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operation state.
When the key "1" is pressed, the pull-up resistor R1 connected to the key "1" is electrically connected to the row signal pin H1, and since the row signal pin a1 is grounded, and at this time, the pull-up resistor R1 is grounded, the potential on the column signal pin L1 connected to the pull-up resistor R1 changes from high level to low level, and at this time, when the key judgment unit 51 senses that the potential on the column signal pin L1 changes from high level to low level, the number of columns of the key "1" connected to the column signal pin L1 is recorded, that is, the first column is recorded;
after the key judgment unit 51 records the column number of the key "1" connected to the column signal pin L1, the key determination unit 51 outputs a high level to each row signal pin H1 first, and then outputs a low level to each row signal pin H1 in sequence (the sequence may be from H1 to H5 or from H5 to H1), since, when key "1" is pressed, the column signal pin L1 is electrically connected to the row signal pin H1, therefore, the digital signal outputted from the key determination unit 51 to the row signal pin H1 is also transmitted to the column signal pin L1, so that the potential at the column signal pin L1 changes again, i.e., from low level to high level and then from high level to low level, the key judgment unit 51 senses that the potential at the column signal pin L1 appears low level twice, the first row of the row signal pin H1 connected to the column signal pin L1, i.e., the row of the pressed key "1", is recorded;
it can be seen that, the key determination unit 51 can not only identify and record the number of columns of the pressed key "1" but also record and identify the number of rows of the pressed key "1" by the change of the potential on the column signal pin, and after identifying and recording the number of rows and the number of columns of the pressed key "1", the key determination unit 51 can determine whether the pressed key 2 belongs to a partial key, namely, a key "+" preset among a plurality of keys for switching the electronic device 1 from the standby state to the normal state by comparing the number of rows and the number of columns, and since the key "+" is a first column and a fifth row, and the pressed key "1" is a first column and a first row, the determination result is:
the pressed key 2 does not belong to a part of keys preset among the plurality of keys for switching the electronic device 1 from the standby dormant state to the normal operating state.
Of course, the change of the electric potential on the column signal pin L in this embodiment may be from a high level to a low level, or from a low level to a high level, and a specific implementation of the embodiment of the present invention is described in more detail above only by taking as an example that the electric potentials on all the column signal pins L are high levels when the key 2 is not pressed down.
Meanwhile, in this embodiment, since the rows and columns of the plurality of keys are artificially defined, the rows may also be defined as columns, and the columns may also be defined as rows, the positions of the keys 2 connected to the column signal pins L and the row signal pins H in this embodiment may be interchanged.
As shown in fig. 8, as another embodiment of this embodiment, in this embodiment, the pull-up power supply VDD may be connected to the row signal pin H through a pull-up resistor R and connect the column signal pins L to ground, the potential on all the column signal pins L is low level in the initial state, i.e. when no key 2 is pressed, and when one of the keys 2 is pressed, the potential on the column signal pin L connected to the key 2 is changed from low level to high level, i.e.: a rising edge signal is generated so that the key judgment unit 51 of the control module 5 judges the number of columns of the pressed key 2 by judging which of the column signal pins L the potential on changes from low level to high level, and then the signal transmission unit 52 of the control module 5 outputs low level first and high level again for each of the row signal pins H in the order (the order may be: from H1 to H5 or from H5 to H1), thereby judging again the number of rows of the pressed key 2 by judging which of the column signal pins L the potential on changes from low level to high level again in accordance with the change of the potential on the column signal pins L.
As shown in fig. 7, as a modification of the present embodiment, the number of rows or columns of the partial keys for switching the electronic device 1 from the standby sleep state to the normal operation state, which are preset in the present embodiment, is the same.
When the preset number of rows of partial keys for switching the electronic device 1 from the standby dormant state to the normal operating state is the same, if only one row of keys 2 exists on the keyboard 3, it is only necessary to judge whether the number of columns of the pressed keys 2 belongs to the preset number of columns of one key 2 of the partial keys for switching the electronic device 1 from the standby dormant state to the normal operating state among the plurality of keys, so as to judge whether the pressed keys 2 belong to one key 2 of the preset partial keys for switching the electronic device 1 from the standby dormant state to the normal operating state among the plurality of keys; if a plurality of rows and columns of keys 2 exist on the keyboard 3, when the number of columns of the pressed keys 2 belongs to the number of columns of one key 2 of the partial keys which are preset in the plurality of keys and used for switching the electronic equipment 1 from the standby dormant state to the normal working state, when the control module 5 identifies the number of rows of the pressed keys 2, the control module can only output high level to or firstly output high level to the row signal pins H connected with the pressed keys 2 and then output low level, and does not need to output high level to each row signal pin according to the sequence from the first row to the last row or from the last row to the first row and then output low level, so that the time consumed for judging the number of rows of the pressed keys 2 can be saved.
Similarly, when the number of rows of the preset partial keys for switching the electronic device 1 from the standby sleep state to the normal operation state is the same in the present embodiment, the time consumed for determining the number of rows of the pressed key 2 can also be saved.
As shown in fig. 10, in this embodiment, the electronic device 1 further includes a power consumption module 6, and the control module 5 is further configured to start the power consumption module 6 when the electronic device 1 is switched from the standby sleep state to the normal operating state, so that the power consumption module 6 enters the normal operating state from the off state or the standby sleep state.
When the electronic device 1 is in the standby dormant state, generally, most of the power consumption modules 6 in the electronic device 1 are in the off state, and there may be a small number of power consumption modules 6 in the standby dormant state, so that a lot of power consumption can be saved, when the electronic device 1 is switched from the standby dormant state to the normal working state, the control module 5 can control some commonly used power consumption modules 6 in the electronic device 1 to directly enter the normal working state, and the power consumption modules 6 do not need to be specially restarted, so that the automation degree of the electronic device 1 can be improved.
In this embodiment, the power consumption module 6 shown in fig. 10 is a backlight of the mobile communication terminal. The backlight is a power consumption module 6 commonly used in the mobile communication terminal, when the backlight emits light, the user can clearly see the information on the display screen of the mobile communication terminal, so when the mobile communication terminal is switched from a standby dormant state to a normal working state, the control module 5 controls the backlight to directly enter the normal working state, the user can clearly see the information on the display screen without specially starting the backlight, and then the user can conveniently further operate the mobile communication terminal, for example: writing short message and inputting telephone number.
In addition, since the control module 5 controls the backlight to directly enter the normal operating state when the mobile communication terminal is switched from the standby dormant state to the normal operating state, as described above, since the possibility of the misoperation of the key 2 on the electronic device 1 provided by the embodiment of the present invention is relatively low, the technical problem that the backlight or other power consumption module 6 is erroneously started due to the misoperation of the key 2 on the mobile communication terminal in the prior art, so that the backlight or other power consumption module 6 enters the normal operating state erroneously, and finally the power consumption waste caused by the backlight of the other power consumption module 6 is relatively large can be solved.
Of course, in this embodiment, if the electronic device 1 is a mobile communication terminal such as a mobile phone and a palm computer, the power consumption module 6 may also be a power consumption device commonly used by other users besides a backlight lamp such as a mobile phone chip, a microphone, and a speaker.
As shown in fig. 5, as a further improvement of the present embodiment, in the present embodiment, the electronic device 1 is a mobile communication terminal, preferably a mobile phone, the control module 5 is a main chip of the mobile communication terminal, and the preset partial key for switching the electronic device 1 from the standby sleep state to the normal operation state is a confirmation key (i.e., an OK key shown in fig. 5) and/or a direction key.
The main chip of the mobile communication terminal itself has a function of recognizing the number of columns and rows of the keys 2 based on the key identification signal corresponding to the number of columns and rows of the keys 2 pressed, and the main chip of the mobile communication terminal is a technically mature and low-cost control chip having a data processing capability, and thus is suitable for being used as the control module 5
The confirmation key and/or the direction key are the keys 2 which are relatively frequent and familiar to the user, and the shapes of the confirmation key and/or the direction key are usually arranged to be relatively striking, so that the user can easily memorize, therefore, when the confirmation key and/or the direction key are preset as the partial keys for switching the electronic equipment 1 from the standby dormant state to the normal working state, the probability of misoperation of the keys 2 can be reduced, and the use and the memorization of the user are convenient.
Fig. 7 is a schematic diagram of a circuit connection relationship of the confirmation key and/or the arrow key in this embodiment, and when the method is applied to hardware, on the premise that the circuit connection relationship shown in fig. 7 is satisfied, the position of the confirmation key and/or the arrow key on the keyboard 3 may be set at any position, and the position of the confirmation key and/or the arrow key on the hardware is only required to be convenient for a user to press.
Of course, in the present embodiment, the part of the plurality of keys 2 shown in fig. 5 that is preset to switch the electronic device 1 from the standby and dormant state to the normal operating state may also be any one or several number keys on the keyboard 3.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.