How to add .SPI file to LTSpice library?

You're mixing up "declaration" and "instantiation" of subcircuits, but I'll leave it to Mike to detail it for you in LTspice.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson
Loading thread data ...

Hi - I'd like to add a model for the International Rectifier IRFBG20

formatting link
to LTSpice. On the page linked to there is a spice file with a .SPI extension. I looked through the LTSpice help file and they said that if it is not a model (and I'm assuming it's not, as the file begins with ".SUBCKT" though there are a couple ".MODEL" in there as well) you have to follow a number of steps to add it. I couldn't even get past the first step:

"Change the "Prefix" attribute of the component instance of the symbol to be an 'X'. Don't change the symbol, just the instances of the symbol as a component on a schematic. You can access this attribute by holding down the control key and right clicking on the body of the component."

as I couldn't find the prefix attribute in the .spi file (I'm assuming that's where I look for it?)

So - can anybody help me? If you can't tell - I'm VERY new to Spice. Thanks so much!

-Michael J. Noone

Reply to
Michael Noone

"Michael Noone" schrieb im Newsbeitrag news:Xns962A9B97F4565mnooneuiucedu127001@204.127.204.17...

Hello Michael, an instance is a symbol after it has been placed on the schematic. You could also say, a symbol becomes an instance after it's placed on the schematic. Don't touch the .spi file. It is ok and there is nothing to change there. The filename or the extension of the filename has no special meaning in LTspice. You can name the model file 'michael.noone' if you like. This line have to be added(=placed) on the schematic. ..include IRFBG20.spi

The prefix has to be changed on the instance in the schematic. The other chance is using a symbol which is already prepared for this. It simply already has the prefix X instead of the original prefix MN. A lot of such symbols for subcircuits are in the Files area of the LTspice Yahoo group.

Please try on the instance(=symbol on the schematic). I have added a complete example at the end of this message. Please try it too.

Best Regards, Helmut

Ltspice/SwitcherCADIII is free of charge. It can be downloaded from

formatting link

The user group:

formatting link

The example discussed above:

---------------------------- Put the text below into a file named IRFBG20_test.asc, then open it with LTspice and press RUN. Please keep the model file IRFBG20.spi in the same folder as the schematic(.asc).

Version 4 SHEET 1 1512 988 WIRE -448 272 -448 240 WIRE -448 400 -448 352 WIRE -448 432 -448 400 WIRE -304 240 -448 240 WIRE -256 160 -256 128 WIRE -256 400 -448 400 WIRE -256 400 -256 256 WIRE -32 128 -256 128 WIRE -32 208 -32 128 WIRE -32 400 -256 400 WIRE -32 400 -32 288 FLAG -448 432 0 SYMBOL voltage -448 256 R0 SYMATTR InstName V1 SYMATTR Value 0 SYMBOL voltage -32 192 R0 SYMATTR InstName V2 SYMATTR Value 10 SYMBOL nmos -304 160 R0 SYMATTR InstName M1 SYMATTR Value IRFBG20 SYMATTR Prefix X TEXT -448 16 Left 0 !.dc V2 0 15 0.01 V1 4 6 1 TEXT -448 64 Left 0 !.include IRFBG20.spi

Reply to
Helmut Sennewald

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.