HP E1340A User's Manual
Download Operation & user’s manual of HP E1340A Portable Generator for Free or View it Online on All-Guides.com.
C and QuickBASIC
Programs
The C program EXT_BRST.C is in directory "CPROG", and the
QuickBASIC program EXT_BRST.BAS is in directory "QBPROG" on the
example program disk HP P/N E1340-10036.
Frequency-Shift
Keying
The following program sets the AFG’s frequency-shift keying mode. The
frequency of the output signal switches between 1 kHz and 10 kHz
depending on the level of the signal applied to the "Aux In" BNC port.
HP IBASIC (FSK)
1 !RE-SAVE"FSK"
2 GET "SUBS",500,3 !place subprograms at line 500, continue w/line 3
3 !Program which demonstrates frequency-shift keying (FSK).
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 the first FSK frequency (frequency register 1)
100 Frequency1(1000.) !1 kHz
110 !Set the second FSK frequency (frequency register 2)
120 Frequency2(1.0E+4)!10 kHz
130 !Set amplitude, offset, impedance, correction
140 Amplitude(5,0,50,0) !5 Vpk, 0V, 50 ohms, correction enabled
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,1) !norm,norm,internal,pulse/cycle,bank 0,reg 1,FSK
180 END
Comments 1. The first FSK frequency is set with Frequency Register 1. The
second FSK frequency is set with Frequency Register 2. A control
signal applied to the "Aux In" BNC port selects the current output
frequency. A rising edge selects Frequency Register 1. A falling edge
selects Frequency Register 2. The "Aux In level" parameter can be
used to invert the sensing of the "Aux In" port in order to select a
frequency with the other edge.
2. Since the output frequency is selected by the "Aux In" port, the
Frequency Register parameter (bit 5 of byte 2 - Table C-2) is ignored.
Sending any command to the AFG while the FSK mode is set aborts
the mode.
262 HP E1340A Register-Based Programming Appendix C