Programming And External Pacing; Programning Considerations - HP 98640A Installation And Reference Manual

7-channel analog input interface
Table of Contents

Advertisement

PROGRAMMING AND -
__________
EX_T_E_R_N_A_L_P_A_C_IN_G~~
In
this section we will discuss how to program the A-to-D card to make voltage measurements. We
will also discuss how to take externally paced readings.
Before you start writing assembly language programs for the A-to-D card, take a careful look at your
application. You may be able to save time and effort by writing your programs in BASIC or Pascal
and calling the subroutines from the HP 98645A Measurement Library to access the A-to-D card.
The Measurement Library subroutines are able to take readings at the full speed of the A -to-D card.
(The Measurement Library attains this speed by using the same sort of assembly language routines that
we will discuss in this section.) You might find assembly language useful if your application demands
high computational speed: an assembly language program could do the set-up for readings faster than
the Measurement Library, and it could do data reduction after the readings faster than either BASIC
or Pascal.
If you've determined that assembly language is the right language for your application, read on. We
assume that you have a, solid working knowledge of MC6 8 000 assembly language and the Pascal
operating system. (Refer to the Pascal 2.0 System Designer's Guide, part number 09826-90074, for
more information.) We also assume that you have absorbed the information in Section 3 of this
manual, particularly the paragraphs on registers and the analog pipeline.
PROGRAMMING CONSIDERA TIONS
Channel
and
Gain
To take a reading from the A-to-D card you must supply channel and gain information, and you may
supply pace information. The register number that you specify in your read request tells the card
which channel and gain to use for the reading. This must be a 16-bit (word-wide) read. The follow-
ing table shows which register to read for a given channel and gain.
Address for
Address for
Address for
Address for
Channel
Gain of
1
Gain of
8
Gain of
64
Gain of
512
0
64
80
96
112
1
66
82
98
114
2
68
84
100
116
3
70
86
102
118
4
72
88
104
120
5
74
90
106
122
6
76
92
108
124
7
78
94
110
126
For example, to take a reading from channel 3 at a gain of 8, you would read from register 86 of the
A -to-D care:l.
4-1

Advertisement

Table of Contents
loading

Table of Contents