Waveform Hopping - HP E1340A User Manual

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

Advertisement

C and QuickBASIC
Programs

Waveform Hopping

HP IBASIC (WAVE_HOP)
Comments
Appendix C
The C program FSK.C is in directory "CPROG", and the QuickBASIC
program FSK.BAS is in directory "QBPROG" on the example program disk
HP P/N E1340-10036.
The following program selects between two waveforms based on the level
of a control signal applied to the "Aux In" BNC.
1
!RE-SAVE"WAVE_HOP"
2
GET "SUBS",500,3 !place subprograms at line 500, continue w/line 3
3
!Program which demonstrates switching between waveforms in RAM 0
4
!and RAM 1.
5
!
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
!Load sine wave into RAM 0
80
Function(0,0)
90
!Load triangle wave into RAM 1
100 Function(1,1)
110 !Set the frequency (frequency register 1)
120 Frequency1(1000.) !1 kHz
130 !Set amplitude, offset, impedance, correction
140 Amplitude(5,0,50,1) !5 Vpk, 0V, 50 ohms, correction disabled
150 !Set the Aux Out level, Aux In level, clock source, Aux Out signal,
160 !RAM bank, frequency register, and output mode.
170 Mode(0,0,3,1,0,0,2) !norm,norm,internal,pulse/cycle,bank 0,reg 1,w_hop
180 END
190 !
1. The waveforms used in waveform hopping are stored in RAM 0 and
RAM 1. The waveforms can be waveforms from the waveform
EPROM or arbitrary waveforms loaded from the Input Data Register.
The output waveform is selected by the "Aux In" BNC port. The
rising edge of the control signal selects RAM 0. The falling edge
selects RAM 1. The "Aux In level" parameter can be used to invert
the sensing of the "Aux In" port in order to select a waveform with
the other edge.
2. Sending any command to the AFG while the Wave hop mode is set
aborts the mode.
HP E1340A Register-Based Programming 263

Advertisement

Table of Contents
loading

Table of Contents