740 ! *********** ********** SEN D THE SETUP COMMAN D ************ ************ **
750 ! Send the Setup co mmand
760 !
770 OUTPUT @Comm US ING "#,15A";": SYSTEM:SETUP #"
780 PRINT "SYSTEM:SETUP command has been sent"
790 PAUSE
800 !
810 ! *********** ********** SEN D THE BLOCK SETUP ** ************ ************ **
820 ! Send the block se tup header to the lo gic analyzer in th e proper format.
830 !
840 Byte=LEN(VAL$(Numbytes))
850 OUTPUT @Comm US ING "#,B";(Byt e+48)
860 IF Byte=1 THEN OUTPUT @Comm USING "#,A";VAL$(Numbytes)
870 IF Byte=2 THEN OUTPUT @Comm USING "#,AA";VAL$(Numbytes)
880 IF Byte=3 THEN OUTPUT @Comm USING "#,AAA";VAL$(Numbytes)
890 IF Byte=4 THEN OUTPUT @Comm USING "#,AAAA";VAL$(Numbytes)
900 IF Byte=5 THEN OUTPUT @Comm USING "#,AAAAA";VAL$(Numbytes)
910 IF Byte=6 THEN OUTPUT @Comm USING "#,AAAAAA";VAL$(Numbytes)
920 IF Byte=7 THEN OUTPUT @Comm USING "#,AAAAAAA";VAL$(Numbytes)
930 IF Byte=8 THEN OUTPUT @Comm USING "#,AAAAAAAA";VAL$(Numbytes)
940 !
950 ! *********************** SAVE BUFFER POINTERS *************************
960 ! Save the transf er buffer pointe r so it can be restore d after the
970 ! transfer.
980 !
990 STATU S @Buff,5;St reg
1000 !
1010 ! ********* ********* TRAN SFER SETUP TO THE 16 550 ********** ***********
1020 ! Transfer the setup from the buffer to the 1660A.
1030 !
1040 TRANSFER @Buff TO @Comm;COUNT Numbytes,WAIT
1050 !
1060 ! ********************** RESTORE BUFFER POINTERS ***********************
1070 ! Restore the transfer buffer pointer
1080 !
1090 CONTROL @Buff,5;Streg
1100 !
1110 ! ******************** SEND TERMINATING LINE FEED **********************
1120 ! Send the terminating linefeed to properly terminate the setup string.
1130 !
1140 OUTPUT @Comm;""
1150 !
1160 PRINT "**** SENT THE SETUP ****"
1170 END
Programming Examples
Transferring the logic analyzer configuration36–16