Fast Frequency
Changes
The following program demonstrates the ’fast frequency change’ mode. The
program outputs 20 frequencies with durations between one and two
seconds. The frequencies and durations are computed with the program
’FREQ_GEN’ and stored in the file Fdata. Program ’FASTFREQ’ reads the
file and writes the frequencies (4 bytes at a time) to Frequency Register 1.
HP IBASIC (FASTFREQ)
1 !RE-SAVE"FASTFREQ"
2 !Program which demonstrates how to use the AFG’s fast frequency
3 !change mode. The program outputs 20 frequencies between 10 kHz
4 !and 20 kHz, for periods between 1 and 2 seconds. The frequencies are
5 !generated by the program ’FREQ_GEN’.
6 !
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 !Reset the AFG
60 Afg_reset
70 !Set the function and load RAM
80 Function(4,0) !square wave in RAM 0
90 !Set amplitude, offset, impedance, correction
100 Amplitude(5,0,50,1) !5 Vpk, 0V, 50 ohms, correction disabled
110 !Set the Aux Out level, Aux In level, clock source, Aux Out signal,
120 !RAM bank, frequency register, and output mode.
130 Mode(0,0,3,1,0,0,7) !norm,norm,internal,pulse/cycle,bank 0,xxx,ffreq
140 !
150 !Write frequency data to the AFG
160 ASSIGN @F TO "Fdata" !path to frequency file
170 DIM S$[100]
180 ON ERROR GOTO Done
190 LOOP
200 ENTER @F;S$ !enter frequency
210 IF POS(S$,"!") THEN S$=S$[POS(S$,"!")+1] !set string not to include !
220 ENTER S$;Freq,Duration !enter frequency and duration
230 Frequency1(Freq) !write frequency byte
240 WAIT Duration
250 END LOOP
260 Check_done
270 Done:DISP "END OF FREQUENCY FILE REACHED"
280 END
268 HP E1340A Register-Based Programming
Appendix C
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 ...