The present invention is generally related to a power supply control apparatus and a power supply control method for use in portable electronic equipments driven by a battery. More specifically, the present invention is directed to a key input circuit, a power supply control apparatus, and a power supply control method for use in portable electronic equipments, in which a power supply control key is provided with a key switch formed by arranging a plurality of key contacts at cross points of a key matrix, a hardware size is suppressed, and a software processing sequence used to detect a depression of a key is made simple.
In a conventional power supply control apparatus, a key switch for controlling a supply of electric power is realized by a power supply control key which is arranged independently from a key matrix. When the power supply is turned ON, since this power supply control key is depressed, the power supply is directly controlled so as to commence supplying of the electric power. Also, when the power supply is turned OFF, supplying of the electric power is stopped by interrupting a process operation executed by a processing apparatus (CPU etc.), and by detecting a key depression (by monitoring key state) executed by the processing apparatus (CPU etc.) via an I/O port.
However, the power supply control key used to instruct the power supply control of the power supply and also the key matrix for entering the key operation are independently arranged in the above-explained conventional power supply control apparatus Since the key input directed to the power supply control and the key input directed to the key input operation are detected by the other circuits, there is such a problem. That is, the processing systems would become complex, and thus, the overall hardware size of the power supply control apparatus is increased.
Also, since the key depression detecting procedure for entering the key operation is required independent from the depression detection procedure of the power supply control key, there is another problem that the software processing procedure used to detect the key depression detection would become complex.
The present invention has been made to solve the above-explained conventional problems, and therefore, has an object to provide a key input circuit, a power supply control apparatus, and a power supply control method for a portable electronic equipments, in which a power supply control key is provided with a key switch formed by arranging a plurality of key contacts at cross points of a key matrix, a hardware size is suppressed, and a software processing sequence used to detect a depression of a key is made simple.
To solve the above-described problems, a key input circuit for a portable electronic equipments, according to the first aspect of the present invention, comprises: a key switch formed by arranging a plurality of key contacts at cross points of a key matrix, and equipped with one of the plural key contacts as a power supply control key; a key scan circuit for detecting open/close states of the plural key contacts of the key switch; and power supply control key state detecting means for detecting an open/close state of a contact of the power supply control key independent from the open/close state detection by the key scan circuit.
Preferably, in the key input circuit, the key scan circuit may include: scanning means for scanning any one of a row and a column of the key matrix by way of a binary logic signal; and key state detecting means for acquiring the binary logic signal of the scanning means via the key matrix, and for separately detecting the open/close states of the plurality of key contacts based upon the logic value of the acquired binary logic signal.
According to the second aspect of the present invention, a power supply control apparatus for a portable electronic equipments comprises: a key switch formed by arranging a plurality of key contacts at cross points of a key matrix, and equipped with one of the plural key contacts as a power supply control key; a key scan circuit for detecting open/close states of the plural key contacts of the key switch; power supply control key state detecting means for detecting an open/close state of a contact of the power supply control key independent from the open/close state detection by the key scan circuit; and a power supply for commencing a supply of electric power in such a case that the close state of the contact of the power supply control key is detected by the power supply control key state detecting means; and processing means for stopping the supply of the electric power from the power supply in the case that the close state of the contact of the power supply control key is detected by the key scan circuit.
Preferably, in the power supply control apparatus, the key scan circuit may include: scanning means for scanning any one of a row and a column of the key matrix by way of a binary logic signal; and key state detecting means for acquiring the binary logic signal of the scanning means via the key matrix, and for separately detecting the open/close states of the plurality of key contacts based upon the logic value of the acquired binary logic signal.
According to third aspect of the present invention, a power supply control method for a power supply control apparatus of a portable electronic equipment comprising; a key switch formed by arranging a plurality of key contacts at cross points of a key matrix, and equipped with one of the plural key contacts as a power supply control key; a key scan circuit for detecting open/close states of the plural key contacts of the key switch; power supply control key state detecting means for detecting an open/close state of a contact of the power supply control key independent from the open/close state detection by the key scan circuit; and a power supply; the power supply control method is comprised of: a power supply starting step for starting a supply of electric power in such a case that the close state of the contact of the power supply control key is detected by the power supply control key state detecting means; and a power supply stopping step for stopping the supply of the electric power from the power supply in the case that the close state of the contact of the power supply control key is detected by the key scan circuit.
Preferably, in a power supply control method, the detection of the close state of the contact of the power supply control key by the key scan circuit at the power supply stopping step includes: a scanning step for scanning any one of a row and a column of the key matrix by way of a binary logic signal; and a key state detecting step for acquiring the binary logic signal of the scanning means via the key matrix, and for separately detecting the open/close states of the plurality of key contacts based upon the logic value of the acquired binary logic signal.
In the key input circuit, according to the first aspect of the present invention, the key switch formed by arranging a plurality of key contacts at the cross points of the key matrix is provided with the power supply control key; and the key scan circuit for detecting the open/close states of the plural key contacts of the key switch is independently arranged from the power supply control key state detecting means for detecting the open/close state of the contact of the power supply control key. For instance, the following control operation is carried out in such a manner that when the power supply is turned ON, the depression of the power supply control key is detected by the power supply control key state detecting means, and the power supply is directly controlled by this detection signal so as to commence the supply of the electric power. When the operation is ended, or the power supply is turned OFF, the depression of the power supply control key is detected by the key scan circuit, and the supply of the electric power is stopped by way of a process means of an apparatus to which this key input circuit is applied.
As previously explained, since the power supply control key for instructing the supply control of the electric power is arranged within the key matrix for the operation input in an integral manner, the total hardware amount can be suppressed without making the key input detecting circuit complex. Also, since the depression detecting procedure of the power supply control key can be carried out in accordance with the same procedure as the key depression detecting procedure for the operation input, the software processing procedure for detecting the key depression can be made simple.
More specifically, it is desirable in the key input circuit that in the key scan circuit, the scanning means scans any one of the row and the column of the key matrix by way of the binary logic signal, and the key state detecting means acquires the binary logic signal of the scanning means via the key matrix, and separately detects the open/close states of the plurality of key contacts based upon the logic value of the acquired binary logic signal.
Further, in accordance with the power supply control apparatus and the power supply control method according to the second and third aspects of the present invention, the key switch formed by arranging a plurality of key contacts at the cross points of the key matrix is provided with the power supply control key; and the key scan circuit of r detecting the open/close states of the plural key contacts of the key switch is independently arranged from the power supply control key state detecting means for detecting the open/close state of the contact of the power supply control key. When the power supply is turned ON (power supply starting step), the depression of the power supply control key (close state of contact of power supply control key) is detected by the power supply control key state detecting means. The power supply is directly controlled based upon the detection signal so as to start the supply of the electric power from this power supply. When either the operation is accomplished or the power supply is turned OFF (power supply stopping step), the depression of the power supply control key (close state of contact of power supply control key) is detected by the key scan circuit, and then the supply of the electric power from the power supply is stopped by the processing means employed in this power supply control apparatus.
As previously explained, since the power supply control key for instructing the supply control of the electric power is arranged within the key matrix for the operation input in an integral manner, the total hardware amount can be suppressed without making the key input detecting circuit complex. Also, since the depression detecting procedure of the power supply control key can be carried out in accordance with the same procedure as the key depression detecting procedure for the operation input, the software processing procedure for detecting the key depression can be made simple.
In particular, it is so desirable in the power supply control and the power supply control method that in the key scan circuit (detection of close state of power supply control key contact by key scan circuit at power supply stopping step), the scanning means (scanning step) scans any one of the row and the column of the key matrix by way of the binary logic signal; and the key state detecting means (key state detecting step) acquires the binary logic signal of the scanning means via the key matrix, and separately detects the open/close states of the plurality of key contacts based upon the logic value of the acquired binary logic signal.