SERIES IP320 INDUSTRIAL I/O PACK 12-BIT HIGH DENSITY ANALOG INPUT BOARD
___________________________________________________________________________________________
- 8 -
D15...D00
FFFF
NOTE: "FFFF" means that all bits are programmed as ones.
Read ADC Data - (Read, Base + 20H)
Use the Read ADC Data command to read the results of the last
ADC conversion. This command should be used following the ADC
Convert command or an external trigger input. Bit 15 (CTRIG) in the
Control Register can be used to determine if a conversion has been
triggered, either by software command or external trigger input. If
the Read ADC Data command is executed while the ADC
conversion is taking place, then the IP320 will institute wait states
until the data is available (up to 8.5 uS.) before providing the ADC
data and completing the cycle. Execution of the read command
requires 3 wait states, if the ADC conversion completed prior to
initiating the read command. The execution of this command will
reset the CTRIG bit in the Control Register.
The 12-bits of data are left-justified within the 16-bit word (D16).
The four LSB's are not driven by the ADC and are undefined
(typically passive pull-ups on the carrier board will cause undriven
bits to read high). Data format, is either Bipolar Offset Binary (BOB)
or Unipolar Straight Binary (USB); see Section 2 for details.
MSB _ _ _ _ _ _ _ _ _ _ LSB X X X X
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
←
DATA
→
X X X X
"X" means “Don’t Care” - the bit value does not matter.
PROGRAMMING CONSIDERATIONS FOR ACQUIRING
ANALOG INPUTS
The IP320 provides two different methods of analog input
acquisition to give the user maximum flexibility for each application.
The following sections describe the features of each and how to best
use them.
Using the Separate ADC Convert and Read Commands
Use of the separate convert and read commands is a
straighforward and accurate way to acquire data. This method is
useful for most applications.
Programming Example (Separate ADC Convert & Read)
NOTE: For this example it is assumed that the external trigger input
is NOT being used to trigger conversions.
1. Write to the control register to configure the acquisition mode,
gain, and channel selections.
2. Delay to allow for input settling.
3. Execute the ADC Convert command.
4. Write to the control register to configure the acquisition mode,
gain, and channel selections for the next acquisition - if they are
different. This may be done while the conversion is in progress
because the ADC is in the hold mode.
5. The ADC conversion takes several microseconds. This time
can be put to use for other purposes (e.g. calibration of ADC
channel data).
6. Read ADC Data - if the conversion is still in progress, the read
command will generate wait states until it can deliver the data.
7. Repeat steps 3-6. as required to acquire additional analog input
samples. Note that the input settling delay does not have to be
inserted, since writing to the control register to configure for the
next acquisition, immediately after initiating the previous
conversion, will allow the input to adequately settle before the
next conversion is started. The overlapping of these tasks with
the ADC conversion cycle is what gives rise to "pipelined"
operation and maximum system throughput.
Using External Conversion Triggers
External hardware triggers are generated by the user via an
external TTL compatible input through the field I/O connector (see
Section 2) - make sure that all pertinent voltage and pulse width
constraints are met. The conversion is initiated on the falling edge of
the external trigger signal. This type of conversion triggering is
useful for synchronizing the ADC conversion of analog inputs (e.g.
several IP320's) to external events. Precise time intervals between
conversions can be achieved with an external timing device.
Programming Example (External Conversion Trigger)
NOTE: For this example it is assumed that the external trigger input
is being used to trigger conversions.
1. Write to the control register to setup the acquisition mode, gain,
and channel selections.
2. Delay to allow for input settling.
3. Poll Bit 15 (CTRIG) in the control register to determine when an
ADC conversion has been triggered (this assumes some prior
knowledge in the application program that a hardware external
trigger will occur for a particular channel's conversion).
4. Read ADC Data - if the conversion is still in progress, the read
command will generate wait states until it can deliver the data.
The Read ADC Data command will reset the CTRIG bit in the
control register to prepare for the next external trigger.
5. Repeat steps 3-4 for acquisition of the same input. Otherwise,
repeat steps 1-4 as required.
USE OF CALIBRATION SIGNALS
Reference signals for analog input calibration have been
provided to improve the accuracy over the uncalibrated state. The
use of software calibration allows the elimination of hardware
calibration potentiometers traditionally used in precision analog front
ends. A comparison of the uncalibrated and software calibrated
performance is shown to illustrate the importance of the software
calibration.
Software calibration uses some fairly complex equations.
Acromag provides you with the Industrial I/O Pack Software Library
diskette to make communication with the board and calibration easy.
It relieves you from having to turn the equations of the following
sections into debugged software calibration code. The functions are
written in the “C” programming language and can be linked into your
application. Refer to the “README.TXT” file in the root directory
and the “INFO320.TXT” file in the “IP320” subdirectory on the
diskette for details.