Outputting A Voltage Or Current - HP E1328A User Manual

D/a converter module
Hide thumbs Also See for E1328A:
Table of Contents

Advertisement

Outputting a
Voltage or Current
HP IBASIC Version
76
HP E1328A Register-Based Programming
For specific information on setting or changing the output levels, see the
sections titled "Channel Output Registers" on page 63 and " A
Register-Based Algorithm" on page 71. Voltage or current mode is jumper
selected on the module; it is not possible to select either the voltage or
current mode by register programming. Ensure the proper mode is selected
before writing data to the module.
The following examples set the D/A Converter Channel 1 to output
+100mVdc. First determine the output data. The required value is a 16-bit
number in offset binary. FFFF
negative full scale, and 8000
arranged to provide "3 counts per 1 mV" resolution.
For our example, to program 100 mV, multiply 100 by 3 (= 300 decimal, or
12C
). Add this to 8000
16
output values, subtract from 8000
and 2C
is the LSB. Writing to the LSB Register causes the corresponding
16
channel to output the specified voltage or current.
10
Base_addr = DVAL("1FD200",16)
20
Msb_addr = DVAL("10",16)
30
Lsb_addr = DVAL("12",16)
40
! Poll Status Register Bit 0 (RDY).
50
REPEAT
60
UNTIL BIT (READIO (-9826, Base_addr + 4),0)
70
! Verify that Channel settle bit is 1.
80
REPEAT
90
UNTIL BIT (READIO (-9826, Base_addr + 4),8)
100 ! Write the MSB.
110 WRITEIO -9826, Base_addr + Msb_addr; DVAL ("81",16)
120 ! Poll Status Register Bit 0 (RDY).
130 REPEAT
140 UNTIL BIT (READIO (-9826, Base_addr + 4),0)
150 ! Write LSB.
160 WRITEIO -9826, Base_addr + LSB_addr; DVAL("2C",16)
170 ! Poll Status Register Bit 0 (RDY).
180 REPEAT
190 UNTIL BIT (READIO (-9826, Base_addr + 4),0)
200 ! Poll Status Register Bit 7 (DON).
210 REPEAT
220 UNTIL BIT (READIO (-9826, Base_addr + 4),7)
230 END
represents positive full scale, 0000
16
is zero. Calibrated output modes are
16
to get the output data (812C
16
instead of adding). 81
16
! Channel 1 MSB Register offset.
! Channel 1 LSB Register offset.
is
16
). (For negative
16
is the MSB
16
Appendix B

Advertisement

Table of Contents
loading

Table of Contents