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) !32768 = no attenuation
1100 Offset=(Offset/.005)+2048
1110 ELSE
274 HP E1340A Register-Based Programming
Appendix C
Summary of Contents for E1340A
Page 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Page 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Page 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Page 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Page 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Page 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Page 218: ...218 HP E1340A Specifications Appendix A ...
Page 284: ...284 HP E1340A Register Based Programming Appendix C ...
Page 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...