Example Program Subprograms - HP E1340A User Manual

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

Advertisement

C and QuickBASIC
Programs
Example Program
Subprograms
272 HP E1340A Register-Based Programming
2. In this mode, the Frequency Register, RAM bank, and RAM size bits
(Table C-2) are not used.
The C program DACDRIVE.C is in directory "CPROG", and the
QuickBASIC program DACDRIVE.BAS is in directory "QBPROG" on the
example program disk HP P/N E1340-10036.
The following file contains the subprograms used by the preceding example
programs.
1
!Subprograms used for register-based programming (file name 'SUBS').
2
!
10
SUB Function(Function,Ram)
20 Function: !Subprogram which selects the output waveform and places it
30
!in the specified RAM.
40
COM Base_addr
50
SELECT Function !128 + waveform selection
60
CASE 0
!Sine wave
70
Eeprom=128
80
CASE 1
!Triangle wave
90
Eeprom=132
100
CASE 2
!Sin(x)/x
110
Eeprom=136
120
CASE 3
!Haversine
130
Eeprom=140
140
CASE 4
!Square wave
150
Eeprom=144
160
CASE 5
!First 10 terms of square wave
170
Eeprom=148
180
CASE 6
!First 4 terms of square wave
190
Eeprom=152
200
CASE 7
!Falling ramp
210
Eeprom=156
220
CASE 8
!First 20 terms of falling ramp
230
Eeprom=160
240
CASE 9
!Rising ramp
250
Eeprom=164
260
CASE 10
270
Eeprom=168
280
CASE 11
290
Eeprom=172
300
CASE 12
310
Eeprom=176
!First 20 terms of rising ramp
!White noise
!Modulated white noise
Appendix C

Advertisement

Table of Contents
loading

Table of Contents