2
\$\begingroup\$

Using LTSpice XVII. I want to import the Diodes Incorporated ZXTP19020DG model. The SPICE model from their web site is:

*DIODES_INC_SPICE_MODEL ZXTP19020DG
*SIMULATOR=SIMETRIX
*ORIGIN=DZSL_DPG
*DATE=7/01/2013
*VERSION=1

.MODEL ZXTP19020DG PNP IS=8.5E-13 NF=1 BF=530 VAF=25.8 ISE=1.2E-13
+ IKF=3.8 NE=1.48 BR=130 VAR=5.15 ISC=0.8E-13 NC=1.23 RC=0.0045 RB=0.15
+ RE=0.009 QUASIMOD=1 RCO=0.27 GAMMA=2E-10 CJC=112E-12 MJC=0.4 VJC=0.6
+ CJE=345E-12 MJE=0.53 VJE=0.95 TF=0.59E-9 TR=4.2E-9 TRC1=.003 TRB1=.003
+ TRE1=.003 XTB=1.4

I copy-n-paste the .MODEL stanza into the standard.bjt file. I then open LTSpice and create a new schematic. I add a PNP transistor, right-click to Pick New Transistor, but the ZXTP19020DG does not show up on the list.

It may seem like I need to tell LTSpice to reload the components — if I erase the 2N2222 and 2N2907 (the first two entries in the original standard.bjt file), the 2N2907 still shows up on the Pick New Transistor dialog (for a PNP transistor). In all cases, I close and re-open LTSpice after any changes to standard.bjt. I also checked that there is only one standard.bjt file on the whole C: drive (under C:\Program Files\LTC\LTspiceXVII\lib\cmp).

This is what the beginning of the standard.bjt file looks like (I also added the NPN version, ZXTN19020DG, just in case):

* Copyright © 2000 Linear Technology Corporation.   All rights reserved.
*
*
.model ZXTN19020DG NPN IS=9E-13 NF=1 BF=530 IKF=6 VAF=105 ISE=8E-14
+ NE=1.4 NR=1  BR=174 IKR=1 VAR=12.8 ISC=4E-13 NC=1.37 RB=0.17 RE=0.0055
+ RC=0.0035 CJC=89E-12 MJC=0.34 VJC=0.51 CJE=365E-12 MJE=0.39 VJE=0.8
+ TF=9E-10 TR=0.55E-8 XTB=1.4 TRC1=.005 TRB1=.005 TRE1=.005 QUASIMOD=1
+ RCO=0.15 GAMMA=0.3E-9

.model ZXTP19020DG PNP IS=8.5E-13 NF=1 BF=530 VAF=25.8 ISE=1.2E-13
+ IKF=3.8 NE=1.48 BR=130 VAR=5.15 ISC=0.8E-13 NC=1.23 RC=0.0045 RB=0.15
+ RE=0.009 QUASIMOD=1 RCO=0.27 GAMMA=2E-10 CJC=112E-12 MJC=0.4 VJC=0.6
+ CJE=345E-12 MJE=0.53 VJE=0.95 TF=0.59E-9 TR=4.2E-9 TRC1=.003 TRB1=.003
+ TRE1=.003 XTB=1.4

.model 2N2222 NPN(IS=1E-14 VAF=100
+   BF=200 IKF=0.3 XTB=1.5 BR=3
+   CJC=8E-12 CJE=25E-12 TR=100E-9 TF=400E-12
+   ITF=1 VTF=2 XTF=3 RB=10 RC=.3 RE=.2 Vceo=30 Icrating=800m  mfg=NXP)

.model 2N2907 PNP(IS=1E-14 VAF=120
+   BF=250 IKF=0.3 XTB=1.5 BR=3
+   CJC=8E-12 CJE=30E-12 TR=100E-9 TF=400E-12
+   ITF=1 VTF=2 XTF=3 RB=10 RC=.3 RE=.2 Vceo=40 Icrating=600m mfg=NXP)

etc.

What am I missing or doing wrong?

\$\endgroup\$
  • 1
    \$\begingroup\$ Add a parenthesis after PNP or NPN .model ZXTN19020DG NPN (IS=9E-13 NF=1 BF=530 IKF=6 VAF=105 ISE=8E-14 + NE=1.4 NR=1 BR=174 IKR=1 VAR=12.8 ISC=4E-13 NC=1.37 RB=0.17 RE=0.0055 + RC=0.0035 CJC=89E-12 MJC=0.34 VJC=0.51 CJE=365E-12 MJE=0.39 VJE=0.8 + TF=9E-10 TR=0.55E-8 XTB=1.4 TRC1=.005 TRB1=.005 TRE1=.005 QUASIMOD=1 + RCO=0.15 GAMMA=0.3E-9) This work for me. \$\endgroup\$ – G36 Aug 11 '18 at 16:56
  • \$\begingroup\$ Didn't work. I first added it without space between the NPN/PNP and the parenthesis as in the other entries in the file, then added a space as in your comment. Neither one works. I also noticed that the list has columns for manufacturer, Vceo, and Ic --- so, I added made-up values of Vceo and Icrating as well as a mfg parameter at the end; still doesn't not work. \$\endgroup\$ – Cal-linux Aug 11 '18 at 17:33
  • \$\begingroup\$ An "extra-fishy" detail: I edit the standard.bjt file and remove the entries 2N2222, 2N2907, 2N3904, and 2N3906. Save the file, close LTSpice, re-launch LTSpice, add a PNP transistor, right-click on it, and the "Pick New Transistor" dialog does show 2N2907 and 2N3906. Any ideas on what's going on? \$\endgroup\$ – Cal-linux Aug 11 '18 at 17:38
  • 1
    \$\begingroup\$ electronics.stackexchange.com/questions/351035/… \$\endgroup\$ – G36 Aug 11 '18 at 17:46
  • \$\begingroup\$ @G36 -- BINGO! The file was the one under "My Documents" :-\ Turns out that on Wine, the "My Documents" folder is a symbolic link to the Unix user's home directory, but the search function in the file browser does not follow symlinks; that's why I searched for standard.bjt under the C: drive and it only showed one, the one under c:\Program Files ... Oh well, mystery solved, it is working now! \$\endgroup\$ – Cal-linux Aug 11 '18 at 17:59
0
\$\begingroup\$

I don't think you can add a + to indicate a line extension, its 1 line per model. It should look like the others. Here is an example:

.model RFNL5BM6S D(Is=778.9p N=1.419 Rs=25.53m Ikf=81.74m Eg=1.05 Cjo=93p M=513.2m Vj=714.8m Isr=358.2p Nr=3 Bv=600 tt=88.29n Tikf=18m Trs1=700u Iave=5 Vpk=600 mfg=Rohm type=FastRecovery)

Second thing, check your directory. The new LT spice places a folder in

 User\Documents\LTspiceXVII\lib\cmp\standard.dio

this is the one that needs to be edited.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.