Sending Data
Directly to the DAC
The following program downloads data directly to the DAC from the Input
Data Register (base +0C
16
). The data are a series of random numbers
(amplitudes). Since the data is not stored in RAM, it is output as it is
received by the DAC.
HP IBASIC (DACDRIVE)
1 !RE-SAVE"DACDRIVE"
2 GET "SUBS",500,3 !place subprograms at line 500, continue w/line 3
3 !Program which demonstrates how to download amplitude data directly
4 !to the DAC. The data sent is a series of random amplitudes.
5 !
10 !Compute the E1340 base address in E1300 A16 address space
20 COM Base_addr
30 Base_addr=DVAL("1FC000",16)+(80*64) !base address
40 !
50 !Compute data to be downloaded to the DAC.
60 INTEGER Voltage(1:10000)
70 FOR I=1 TO 10000
80 Voltage(I)=1024*RND+2048
90 NEXT I
100 !
110 !Reset the AFG
120 Afg_reset
130 !Set amplitude, offset, impedance, correction
140 Amplitude(10,0,50,0) !10 Vpk, 0V, 50 ohms, correction enabled
150 !Set the Aux Out level, Aux In level, clock source, Aux Out signal,
160 !RAM bank, frequency register, and output mode.
170 Mode(0,0,4,1,0,0,6) !norm,norm,in data reg,pulse/cycle,xxx,xxx,dirDAC
180 !
190 !Write data to the DAC
200 FOR I=1 TO 10000
210 WRITEIO -9826,Ba12;Voltage(I)
220 NEXT I
230 END
240 !
Comments
1. In the ’Direct DAC access’ mode, the frequency and length of the
arbitrary waveform are limited by the controller (computer). The
AFG frequency is set to DC. The attenuation and offset can be
programmed as required. The output remains at the last level written
to the DAC. The ’Direct DAC access’ mode is useful for setting the
output to a given level before a burst occurs.
Appendix C
HP E1340A Register-Based Programming 271
Содержание E1340A
Страница 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Страница 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Страница 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Страница 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Страница 57: ...Figure 3 1 Generating Arbitrary Waveforms 57 Generating Arbitrary Waveforms with the HP E1340A Chapter 3 ...
Страница 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Страница 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Страница 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Страница 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Страница 204: ...Figure 8 1 HP E1340A Status Groups and Associated Registers Chapter 8 HP E1340A AFG Status 204 ...
Страница 218: ...218 HP E1340A Specifications Appendix A ...
Страница 284: ...284 HP E1340A Register Based Programming Appendix C ...
Страница 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...