Sending Data Directly To The Dac - HP E1340A User Manual

Arbitrary function generator
Hide thumbs Also See for E1340A:
Table of Contents

Advertisement

Sending Data
Directly to the DAC
HP IBASIC (DACDRIVE)
Comments
Appendix C
The following program downloads data directly to the DAC from the Input
Data Register (base +0C
(amplitudes). Since the data is not stored in RAM, it is output as it is
received by the DAC.
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,Base_addr+12;Voltage(I)
220 NEXT I
230 END
240 !
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.
HP E1340A Register-Based Programming 271
). The data are a series of random numbers
16

Advertisement

Table of Contents
loading

Table of Contents