
ADS168 Analog Industrial Interface Board
9
or 32H software reset command can be used at any time. The reset action of the 30H and 31H
commands are identical.
Board Initialization. Once the board has been reset, it will need to be initialized with the anal
og
output channel update configuration. To initialize the analog outputs, determine the number of
the last analog output channel that needs to be updated
, from 0 to 7, for a total of eight channels
.
Write this value to the COMMAND register, only after a
software or hardware reset. Note that the
IBF flag will need to be checked, prior to writing the initialization command byte to the board
. The
maximum channel number (0 to 7) determines how many of the analog outputs are to be
refreshed by the on-board microprocessor. The lower the maximum number, the higher the
possible update rate. The allowable values for the channel numbers are 00H through 07H.
COMMAND register
7 6 5 4 3 2 1 0
0 0 0 0 0 n n n
Table 3.4- Analog output initialization
Compatibility Mode Reset. Another reset mode is available to maintain backward compatibility
with software written for earlier Robotrol ADA88 boards. Like the standard mode reset, there are
two forms of the compatibility mode software reset command
-
cleared analog outputs and analog
outputs remain unchanged. Writing a 01H to the COMMAND register will cause the board to
enter a reset state, without clearing the analog outputs. Writing a 03H to the COMMAND register
will cause the board to enter a reset state, with the analog outputs cleared to 0 VDC. An 01H or
03H software reset command can be used only after the board has been initialized with an
initialization command byte. It is not recommended that the 01H or 03H software reset
commands be used for new software designs. Note that the compatibility mode reset can only be
used
after
the board has been initialized with an initialization command, following a power-
on
reset.
Analog Input Programming. The ADS168 has two analog input modes. In the single
conversion mode, the board does one analog conversion per command. In the c
ontinuous
conversion mode, selected input channels are continuously scanned and converted. The
continuously converted values are loaded into the bus interface FIFO when commanded.
Single Conversion Mode. When a single analog input conversion is to be performed, a
command byte, containing the command mode bits (D6, D7), the gain setting for the channel (D4,
D5) and the analog input channel number (D0-D3), is written to the command register. Gain
values of X1, X2, X4 and X8 can be selected as shown in t
he following table.
COMMAND register
7 6 5 4 3 2 1 0
0 1
G1
MSB
- -
LSB
Gain
0 0
Channel Number
0 1
1 0
1 1
Table 3.5
- Analog Input Command
Once the conversion is complete, a 02H is loaded into the OUT DATA register, indicating that
there are two data bytes in the bus interface FIFO (Table 3.6). The first FIFO data byte contains
the channel number and the LSB data from the A/D conversion. The second FIFO data byte
contains the MSB data from the A/D conversion. The OBF flag of the STATUS register is then
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