
Analog Input Status: Base+3 (Read)
Bit:
7
6
5
4
3
2
1
0
Name:
STS
SD
WAIT
DACBSY
OVF
SCANEN
G1
G0
STS
A/D status.
1 = A/D conversion or scan in progress.
0 = A/D is idle.
If SCANEN = 0, single conversion mode, STS goes high when an A/D conversion is started and stays
high until the conversion is finished. If SCANEN = 1, scan mode enabled, STS stays high during the
entire scan. After starting a conversion in software, the program must monitor STS and wait for the
value to be 0 before reading A/D values from Base+0 and Base+1.
SD
Single-ended/differential mode indicator.
1 = Single-ended
0 = Differential
WAIT
A/D input circuit status.
1 = A/D circuit is settling on a new value.
0 = ok to start conversion.
WAIT goes high after the channel register (Base+2) or the gain register (Base+3) changes, and
remains high for nine microseconds. The program should monitor this bit after writing to either the
channel or gain register, and wait for the value to become 0 prior to starting an A/D conversion.
DACBSY
DAC is busy updating indicator (approx. 30 µS)
1 = Busy
0 = Idle
Do not attempt to write to the DAC (Base+6 and Base+7) while the value of this bit is 1.
OVF
FIFO Overflow bit. This bit indicates that the FIFO has overflowed, meaning that the A/D circuit has
attempted to write data to a full FIFO. This condition occurs when data is written into the FIFO faster
than the FIFO is read.
When overflow occurs, the FIFO discards additional data until it is reset. The OVF condition is
sticky, with the bit remaining set until the FIFO is reset, allowing the application program to determine
if overflow has occurred. If overflow occurs, then you must either reduce the sample rate or increase
the efficiency of your interrupt routine and/or operating system.
SCANEN
Scan mode readback. (See Base+3, write, above).
G1-G0
Gain. The gain is the ratio between the input voltage and the voltage seen by the A/D converter. The
A/D always works with a maximum input voltage of 10V. A gain of two means the maximum input
voltage at the connector pin is 5V.
0 = gain of 1
1 = gain of 2
2 = gain of 4
3 = gain of 8
(See the description for register Base+3, write, above).
Diamond Systems Corporation
Athena II User Manual
Page 58