----------------------------------------------------------------
-----------------------  Power Monitor  ------------------------
----------------------------------------------------------------
                  ---     Version 2.0     ---
                  ---    5 April 1998     ---


---                ---
---  Introduction  ---
---                ---

(This document uses the term "HP-200LX" to generically refer to
the HP-100LX, HP-200LX and HP-700LX palmtop computers.)

PwrMon is an HP-200LX system-manager-compliant application for
monitoring battery voltage levels. In addition to providing
current information on the state of the main and backup
batteries, it provides trend information by showing a history of
voltage readings.

Please note the following points:

 * Do not disregard the battery warnings issued by the HP-200LX
   built-in software!

 * Refer to Appendix A of the HP-200LX User's Guide for
   information about battery usage with the HP-200LX.

 * Don't wait for the backup battery voltage to drop low
   before replacing it! The backup battery is only under
   load when the main batteries are exhausted. If the backup
   is old, it may exhaust rapidly under load.


---              ---
---  Background  ---
---              ---

Primary power for the HP-200LX is provided by two 1.5 volt AA
cells in series, thus providing a nominal 3.0 volts. "Backup"
power is provided by a single CR2032 lithium cell, itself
providing a nominal 3.0 volts. The backup battery provides power
to maintain memory during conditions when the main batteries are
not supplying power -- when they are being changed, or when they
reach a level lower than 1.8 volts.

Under normal conditions, power is drawn from the main batteries.
When the main batteries reach a level of 2.2 volts (alkaline) or
2.3 volts (NiCd), warning messages begin to appear indicating a
low battery condition.

If the main battery voltage level reaches 2.0 volts, the system
enters "software shutdown" mode. This mode is intended to
prevent a "warm-start" (i.e. reboot). In software shutdown mode,
whenever the system is turned on, a message is displayed, two
high-pitched beeps are sounded, and the system turns itself off.
System memory and RAM disk memory is maintained. When the AC
adapter is plugged in, or the batteries are changed, the system
returns to normal operation.

If the voltage drops to 1.8 volts, the system goes into backup
mode. The system is shut down, and the RAM disk is maintained by
power from the backup battery until main power is restored, or
until the backup battery is exhausted. When backup mode is
exited, a "warm-start" (reboot) always occurs. System memory is
reset, but RAM disk is maintained -- assuming that power was
restored before the backup battery was exhausted.

Whenever the AC adapter is supplying power, the batteries are
not used.


---            ---
---  Manifest  ---
---            ---

The files included in this archive are:

    pwrmon.txt      This documentation file
    pwrmon.exm      The pwrmon executable
    pwrmon.icn      An Application Manager icon for pwrmon
    qkeys.exe       A program to queue keystrokes
    qkeys.txt       Documentation for the qkeys utility


---                     ---
---  Installing PwrMon  ---
---                     ---

---  Step 1: Load the files  ---

Copy the following files to your HP-200LX (you may want to put
them in a subdirectory):

    file          description
    ------------  ------------------------------
    pwrmon.exm    PwrMon executable
    pwrmon.icn    App Manager icon for PwrMon
    qkeys.exe     Keystroke queuing utility (optional)

---  Step 2: Define PwrMon to Application Manager  ---

Open Application Manager by pressing the [&...] key. Press F2
(Add), and enter the following values:

    Name:     Power Monitor
    Path:     (drive):\(subdirectory)\pwrmon.exm
    Comments:

In the Path field, (drive) and (subdirectory) should be replaced
with the drive letter (a or c) and the subdirectory to which you
copied the PwrMon files.

Now tab to the Icon field, and the PwrMon icon should appear.
If it does not, press the down-arrow key until you see the
PwrMon icon.

Press F10 (OK).

Now press the key-combination you want to use as the hot-key for
PwrMon (I use Alt+Filer; if you want to use something else, the
dialog which is dispayed at this point shows you what your
options are).

---  Step 3: Start PwrMon  ---

Back at the Application Manager screen, highlight the PwrMon
icon and press Enter. To end PwrMon, press MENU, Q.

---  Step 4 (optional): Set up to automatically start PwrMon  ---

Edit your c:\autoexec.bat to include the following line just
before the "200" command (on the HP-100LX it should be added
just before the "100" command):

  qkeys {alt+filer}{f8}

If you have changed the "hot-key" for PwrMon to something other
than Alt+Filer, then substitute that key. The next time you
reboot your palmtop, PwrMon will automatically be started, and
will be put to sleep.

---                ---
---  Using PwrMon  ---
---                ---

PwrMon samples battery voltage when it is started, and when the
"Sample" F-key (F3) or the space-bar is pressed. PwrMon can also
be configured to automatically sample battery voltage at one of
four fixed intervals. To do this, Press MENU, I(nterval), and
select an interval. When automatic sampling is active, it will
continue until stopped by pressing the "Manual" F-key (F6) or by
selecting "Disable Sampling" from the "Interval" menu. Automatic
sampling will continue even if you switch to another applica-
tion or turn off the HP-100. Automatic sampling will be stopped
when PwrMon is terminated.

The controls for PwrMon are as follows:

MENU/File
  /New        -- Resets to zero the voltage sampling history.
  /Sleep      -- Puts PwrMon into the background.
  /Exit       -- Closes the PwrMon application and terminates
                 automatic voltage sampling.

MENU/Options
  /Digital Voltage  -- When selected, a numeric voltage reading
                       is displayed just above each bargraph.
  /Ticks on Bargraph -- When selected, ticks are displayed on 
                        each bargraph at .1v intervals.

MENU/Interval
  /Disable Sampling -- Disables automatic voltage sampling.
  /1 Hour     -- Enables automatic voltage sampling with an
                 interval of 1 hour.
  /2 Hours    -- Enables automatic voltage sampling with an
                 interval of 2 hours.
  /4 Hours    -- Enables automatic voltage sampling with an
                 interval of 4 hours.
  /8 Hours    -- Enables automatic voltage sampling with an
                 interval of 8 hours.

MENU/Quit     -- Closes the PwrMon application and terminates
                 automatic voltage sampling.

MENU/Help
  /Using PwrMon...  -- Displays information about how to use
                       PwrMon.
  /Controlling PwrMon...  -- Displays information about how
                       to control PwrMon's operation.
  /About PwrMon...  -- Shows the version and copyright notice.


F1 (Help)     -- Describes the PwrMon display.

F3 (Sample)   -- Samples the battery voltage. If automatic
                 sampling is enabled, the interval is restarted.

F5 (Auto)     -- Enables automatic voltage sampling with an
                 interval of 1 hour. This Fkey is only active
                 when automatic sampling is disabled.

F6 (Manual)   -- Disables automatic voltage sampling. This FKey
                 is only active when automatic sampling is
                 enabled.

F8 (Sleep)    -- Causes PwrMon to be sent into the background
                 (i.e. it is still open, but it will not
                 display unless you explicitly switch to it.
                 See "Notes".)

F9 (NiCd)     -- Sets the battery type to NiCd, and enables
                 battery charging.

F10 (Alkalin) -- Sets the battery type to alkaline and disables
                 battery charging.


---               ---
---  The Display  ---
---               ---

Power:           This can be "battery" or "AC". If the AC
                 adapter is plugged in and providing power to
                 the HP-100, then "AC" is shown; otherwise,
                 "battery" is shown.

Charging:        This may be one of the following:

                     enabled
                     disabled
                     Fast charging hh:mm
                     Slow charging

                 For fast charging, the elapsed time in fast
                 charge mode is shown, in hours and minutes.
                 This time is only updated when a sample is
                 taken.

I/O port power:  Indicates whether the I/O port power is on or
                 off.

Main batteries   The type of batteries selected (by the user) is
                 shown. The current voltage is indicated on the
                 bar, and the warning (V-sub-w) and shutdown
                 (V-sub-s) thresholds are shown (the warning
                 threshold is different for NiCd v. Alkaline
                 batteries). The bounds of the bar range from
                 2.0 volts (the shutdown threshold) to 3.0
                 volts. The bargraph is shown as discrete segments
                 to show that the voltage measurements are
                 discrete, not continuous.

                 The histogram shows the level of the
                 last 64 voltage samples.

                 The threshold voltage values are:

                                        Alkaline   NiCd
                                        --------   ----
                           Warning mode   2.2v     2.3v
                 Software shutdown mode   2.0v     2.0v
                            Backup mode   1.8v     1.8v

                 Note that the voltage under load will differ
                 substantially from voltage when not. This can
                 be observed by plugging in the AC adapter. Main
                 battery voltage will suddenly rise, even if the
                 batteries are not being charged.

                 The histogram data can be zeroed by pressing
                 MENU, F(ile), N(ew).

Backup battery   The same information is provided for the backup
                 battery, except for threshold voltages, which
                 do not apply.


---         ---
---  Notes  ---
---         ---

When PwrMon is set for automatic sampling, if it is not the
foreground (i.e. visible) application when the time comes to
take a sample, then PwrMon will momentarily come to the
foreground, take its sample, and disappear. This produces two
effects which may be considered unsettling, until you become
used to them. The first is the obvious and disconcerting "popup"
over the active application. The second is more subtle: once
PwrMon has taken a sample from the "background," it apparently
"disappears", that is, if you close all other open applications,
PwrMon does *not* appear. It seems to have closed itself. But in
fact it has not. If you open the Application Manager and switch
to list mode, you will find that the status of PwrMon is listed
as "Asleep." What has happened is that in order to revert back
to the active application after momentarily coming to the
foreground to take a sample, it issues a system call which
causes PwrMon to be sent to the bottom of the application
queue - below even the Topcard application. So, PwrMon is
still open, but you will not see it again until you explicitly
switch to it (or until it takes another sample).

The current setting and the last 64 voltage samples are saved
in a file named pwrmon.env, in the subdirectory c:\_dat,
whenever PwrMon is closed (by MENU, Q(uit) or MENU, F(ile),
e(X)it); and whenever a sample is taken.

The system may show a "Low Battery" warning while PwrMon still
shows the voltage above the warning threshold. This is because
the system measures voltage at frequent intervals, and the voltage
may fluctuate - up as well as down. There is a built-in hysteresis
that requires that the battery voltage go above a certain level
(a level higher than the threshold voltage) before the "Low
Battery" indication is cleared. So, it is possible that the
voltage level momentarily dropped below the low battery
threshold, and then recovered. The system will report that
the battery level is low, because it did not recover enough to
reset the low-battery status, but PwrMon will report the current
voltage level, which is above the low battery threshold.


---                   ---
---  Version History  ---
---                   ---

Version 2.0, Build 133 - Dated 13 April 1998

    * Bug fixes ... "Help" Fkey produced a dysfunctional
      help dialog; 4-hour and 8-hour intervals produced
      glitches in menus.

Version 2.0 - dated 5 April 1998

    * Revised displayed voltage ranges to omit voltages
      lower than 2.0v and higher than 3.0v.

    * Fixed missing "Help" Fkey label.

    * Revised bargraph to indicate measurement granularity.

    * Revised histogram to make it more visible.

    * Made ESC key implement "Sleep".

    * Added QKeys utility.

Version 1.2 - dated 8 May 1995

    * Added "Sleep" Fkey to explicitly send PwrMon to the
      background.

    * Changed link options, significantly reducing memory
      requirements.

Version 1.1 - dated 6 March 1995

    * Added capability to automatically sample voltage at fixed
      intervals even when PwrMon is not the foreground
      application.

    * Only "Auto" or "Manual" Fkey is labelled, depending on
      whether or not auto sampling is active.

    * Changed interval set by "Auto" Fkey to 1 hour.

    * Added 2-hour and 4-hour sampling intervals.

Version 1.0 - dated 25 February 1995

    The initial release of PwrMon.


Eugene Dorr
Internet: edorr@pobox.com

