CN100489736C - Method for accessing battery state by operation system of portable computer - Google Patents

Method for accessing battery state by operation system of portable computer Download PDF

Info

Publication number
CN100489736C
CN100489736C CNB021491712A CN02149171A CN100489736C CN 100489736 C CN100489736 C CN 100489736C CN B021491712 A CNB021491712 A CN B021491712A CN 02149171 A CN02149171 A CN 02149171A CN 100489736 C CN100489736 C CN 100489736C
Authority
CN
China
Prior art keywords
portable computer
time
operating system
battery status
battery
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.)
Expired - Fee Related
Application number
CNB021491712A
Other languages
Chinese (zh)
Other versions
CN1503102A (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.)
Getac Technology Corp
Original Assignee
Mitac Technology Corp
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 Mitac Technology Corp filed Critical Mitac Technology Corp
Priority to CNB021491712A priority Critical patent/CN100489736C/en
Publication of CN1503102A publication Critical patent/CN1503102A/en
Application granted granted Critical
Publication of CN100489736C publication Critical patent/CN100489736C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Power Sources (AREA)

Abstract

A method for fetching the battery state by the operation system of a portable computer is that the operation system fetches its present system time first, then to be compared with the battery state time fetched last time again to compare the difference value of the said fetch time with a primary value of predesigned fetch time when the said portable computer fetches the battery state information by the key board controller definitely. When the difference value is larger than or equal to the primary value, the operation system fetches the battery state information instantly to be stored in a memory and feeds back the information to the operation system, if the value is smaller, the system feeds back the value stored in the memory to the system directly.

Description

The operating system of portable computer reads the method for battery status
Technical field
The present invention relates to a kind of method that reads battery status, be meant that especially a kind of operating system of portable computer reads the method for battery status, to save the system resource of this portable computer central processing unit.
Background technology
In present widely used windows workspace system (for example Windows XP, Windows 2000), generally in its operating system, integrated the power management function of advanced framework power supply interface standard ACPI (Advanced Configuration and Power Interface), by the power management operations of these all hardwares of ACPI interface standard may command, from the notebook computer to the desktop and servomechanism all be included in this specification.
This advanced person's framework power supply interface standard ACPI (Advanced Configuration andPower Interface) be by the computer industry the common electric power management system interface of formulating exploitation, its objective is for a common power management interface is arranged between operating system and hardware, with improve computer system in the past on power management by disunity interface that each other manufacturer was formulated.Seeing through this electric power management system makes operating system (OS) can manage the electricity consumption situation of peripheral equipment according to certain mode, hard disc or screen are surpassed the user enter battery saving mode when one section special time does not use, perhaps decommission, use once again up to the user.
Portable computer (for example notebook computer) is researched and developed at consumer's demand easy to carry.And the maximum difference of portable computer and desktop computer is that the former is dependent on battery operation sometimes fully.Therefore, the power management function of battery itself also just becomes a most important function in the portable computer battery technology.
Typical portable computer system includes a CPU (central processing unit), ROM-BIOS (System Basic Input Output System, SYS-BIOS) with keyboard controller (Keyboard Controller, KBC) wherein include the built-in microprocessor of a keyboard (Embedded Microcontroller), a keyboard ROM-BIOS (Keyboard Basic Input Output System, the interface circuit of KB-BIOS), memory body and other specific function in this keyboard controller.The working power of this portable computer is supplied by battery, and the battery status of this battery can be detected by the battery status detecting interface of keyboard controller.This portable computer 1 operates in ACPI when touching under the formula operating system, and its operating system (Operating System) can regularly see through ACPI Machine Language (being called for short AML) read the battery status data in the keyboard controller.
When system uses battery as working power, operating system can read battery status 2-3 time continuously regularly reading in the battery status.Yet, because the execution speed of keyboard controller is to belong to slow device far away, therefore when CPU (central processing unit) is in when busy (for example at broadcast Win DVD), when running into operating system again and regularly reading battery status in the keyboard controller, the phenomenon that causes picture to pause because of CPU (central processing unit) is too busy just may take place.
Summary of the invention
In view of the operating system of computer apparatus in aforementioned located by prior art when battery status is read at the place when regularly reading battery status, may cause whole computer system to carry out the problem that usefulness reduces, fundamental purpose of the present invention promptly provides and a kind ofly reads the method for battery status with battery as the operating system of the computer equipment of electric power source, so that this computer equipment unlikely execution usefulness that has influence on computer system when reading battery status.
The operating system that another object of the present invention promptly provides a kind of portable computer reads the method for battery status, see through the electric quantity change characteristic of battery read method of the present invention and matching battery capacity, except can effectively saving the CPU (central processing unit) resource, also can keep this portable computer to the monitoring of battery status and the management of battery supply.
For achieving the above object, be in the preferred embodiment of the present invention when this portable computer regularly reads the battery status data of battery through keyboard controller, read the present system time of computer system earlier by operating system, relatively this present system time and time that last time, operating system read battery status then, relatively this a time for reading gap value and a predetermined time for reading reference value again.When this time for reading gap value during more than or equal to this predetermined time for reading reference value, operating system promptly reads the battery status data of battery, and with it value of depositing in a memory body, again battery status data value of returning of reading is given the operating system of portable computer, and when this time for reading gap value during less than this predetermined time for reading reference value, this operating system promptly directly will leave in this memory body the battery status data directly the value of returning give operating system.
Other purpose of the present invention and design thereof will be further described by following preferred embodiment and accompanying drawing.
Description of drawings
Fig. 1 shows the related system connection diagram that cooperates control flow of the present invention, and it shows the annexation synoptic diagram between CPU (central processing unit), ROM-BIOS and the keyboard controller of a portable computer;
Fig. 2 is the control flow chart that shows when portable computer of the present invention reads battery status.
The figure number explanation
1 portable computer, 11 CPU (central processing unit)
12 ROM-BIOS, 13 bus-bars
The built-in microprocessor of 2 keyboard controller, 21 keyboards
22 keyboard ROM-BIOS, 23 memory bodys
24 battery statuss detecting interface, 3 batteries
Embodiment
Consult shown in Figure 1, it is the related system connection diagram that show to cooperate control flow of the present invention, and it has shown CPU (central processing unit) 11 in the portable computer 1, ROM-BIOS 12 (the annexation synoptic diagram that SYS-BIOS) and keyboard controller are 2.Wherein include the built-in microprocessor 21 of a keyboard, a keyboard ROM-BIOS 22 (KB-BIOS), a memory body 23 and battery status detecting interface 24 in this keyboard controller 2.
This portable computer 1 links every hardware device (for example including soft disk drive, hard disc, CD-ROM device, PCMCIA port, display etc.).And the hardware device that is linked to this keyboard controller 2 for example includes devices such as battery, temperature-sensitive sticker, keyboard, slide-mouse.11 of the CPU (central processing unit) of this keyboard controller 2 and portable computer 1 are linked by bus-bar 13 (for example IDE bus-bar).The predetermined address in the transmission port that the CPU (central processing unit) of typical keyboard controller 2 and computer system is 11 is 60H/64H and 62H/66H, wherein 60H/64H transmission port is as the transmission of the data between computer system and keyboard controller port, and 62H/66H transmission port is to use as the signal communicating between computer system and keyboard controller.
The working power of this portable computer 1 is supplied by battery 3, and the battery status of this battery 3 can be detected by the battery status detecting interface 24 of keyboard controller 2.When this portable computer 1 operates under the ACPI pattern operating system, its operating system (Operating System) can regularly see through the ACPI machine language and read battery status data in the keyboard controller 2, and present general timing time for reading mostly was set in for example 2 seconds.
Shown in Figure 2 is the control flow chart that shows when portable computer of the present invention reads battery status.Consult computer system connection diagram shown in Figure 1 simultaneously, flow process of the present invention is done an explanation.In the control flow of the present invention, its read method at first is in step 101, is read present system time (System Time) T1 of computer system by the operating system of portable computer.
After reading the present system time T1 of portable computer, be about to the time T 2 that this present system time T1 and last time, operating system read battery status and compare (step 102), and obtain a time for reading gap value T0=T1-T2 (step 103) according to both differences.
In step 104, again this a time for reading gap value T0 and a predetermined time for reading reference value Tr are done one relatively then.As this time for reading gap value T0 during more than or equal to this predetermined time for reading reference value Tr, then the operating system of this portable computer 1 can read the battery status data (step 105) of battery 3 from keyboard controller 2, and with it value of depositing (step 106) in the memory body 23 of this keyboard controller 2.This operating system also can store present system time T1 (step 107), with the time ratio foundation as next time.At last battery status value of returning of reading is given the operating system (step 108) of portable computer 1.
And in step 104, if when judging this time for reading gap value T0 less than this predetermined time for reading reference value Tr, then the operating system of this portable computer 1 promptly directly will leave in the memory body 23 of this keyboard controller 2 the battery status data directly the value of returning give operating system (step 109), read battery status and need not to lose time by keyboard controller 2, to save the system resource of central processing unit.
Because the electric quantity change of battery capacity in two seconds few (gap is approximately 2mA/h), so when the operation system read battery status continuously in two seconds, then when reading first, really read battery status and the value of depositing to memory body from keyboard controller, operating system in two seconds afterwards reads action then directly by the memory body value of returning, read battery status and need not to lose time,, really can save the CPU (central processing unit) resource so see through above-mentioned control method of the present invention from keyboard controller.
By above-mentioned explanation as can be known, the operating system of portable computer provided by the present invention reads the method for battery status, really effectively the operating system of settlement computer device when reading battery status may cause whole computer system to carry out the problem that usefulness reduces.Moreover, through the electric quantity change characteristic of battery read method of the present invention and matching battery capacity,, but still can keep this portable computer to the monitoring of battery status and the management of battery supply except can effectively saving the CPU (central processing unit) resource.Therefore, the industrial utilization of the true tool height of the present invention.
Above embodiment explanation only is preferred embodiment explanation of the present invention, all habit in this operator when doing other all improvement and variation according to the above embodiment of the present invention explanation.Yet all improvement and variation that these are done according to the embodiment of the invention are in the claim that still belongs to invention spirit of the present invention and define.

Claims (3)

1. the operating system of a portable computer reads the method for battery status, this portable computer is by the required working power of a battery supplied, and regularly read the battery status data of this battery according to a predetermined time for reading reference value by the operating system of this portable computer, it is characterized in that: this method comprises the following steps:
A. read the present system time of computer system by the operating system of portable computer;
B. relatively this present system time and time that last time, operating system read battery status, and obtain a time for reading gap value according to both differences;
C. relatively this time for reading gap value and predetermined time for reading reference value;
D. when this time for reading gap value during more than or equal to this predetermined time for reading reference value, the operating system of this portable computer reads the battery status data of battery, and with it value of depositing in a memory body, again battery status data value of returning of reading is given the operating system of portable computer;
E. when this time for reading gap value during less than this predetermined time for reading reference value, the operating system of this portable computer promptly directly will leave in this memory body the battery status data directly the value of returning give operating system.
2. the operating system of portable computer reads the method for battery status according to claim 1, it is characterized in that: in the steps d, the operating system of this portable computer is to see through the battery status data that the keyboard controller that is linked to this portable computer reads battery, and this memory body is to be connected in this keyboard controller.
3. the operating system of portable computer reads the method for battery status according to claim 1, it is characterized in that: in the steps d, the operating system of this portable computer more comprises present system time stored, with as next time the time ask the foundation of comparison.
CNB021491712A 2002-11-25 2002-11-25 Method for accessing battery state by operation system of portable computer Expired - Fee Related CN100489736C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021491712A CN100489736C (en) 2002-11-25 2002-11-25 Method for accessing battery state by operation system of portable computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021491712A CN100489736C (en) 2002-11-25 2002-11-25 Method for accessing battery state by operation system of portable computer

Publications (2)

Publication Number Publication Date
CN1503102A CN1503102A (en) 2004-06-09
CN100489736C true CN100489736C (en) 2009-05-20

Family

ID=34233530

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021491712A Expired - Fee Related CN100489736C (en) 2002-11-25 2002-11-25 Method for accessing battery state by operation system of portable computer

Country Status (1)

Country Link
CN (1) CN100489736C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239612B (en) * 2017-07-10 2021-08-13 佛山市顺德区顺达电脑厂有限公司 Electronic device and method capable of monitoring battery capacity

Also Published As

Publication number Publication date
CN1503102A (en) 2004-06-09

Similar Documents

Publication Publication Date Title
US8893154B2 (en) Mobile device with two operating systems and method for sharing hardware device between two operating systems thereof
US7783905B2 (en) Method for reducing power consumption of a computer system in the working state
CN102057344A (en) Sleep processor
US20080098243A1 (en) Power-optimizing memory analyzer, method of operating the analyzer and system employing the same
CN102262434A (en) Method and apparatus for modifying a transition to an altered power state of an electronic device based on accelerometer output
CN102467217A (en) Synchronous obtaining method of power state
KR950001418B1 (en) Pop up control system for portable computer having setup function and popup function
CN108647047A (en) A kind of awakening method and system based on mobile terminal
CN100381972C (en) Power management method for an electronic apparatus
US20090091538A1 (en) Computer system and a method for determining whether a hot key is triggered
CN101281416A (en) Method for ensuring system closedown completion
CN210639458U (en) Device for converting network interface of numerical control machine tool into USB interface
CN100489736C (en) Method for accessing battery state by operation system of portable computer
US7142995B2 (en) Method for reading battery status by operation system of portable computer
CN109283875B (en) ARM9 architecture-based high-performance cogeneration unit operation data acquisition terminal
US20090070491A1 (en) Method for executing target programs with compound quick keys
CN1329795C (en) Power supply status automatic test method for computer apparatus
CN1937075B (en) Data transfer operation completion detection circuit and semiconductor memory device provided therewith
US6892146B2 (en) Method for reading battery status by operation system of portable computer
CN202795364U (en) Dynamically reconfigurable test measuring instrument
CN101887300B (en) Computer system with power-supply control and power-supply control method
CN201066375Y (en) Testing tools for card reading interface
CN101980103A (en) Power state management method and related computer system
CN201345105Y (en) Wireless logistics terminal machine
CN101295252B (en) Initialization system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090520

Termination date: 20111125