On Mon, Nov 25, 2024 at 11:36 AM, <larry.gunseor@...> wrote:
Is it possible to create your own user file that contains .model components statements (i.e. user.mos) where you can place a mosfet from a symbol you created "nmos_user.asy" and then from that symbol you can right click on it and select a mosfet from the "users.mos" file.
LTspice lets you create a special kind of symbol that can select from a sub-menu of parts. But they use .SUBCKT models instead of .MODEL models. That should not be an obstacle, because it is easy to create .SUBCKTs from .MODELS (but not the other way around).
Read the LTspice Help page for Schematic Capture > Editing Components > Super Expert Mode (a.k.a. General Attribute Editor). Scroll down until you find the words, "The third exception", and read from there to the end. Your symbol should have at least these:
- Prefix = X,
- A ModelFile attribute to your library model file,
- A SpiceModel attribute, set to the name of one of the model file's subcircuits.
Then each of the models in the library file must be a subcircuit. Each one might look like this (for an N-channel MOSFET with a Substrate pin):
.SUBCKT abcd1234 D G S B
MN D G S B 1234abcd
.MODEL 1234abcd NMOS (...)
.ENDS abcd1234
Each .SUBCKT would have one .MODEL line.
I recommend copying LTspice's NMOS.asy or NMOS4.asy symbol (and their PMOS counterparts), and editing your copies for your use. Start with the NMOS4 symbol if your MOSFETs have a Substrate pin. If they don't, then copy the NMOS symbol instead, and remove the "B" node from two places in the .SUBCKT definition (above).
There might be other ways too.
Andy