Hardware Reference
In-Depth Information
Analogue inputs generally exhibit a high resistance (50 k or more) and
operational amplifier buffers are usually fitted to provide voltage gain adjust-
ment and additional buffering between the analogue input and the input of the
ADC chip.
Analogue outputs are usually available at a relatively low-output impedance
(100 or less) and are invariably buffered from the DAC by means of opera-
tional amplifier stages. Typical output voltages produced by an analogue output
port utilizing an 8-bit DAC range from 0 to 5.1 V (20 mV/bit) when configured
for unipolar operation or 5.1 to + 5 . 1 V (40 mV/bit) when bipolar operation
is selected.
The procedure for reading values returned by an analogue input port will
vary depending upon the type of ADC used. A typical sequence of operations
for use with a multi-channel analogue input card with 8-bit resolution based on
the ZN448E ADC would take the following form:
1
Select the desired input channel and start conversion. Send the appropriate
byte to the status latch in order to select the required channel and input
multiplexer. Conversion starts automatically when data is written to the status
latch address.
2
Either
(i)
Wait 10 µ s (this is just greater than the 'worst-case' conversion time)
using an appropriate software delay.
or
(ii)
Continuously poll the ADC to sense the state of the end-of-conversion
(EOC) line. This signal appears as a single bit in the status byte and, when
low, it indicates that conversion is complete and valid data is available
from the ADC.
3
Read the data. Having ensured that conversion is complete, the valid data
byte can be read from the appropriate ADC address.
The byte read from the port will take a value between 00H and FFH. If the
ADC has been configured for unipolar operation, a value of 00H will correspond
to 0 V while a value of FFH will correspond to full-scale positive input (typically
5.1 V). When bipolar operation is used, a data byte of 00H will indicate the most
negative voltage (typically 5.1 V) whilst FFH will indicate the most positive
voltage (typically + 5.1 V).
It is important to note that the values returned by conventional successive
approximation ADCs will not be accurate unless the input voltage has remained
substantially constant during the conversion process. Furthermore, where some
variation is inevitable, several samples should be taken and averaged.
Analogue output ports are generally much easier to use than their analogue
input counterparts. It is usually merely sufficient to output a byte to the appro-
priate port address. In most cases, analogue output ports will be configured for
unipolar operation and, in the case of an 8-bit DAC, a byte value of 00H will
result in an output of 0 V whilst a byte value of FFH will result in a full-scale
positive output (typically 5.1 V).
Sensors
Sensors provide a means of inputting information to a process control system.
This information relates to external physical conditions such as temperature,
Search WWH ::




Custom Search