ADCLOG - logs analog values of the PX-8 analog ports to a file.

Intended usage:
Writing the voltages at the analog inputs of the PX-8 to a file.
This utility is useful in combination with the wake function,
allowing the PX-8 to gather measurement data for a longer time
period. After logging, the utility calls the POWEROFF subroutine
switching the machie off.

The wake function is accessed with the key combination CTRL-HELP.
Press "2" for alarm/wake, "3" for the wake date/time pattern, and
"4" for the wake string, which should be "adclog^M". Note: "^M" 
means a separate "^" key followed by a "M", not CTRL-M.

Assuming the current drive is writable (usally only A:), and the 
PX-8 is switched off, it wakes every time the data/time pattern
string is met and writes a line to a file LOG.TXT. The line has 
the following format:
YYYY-MM-DD hh:mm:ss : a.aa b.bb c.cc  d
The YYYY-MM-DD hh:mm:ss should be obvious,
a.aa is the voltage at the A/D input
b.bb is the voltage at the BRCD input
c.cc is the voltage of the internal battery
d    is the level of the A/D trigger input (and powerswitch)

The A/D input is connected to the tip of the A/D connector.
The A/D trigger input is connected to the ring of the A/D connector.
The BRCD input is connected to the tip of the BRCD connector.
The BRCD power can be derived from the ring of the BRCD connector.
This power is usually switched off. 
The A/D trigger value is actually a combination of two values:
0 = TRIG off, Power Switch off
1 = TRIG off, Power Switch on
2 = TRIG on,  Power Switch off
3 = TRIG on,  Power Switch on

The A/D input and the BRCD input have a input range from 0 to 2.00
volt and a resolution of 6 bits. The battery measurement has the same
resolution, but a range of 0-5.7 volt.

All programming information is from the PX-8 User Manual with some
background info from the PX-8 Technical Manual.

This package:
ADCLOG.COM  - The principal utility
ADCPRT.COM  - Same measurements as ADCLOG, but prints to the console and
              does not switch the PX-8 off.
SETYEAR.COM - Workaround for the PX-8 limitation of accepting only 
              years between 1977 and 1999. Basic also allows setting any
              year, but is not always available. The utility expects a 
              two digit argument (ex. "SETYEAR 03"), and leaves other
              values intact. 
ADCLOG.C
ADCPRT.C
SETYEAR.C   - Sources of the programs above. I compiled them with BDSC1.6
              under yaze-ag-2.00 under Linux.

Transferring the final files to the PX-8 is done with the Vfloppy utility.

BDSC can be found at http://www.bdsoft.com/resources.html#bdsc
yaze-ag can be found at http://www.mathematik.uni-ulm.de/users/ag/yaze-ag/
The vfloppy utility can be found at http://www.xs4all.nl/~fjkraan/comp/px4/vfloppy


Fred Jan Kraan, 2003-11-19
