Spectrum Software
spacer
Industrial Strength Simulation
select:

divider

 

News:

Spectrum Software has released Micro-Cap 11, the eleventh generation of our SPICE circuit simulator.

For users of previous Micro-Cap versions, check out the new features available in the latest version. For those of you who are new to Micro-Cap, take our features tour to see what Micro-Cap has to offer.

 

divider

 

Accessing New Libraries

 

One of the most asked questions since the release of Micro-Cap V is how to access component models that have been created in the Model program. The following guide will also be helpful in adding new models and subcircuits from vendors, other simulators, or that the user has created.

Model program image

The figure above shows an NPN model, MyNPN, that has been created in the Model program and is contained in the file Mylib.mdl. While this file contains only one model, multiple parts and types may be stored in a single model file. This lets the user add to a library without having to manipulate multiple .mdl and .lbr files. Note that in the T3 text field, the text begins with NPN. This lets MC5 know that it is an NPN model and will list it in the model list when an NPN is placed in the schematic. For components with polarity, such as the BJT, JFET, and MosFET, this text field must begin with the corresponding N or P.

Mylib.mdl must be converted into a library that can be read from MC5. There are two options for doing this under the File menu: Create SPICE file and Create Model Library. Create SPICE file creates a text file that contains model statements for all of the parts that are in the .mdl file. Create Model Library creates a binary file that may only be read in the Model Editor. This binary file is only allowed the extension .lbr.

The procedure to access these models for simulation is the same for either the SPICE library or the Model library. In this case, we will create a Model library that is given the name Mylib.lbr.

In MC5, click on Open under the File menu, and open the file "Nom.lib". This is a text file that contains references to all of the libraries that come with MC5. When entering analysis, MC5 will search for models or subcircuits in this order: the schematic, the FILE attribute (for a subcircuit), any .LIB statements, and finally the default .LIB statement. The default .LIB statement references the Nom.lib file, so all libraries contained in this file will be searched for the specified model. The Nom.lib file also controls which models appear in the Model List inside the Attribute dialog box. On a new line, add a .lib statement such as:

.lib "Mylib.lbr"

A path may be placed in front of the library name, otherwise the library must be stored in the same directory as the Nom.lib file. Save and close this file.

The MyNPN model may now be accessed when entering analysis or when placing an NPN transistor into the schematic. To verify this, select the NPN device from the Analog Primitives/Active Devices section of the Component menu. Place the NPN into a schematic, and the Attribute dialog box will be invoked. However, MC5 has to generate a new library index first which will take a minute or two. Once the Attribute dialog box is up, click on the Models command button. This will display a list of all of the NPN models that are contained within the libraries named in the Nom.lib file. This list may be scrolled until the desired model is showing. Clicking on the model name will assign that model to the MODEL attribute, or the name may just be typed in directly into the MODEL attribute. The new model is now available for simulation.
 
Return to the main Newsletter page