Hardware Reference
In-Depth Information
and handles signals in the range 0- 10 V. In order to cope with low amplitude
input signals, an on-board programmable gain amplifier can be used to provide
input gains of 1, 10, or 100. Conversion time is 25 µ s but faster ADC chips
may be fitted where conversion speed is critical.
Input connection is made via a 50-way IDC connector attached to the metal
rear bracket. A ribbon cable or screw terminal may be fitted directly to the
50-way connector. An on-board DC-DC converter provides power for the
analogue circuitry of the ADC.
Four addresses are used to set up and drive the card, and a set of links set the
base address of the port within I/O address space. These provide gain selection
(write), initiate conversion (write), and converted data (read). The base address
of the card is selected by means of PCB links.
Programming the card is reasonably straightforward. The gain of the analogue
input will normally be set by writing appropriate bytes during initialization.
Thereafter, successive analogue-to-digital conversions are initiated by simply
writing to the relevant port and then reading the value of the returned data.
The following BASIC program displays the inputs of the AIP-24 ports on
the screen in decimal format. Note that the base address used for the program
is 300H (768 decimal) which is the default factory setting:
REM Initialise
CLS: KEY OFF: LOCATE 1,1
p=0
REM Main loop to print data
begin:
FORy=1TO3
FORx=1TO80STEP 10
LOCATE y, x
GOSUB getdata
p=p+1
IFp>23THENp=0
PRINT n; ” ”;
NEXT
NEXT
GOTO begin
REM Get data from ports
getdata:
OUT &H300,p
OUT &H301,0
a = INP(&H302)
b = INP(&H303)
c = b AND &HF
n=(256*c)+a
RETURN
Further examples of programming an analogue-to-digital converter appears in
Chapter 12.
Measurement Computing Corporation Dual-422
The Measurement Computing Corporation Dual-422 is a two-channel RS-422
interface card (Figure 2.28). The half-size ISA/EISA card is compatible with
Search WWH ::




Custom Search