
ADS168 Analog Industrial Interface Board
11
Upon receiving a load FIFO command, the ADS168 will transfer all of the current conversion data
for the selected analog input channels to the FIFO. The FIFO data will be loaded sequentially
from the lowest chan
nel number to the highest channel number in the internal scan list
-
not in the
order the list was created. In the continuous conversion mode, the FIFO data is stored in the
same format as the FIFO data in the single conversion mode (Table 3.6). Once the FIFO has
been loaded, a byte will then be loaded into the OUT DATA register indicating the number of data
bytes stored in the FIFO. The OBF flag of the STATUS register is set, and an ISA bus interrupt is
generated, if enabled. Data can be read from the FIFO at anytime, once the OBF flag has been
set. The OBF flag and the ISA interrupt are cleared upon the OUT DATA register being read.
The recommended program sequence for analog input continuous conversion mode is:
1. Read the STATUS register until th
e IBF flag is cleared.
2. Load the COMMAND register with a contin
u
ous conversion command byte for the first channel.
(Perform steps 1 and 2 for up to 16 channels)
3. Send a load FIFO command.
4. Poll the STATUS register, checking the OBF flag or wait for a
n ISA interrupt.
5. Read the OUT DATA register to get the number of bytes in the FIFO. This action will clear the
OBF flag.
6. Read the FIFO to get the LSB of the conversion data for the first channel in the list.
7. Read the FIFO to get the MSB of the co
nversion data for
the first channel in the list.
8. Repeat steps 6 and 7
until the end of the data has been reached
.
If a load FIFO command is issued and the board is not in a continuous conversion mode, the
FIFO data will be cleared and a value of zero will be loaded into the OUT DATA register,
indicating that no conversion data is present in the FIFO. Data in the FIFO will be overwritten,
each time a load FIFO command is issued.
The board will exit the continuous conversion mode when a single conversion command or a
software reset command is issued. Once the board has exited the continuous conversion mode,
the list of channels that were scanned will be cleared. A new channel list will need to be loaded
each time the continuous conversion mode is starte
d.
Analog Output Programming. When an analog output is to be updated, a command byte,
containing the command mode bit (D6) and the full-scale output range select bit (D7) for the
channel, is written to the command register. Full-scale analog output ranges of 0 - 5 VDC (D7 =
1) or 0 - 10 VDC (D7 = 0) can be selected. Two data bytes are then written to the INP DATA
register. The first byte contains the lower four bits of the analog output value and the number of
the channel to be updated, ranging from 0 to 7. The second byte contains the most significant
bits of the analog output value.
The data are shown in Table 3.9
The recommended programming sequence for the analog output mode is:
1. Read the STATUS register until the IBF flag is cleared.
2. Load t
he COMMAND register with the analog output command byte.
3. Read the STATUS register until the IBF flag is cleared.
4. Load the INP DATA register with the channel number and LSB data byte.
5. Read the STATUS register until the IBF flag is cleared.
Note t
hat once the IBF flag clears, the RH flag (bit 2 of
the STATUS register) will go high indicating the board
is ready for the high byte.
6. Load the INP DATA register with the MSB data byte.