I have no idea if I’m going about this the wrong way, but I am having some issues trying to get a SPICE model working for the BCM857BS (see my other thread). One of the steps I’m trying to take to troubleshoot this issue is by editing the code manually. Basically by copy pasting text from the SPICE file and seeing what works, a couple of lines at a time (I think the SPICE model Nexperia uses is pspice and uses incompatible syntax).
The issue I am having is pretty simple: Any changes I make to my symbol in the ‘Code’ tab of the the simulation menu do not stick. I move from ‘Code’ to ‘Parameters’ and back and it does not save. It resets as if I haven’t typed anything. I’ve tried clicking OK in an attempt to save the changes, but that only works if the ‘Built-in SPICE model’ is set to ‘Raw SPICE element’.
It isn’t though. It’s right beside the ‘Parameters’ tab, which you can freely edit and save and also have the changes reflected in the ‘Code’ tab. You can type changes into the ‘Code’ tab, but KiCad will discard them without telling you.
Yes the GUI is a bit badly designed and bult (but you should have seen the previous one). As far as i can tell its not really supposed to work as a text editor. I think this is the case as each time they update they remove more and more things that would make sense only if its not supposed to be edited. Though it can.
Developers of kicad do not seem to have a GUI strategy. So things tend to be all over the place.
I have to disagree with that. Both schematic and PCB editors are very comfortable to work with.
But the simulation inserface always sucked, under 5.1, 6.0, 7.0 and today 8.0.
As I said in another post, it’s a stepchild. No one cares about stepchildren.
This is a modified working SPICE Model of the BCM857BS.
It is also compatible with the BCM857BS KiCad Schematic Symbol.
Copy/Paste ‘Save As’:
BCM857BS.CIR
***********************************************************
.SUBCKT BCM857BS 1 2 3 4 5 6
XA 1 2 6 BCM857BS_X
XB 4 5 3 BCM857BS_X
.ENDS
***********************************************************
*
* BCM857BS
*
* Nexperia
*
* Matched double PNP/PNP transistor
* IC = 100 mA
* VCEO = 45 V
* hFE = 200 - 450 @ 5V/2mA
*
*
*
*
* Package pinning does not match Spice model pinning.
* Package: SOT 363
*
* Package Pin 1/4: Emitter TR1/TR2
* Package Pin 2/5: Base TR1/TR2
* Package Pin 3/6: Collector TR2/TR1
*
*
* Extraction date (week/year): 14/2020
* Spicemodel includes temperature dependency
*
**********************************************************
*#
* Please note: The following model is to be used twice in
* schematic due to equality of both Transistors.
*
* Diode D1, Transistor Q2 and Resistor RQ
* are dedicated to improve modeling of quasi
* saturation area and reverse mode operation
* and do not reflect physical devices.
*
.SUBCKT BCM857BS_X 1 2 3
Q1 1 2 3 MAIN 0.9404
Q2 11 2 3 MAIN 0.05956
RQ 1 11 287.6
D1 1 2 DIODE
*
.MODEL MAIN PNP
+ IS = 1.799E-014
+ NF = 1.022
+ ISE = 1.679E-015
+ NE = 1.407
+ BF = 305.1
+ IKF = 0.1058
+ VAF = 29.33
+ NR = 1.018
+ ISC = 3.907E-015
+ NC = 1.323
+ BR = 9.633
+ IKR = 0.04361
+ VAR = 15.48
+ RB = 225
+ IRB = 3.5E-005
+ RBM = 0.58
+ RE = 0.4884
+ RC = 0.3001
+ XTB = 1.52
+ EG = 1.11
+ XTI = 11.42
+ CJE = 1.169E-011
+ VJE = 0.636
+ MJE = 0.3558
+ TF = 8.145E-010
+ XTF = 2.568
+ VTF = 5
+ ITF = 0.08275
+ PTF = 0
+ CJC = 6.022E-012
+ VJC = 0.623
+ MJC = 0.4213
+ XCJC = 1
+ TR = 1.2E-007
+ CJS = 0
+ VJS = 0.75
+ MJS = 0.333
+ FC = 0.7148
.MODEL DIODE D
+ IS = 1.012E-016
+ N = 0.9929
+ BV = 1000
+ IBV = 0.001
+ RS = 3.939E+004
+ CJO = 0
+ VJ = 1
+ M = 0.5
+ FC = 0
+ TT = 0
+ EG = 1.11
+ XTI = 3
.ENDS
***********************************************************
Some time ago I edited some spice files with transistor definitions with a text editor. I had to exit and restart KiCad after editing because KiCad did not see the changes I made to those files.