The invention relates generally to an electronic device including a battery, and more particularly to an electronic device and a method for detecting the amount of charge of the battery.
Many types of electronic devices, such as the smart phone, the personal digital assistant (PDA), the tablet computer, and the notebook computer utilize a battery as a power source. These electronic devices typically include a detector referred to as the fuel gauge, which is used for detecting parameters of the battery such as the voltage, the current, and the temperature. The central processing unit (CPU) or the processor of the electronic device periodically polls the fuel gauge in order to obtain parameters such as the voltage, the current, and the temperature of the battery, and to calculate the remaining amount of charge of the battery. The calculated remaining amount of charge may be displayed for user view, or utilized in power management of the electronic device.
However, electric energy of the battery is consumed by polling. Moreover, due to frequent polling, noticeable change of the remaining battery charge may be observed only after several polls, and electric energy is consumed by the unnecessary polls.
The invention provides an electronic device and a method for detecting the amount of charge of a battery, capable of mitigating the issue of electric energy wastage caused by conventional polling.
An electronic device includes a battery, a detector, and a processor. The battery provides the electric energy needed by the electronic device. The detector is coupled to the battery, and the detector detects a parameter of the battery. The parameter is related to the amount of charge of the battery. The detector sends a signal when a change has occurred on the parameter. The processor is coupled to the detector, and the processor obtains the parameter from the detector in response to the signal.
A method for detecting an amount of charge of a battery includes the following steps: detecting a parameter of the battery, in which the parameter is related to the amount of charge of the battery; sending a signal when a change has occurred on the parameter; and obtaining the parameter in response to the signal.
In summary, according to embodiments of the invention, when a change has occurred on the parameter of the battery, a signal is actively sent to notify the processor to obtain a parameter of the battery, and the processor does not actively poll.
Therefore, embodiments of the invention can mitigate the issue of electric energy wastage caused by conventional polling.
To make the above features and advantages of the invention more comprehensible, several embodiments accompanied with drawings are described in detail as follows.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
The change mentioned in Step 220 may refer to: 1) the parameter decreasing a predetermined value or a predetermined percentage, or 2) the parameter decreasing until less than or equal to a predetermined value or a predetermined percentage. For example, the parameter may be the remaining amount of charge of the battery 120, and the detector 140 may send the signal each time the remaining amount of charge decreases by a predetermined value or a predetermined percentage, or the detector 140 may send the signal when the remaining amount of charge decreases to less than or equal to a predetermined value or a predetermined percentage.
Thereafter, the processor 160 receives the parameter in Step 240, and obtains the parameter from the detector 140 in response to the signal in Step S250. The display 180 may display the information related to the amount of charge of the battery 120, in which the information may be a pattern, a character, or a combination of patterns and characters indicating the remaining amount of charge of the battery 120. After the processor 160 obtains the parameter, the processor 160 may update the information displayed by the display 180 according to the parameter in Step 260. The process then returns to Step 210, and the detector 140 continues to detect the parameter of the battery 120.
The detector 140 may calculate the remaining amount of charge of the battery 120. For example, the detector 140 may include a coulomb counter to calculate the remaining amount of charge of the battery 120. The detector 140 may use the remaining amount of charge as the parameter for the processor 160 to obtain. After obtaining the parameter, the processor 160 may calculate a percentage of the remaining amount of charge relative to a maximum amount of charge of the battery 120. The maximum amount of charge may be an internal value of the processor 160 or a value obtained from the detector 140. The percentage may be used for the display 180 to display the aforementioned information, or used for the power management of the electronic device 100, or for other purposes.
Alternatively, the detector 140 may further calculate the percentage of the remaining amount of charge relative to the maximum amount of charge of the battery 120, and use the percentage as the parameter for the processor 160 to obtain.
In some embodiments of the invention, the percentage is not used for the information display of the display 180, but only used for the power management of the electronic device 100, for example. In these embodiments, the display 180 and Step 260 may be omitted.
In view of the foregoing, according to embodiments of the invention, when a change has occurred on the parameter of the battery, the detector actively sends a signal to notify the processor to obtain the parameter. Since the processor does not actively poll, embodiments of the invention can prevent electric energy from being wasted by frequent polling, as well as extend the usage time of the electronic device needing the electric energy provided by the battery.
Although the invention has been described with reference to the above embodiments, it will be apparent to one of ordinary skill in the art that modifications to the described embodiments may be made without departing from the spirit of the invention. Accordingly, the scope of the invention will be defined by the attached claims and not by the above detailed descriptions.
This application claims the priority benefits of U.S. provisional application Ser. No. 61/773,760, filed on Mar. 6, 2013. The entirety of the above-mentioned patent applications is hereby incorporated by reference herein and made a part of this specification.
Number | Date | Country | |
---|---|---|---|
61773760 | Mar 2013 | US |