340 !Set the Aux Out level, Aux In level, clock source, Aux Out signal,
350 !RAM bank, frequency register, and output mode.
360 Mode(0,0,3,1,0,0,0) !norm,norm,internal,pulse/cycle,bank 0,reg 1,cont
370 END
380 !
500 !Subprograms used for register-based programming (file name ’SUBS’).
501 !
509 SUB Function(Function,Ram)
519 Function: !Subprogram which selects the output waveform and places it
529 !in the specified RAM
539 COM Base_addr,Waveform(*)
Comments
1. Before running this program, type ’ GET "SUBS",500 ’. This adds
the subprograms to program ARBWAVE starting at line 500. Add
the array variable "Waveform(*)" to the COM statement found in
selected subprograms.
2. Arbitrary waveforms are loaded into RAM from the Input Data
Register (base + 0C
16
). Arbitrary waveforms must be 4096 points
long. Undefined points are output as random amplitudes. Since
arbitrary waveforms are 4096 points, the frequency of the waveform
is the repetition rate, rather than the sample rate of each point.
3. The ’Function’ subprogram used with program ARBWAVE sets bit 6
of the ’output function and RAM’ byte (Table C-2). This sets the
output to 0V as the waveform data is downloaded into RAM from the
Input Data Register. When bit 6 is not set (0), the output tracks the
Input Data Register as the data is loaded.
4. All AFG clock sources and modes (Table C-2) are applicable for
arbitrary waveforms.
C and QuickBASIC
Programs
The C program ARBWAVE.C is in directory "CPROG", and the
QuickBASIC program ARBWAVE.BAS is in directory "QBPROG" on the
example program disk HP P/N E1340-10036.
Appendix C
HP E1340A Register-Based Programming 267
Summary of Contents for E1340A
Page 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Page 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Page 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Page 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Page 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Page 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Page 218: ...218 HP E1340A Specifications Appendix A ...
Page 284: ...284 HP E1340A Register Based Programming Appendix C ...
Page 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...