Externally Triggering A Burst Of Cycles - HP E1340A User Manual

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

Advertisement

C and QuickBASIC
Programs
Externally
Triggering a Burst
of Cycles
HP IBASIC (EXT_BRST)
Comments
Appendix C
The C program INT_BRST.C is in directory "CPROG", and the
QuickBASIC program INT_BRST.BAS is in directory "QBPROG" on the
example program disk HP P/N E1340-10036.
The following program outputs a burst of 50,000 waveform cycles when an
external trigger is received.
1
!RE-SAVE"EXT_BRST"
2
GET "SUBS",500,3 !place subprograms at line 500, continue w/line 3
3
!Program which demonstrates how to output a burst of waveform cycles
4
!when an external trigger is received.
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
!Set function and load RAM
80
Function(0,0) !sine wave in RAM 0
90
!Set the frequency (frequency register 1)
100 Frequency1(10000.) !10 kHz
110 !Set amplitude, offset, impedance, correction
120 Amplitude(5,0,50,0) !5 Vpk, 0V, 50 ohms, correction enabled
130 !Set the burst count
140 Burst(5.0E+4) !50k cycles
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,2,1,0,0,4) !norm,norm,burst,pulse/cycle,bank 0,reg 1,exbrst
180 END
190 !
1. To output a counted burst, the clock source must be set to "Burst"
and the output mode set to "External Burst". The burst count range is
1 to 65534. The reset value is undefined (register-based).
2. The external burst occurs when the signal on the "Aux In" BNC port
goes low (TTL levels). The "Aux In level" parameter can be used to
invert the sensing of the "Aux In" port in order to start a burst when
the "Aux In" port goes high.
HP E1340A Register-Based Programming 261

Advertisement

Table of Contents
loading

Table of Contents