HP E1340A User Manual page 274

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

Advertisement

274 HP E1340A Register-Based Programming
710 !
720 SUB Frequency2(Freq2)
730 Frequency2: !Subprogram which loads frequency register 2 with the
740
!second FSK frequency or the stop sweep frequency.
750
COM Base_addr
760
Freq=(Freq2*100)
770
C$=DVAL$(Freq,16)
780
!
790 !Load the frequency value
800
Write_reg(8,2)
810
Write_reg(10,IVAL(C$[1;2],16))
820
Write_reg(10,IVAL(C$[3;2],16))
830
Write_reg(10,IVAL(C$[5;2],16))
840
Write_reg(10,IVAL(C$[7;2],16))
850
Check_done
860 SUBEND
870 !
880 SUB Amplitude(Ampl,Offset,Imp,Corr)
890 Amplitude: !Subprogram which sets the necessary attenuation for the
900
!specified amplitude. Also sets the DC offset and specifies
910
!the output impedance and sets frequency correction.
920
COM Base_addr
930
!
940
Atten=16384*(Corr<>0) !turn off amplitude correction if Corr = 1
950
SELECT Imp
960
CASE 50
970
IF Ampl>.51175 OR Offset>.51175 THEN
980
Atten=Atten+(Ampl/5.1175)*2047
990
C$=DVAL$(Atten+32768,16) !32768 = no attenuation
1000
Offset=(Offset/.0025)+2048
1010
ELSE
1020
Atten=Atten+(Ampl/.51175)*2047
1030
C$=DVAL$(Atten,16)
1040
Offset=((Offset/.0025)*10)+2048
1050
END IF
1060
CASE ELSE
1070
IF Ampl>1.0235 OR Offset>1.0235 THEN
1080
Atten=Atten+(Ampl/10.235)*2047
1090
C$=DVAL$(Atten+32768,16)
1100
Offset=(Offset/.005)+2048
1110
ELSE
!32768 = no attenuation
Appendix C

Advertisement

Table of Contents
loading

Table of Contents