Fast Frequency Changes - HP E1340A User Manual

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

Advertisement

Fast Frequency
Changes
HP IBASIC (FASTFREQ)
268 HP E1340A Register-Based Programming
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.
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
Appendix C

Advertisement

Table of Contents
loading

Table of Contents