Connect with us

How to add .SPI file to LTSpice library?

Discussion in 'CAD' started by Michael Noone, Mar 31, 2005.

Scroll to continue with content
  1. Hi - I'd like to add a model for the International Rectifier IRFBG20
    cmd=catProductDetailFrame&productID=IRFBG20:) 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
  2. Jim Thompson

    Jim Thompson Guest

    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
  3. 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,

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

    The user group:

    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 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
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day