10    ! US Semiconductor Systems Center     LATCHUP.   Jay Thomas 2/95
20    !
30    ! This IBASIC program runs from the HP4156A front panel and measures
40    ! hold current of a MOSFET structure.  SMU1 forces a constant current
50    ! starting at time T1. SMU3 is switched to -2volts to trigger a latch
60    ! condition.  At time T2, SMU3 is set to 0v to enable the hold state.
70    ! During time T3, SMU1 is ramped down in small current steps until the
80    ! device fall out of latched condition (hold current).  4145 syntax
90    ! DI and DV commands are used to create the timing sequence at T1-T3.
100   ! The program switches to 4156 SCPI mode and graphs the results.  The
110   ! marker is set to show the hold current value.
120   !
130   DIM Meas(200),Force(200)    ! max number of points (Isteps + 1)
140   INTEGER I,Isteps
150   !---------------Set measurement parameters--------------------------
160   Istart=.005                 ! current during T1 & start current at T3
170   Istop=5.E-5                 ! minimum current at end of T3 ramp
180   Isteps=99                   ! number of steps in T3 ramp
190   Vtrigger=-2                 ! trigger voltage
200   !
210   !---------------Make measurement------------------------------------
220   ASSIGN @Hp4156 TO 800                     ! internal hp-ib address
230   ASSIGN @Form_off TO 800;FORMAT OFF        ! set to binary data type
240   OUTPUT @Hp4156;"SYST:LANG COMP"           ! set to 4145 syntax mode
250   ! T1
260   OUTPUT @Hp4156;"US"                       ! 4145 user mode
270   OUTPUT @Hp4156;"DI";1,0,Istart,5          ! smu1 forces Istart amps
280   OUTPUT @Hp4156;"DV";2,0,0,.1              ! smu2 forces  0 V
290   OUTPUT @Hp4156;"DV";3,0,Vtrigger,.1       ! smu3 forces trigger voltage
300   ! T2
310   OUTPUT @Hp4156;"DV";3,0,0,.1              ! smu3 removes trigger voltage
320   ! T3
330   Iinc=(Istart-Istop)/Isteps                ! ramp step increment
340   FOR I=0 TO Isteps
350      Force(I)=Istart-(Iinc*I)               ! current at each ramp step
360      OUTPUT @Hp4156;"DI";1,0,Force(I),5     ! smu1 forces next ramp current
370      OUTPUT @Hp4156;"TV1"                   ! monitor voltage on SMU1
380      ENTER @Hp4156;Meas(I)                  ! store meas in 4156 buffer
390   NEXT I
400   !
410   !---------------Setup for graphics hardcopy to Laserjet-------------
420   OUTPUT @Hp4156;"*RST"                     ! reset to 4156 command mode
430   OUTPUT @Hp4156;":HCOP:DEST PAR"           ! set printer port to parallel
440   OUTPUT @Hp4156;":HCOP:ITEM:FFE:STAT ON"   ! enable form feed
450   !---------------Display measurement on graphics page----------------
460   !
470   OUTPUT @Hp4156;":PAGE:CHAN:UVAR:DEF 'HOLD','I',100"       ! User var HOLD
480   OUTPUT @Hp4156;":PAGE:CHAN:UVAR:DEF 'LATCH','V',100"      ! User var LATCH
490   OUTPUT @Hp4156;":PAGE:CHAN:CDEF:COMM 'Latchup Hold Test'" ! Title comment
500   !
510   OUTPUT @Hp4156;":FORM:DATA REAL,64"       ! real 64-bit format
520   OUTPUT @Hp4156;":FORM:BORD NORM"          ! binary normal swapped byte
530   OUTPUT @Hp4156;":TRAC HOLD,#0";           ! load user var HOLD data
540   OUTPUT @Form_off;Force(*),END             ! download data to end of data
550   !
560   OUTPUT @Hp4156;":TRAC LATCH,#0";          ! load user var LATCH data
570   OUTPUT @Form_off;Meas(*),END              ! download data to end of data
580   !
590   OUTPUT @Hp4156;":PAGE:DISP:SET:MODE GRAP" ! goto graph setup page
600   !
610   OUTPUT @Hp4156;":PAGE:DISP:SET:GRAP:X:NAME 'LATCH'"       ! X axis var
620   OUTPUT @Hp4156;":PAGE:DISP:SET:GRAP:Y1:NAME 'HOLD'"       ! Y axis var
630   !
640   OUTPUT @Hp4156;":PAGE:GLIS"               ! goto graph page
650   OUTPUT @Hp4156;":PAGE:GLIS:MARK:LIM"      ! move marker to min current
660   !
670   END
