HP E1340A User Manual page 267

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

Advertisement

Comments
C and QuickBASIC
Programs
Appendix C
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(*)
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
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.
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.
HP E1340A Register-Based Programming 267
). Arbitrary waveforms must be 4096 points
16

Advertisement

Table of Contents
loading

Table of Contents