adc_logger (version 2.1) 27th Dec 2004

NAME:
        adc_logger  -  Simple command line program to read from the TS7200 ADC

SYNOPSIS:
        adc_logger [-[ntvz]] [-c N] [-p T] [-r R] chan[,range] [chan[,range]..]

DESCRIPTION:

By default it will return one measurement from the given channel(s).
Upto 8 measurement channels can be specified with an optional range
attached e.g. 7,3 specifies channel 7 range 3.  The output is given in
volts, the 12 bit integer returned from the ADC being scaled by the
chosen range to give a Voltage. 

The output gives Voltage to 3 places of decimal, but it must be
remembered that the accuracy of the measurement is only that
equivalent to, at best, 12 bits covering the full voltage range
selected and the ADC (MAX197) has errors assocaited with its voltage
reference, amplifier offset and gain (see the MAX197 data sheet).
Without reference voltage adjustment, and offset and gain error
correction the basic accuracy is probably aprox. 2%. However the linearity
is claimed to be very good at +/-1 LSB for the 'B' part and +/- 1/2 LSB
for the 'A' part.


Channels are numbered 0-7.

Range  0 is unipolar 0-5v         LSB = 1.2mV
       1 is bipolar -5v-0-5v            2.4mV
       2 is unipolar 0-10v              2.4mV
       3 is bipolar -10v-0-10v          4.9mV

The default range for measurements is 3, -10v to +10v.

Output is line buffered

FLAGS:

  -t    timestamp each line of output
  -v    verbose output
  -n    output raw integer values as read from the ADC  
  -z    zoom reading - do readings as fast as possible - no usleep pause
        incompatible with -p option below. If using this option with -t
        then it is best to redirect output to a file for storage.
        stdout write blocking over serial line or a TCP stream can play havoc
        with regularity of readings - they end up clumped in time.

OPTIONS:

  -c N     return N measurements
  -o filename   
           send output to file called filename. If file exists, output is
           appended to the file.
  -p T     every T millisecs - remember only accurate to aprox 10ms
           default is every second (1000ms) - incompatible with -z flag above.
  -r R     set the default measurement range


NOTES:

BUGS:

Any questions, suggestions or problems, etc. should be sent to

Jim Jackson   <jj@franjam.org.uk>
