Sweeping - HP E1340A User Manual

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

Advertisement

C and QuickBASIC
Programs

Sweeping

HP IBASIC (LINSWEEP)
C and QuickBASIC
Programs
264 HP E1340A Register-Based Programming
3. When the "Wave hop" mode is set, the RAM bank and RAM size bits
(Table C-2) are not used.
The C program WAVE_HOP.C is in directory "CPROG", and the
QuickBASIC program WAVE_HOP.BAS is in directory "QBPROG" on
the example program disk HP P/N E1340-10036.
The following program generates a linear sweep from 1 kHz to 10 kHz in 5
seconds.
1
!RE-SAVE"LINSWEEP"
2
GET "SUBS",500,3 !place subprograms at line 500, continue w/line 3
3
!Program which demonstrates how to set up a linear sweep.
4
!
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 function and load RAM
80
Function(0,0) !sine wave in RAM 0
90
!Set amplitude, offset, impedance, correction
100 Amplitude(2,0,50,0) !2 Vpk, 0V, 50 ohms, correction enabled
110 !Set the start and stop frequency, sweep rate, and sweep type
120 Linsweep(1000,10000.,5)!start freq, stop freq, rate
130 !Set the Aux Out level, Aux In level, clock source, Aux Out signal,
140 !RAM bank, frequency register, and output mode.
150 Mode(0,0,3,3,0,0,5) !norm,norm,internal,sweep sync,bank 0,reg 1,sweep
160 END
170 !
The C program LINSWEEP.C is in directory "CPROG", and the
QuickBASIC program LINSWEEP.BAS is in directory "QBPROG" on the
example program disk HP P/N E1340-10036.
Appendix C

Advertisement

Table of Contents
loading

Table of Contents