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

 

Adding SPICE Models from Manufacturers

 

The websites of manufacturers are often great resources for additional SPICE models that can be used in Micro-Cap. For importing models into Micro-Cap, the Component Editor provides two wizards, the Import Wizard and the Add Part Wizard, or the user may also add the model manually. The Import Wizard provides the simplest route to importing models and will be the method desribed in this article. For information about the other two methods, reference the Working with Subcircuits chapter in the User's Guide. For this article, three models were downloaded from the internet and placed in a text file called Vendor.lib. Typically, a model file downloaded from the internet can be used directly with the Import Wizard. The Vendor.lib file was created to demonstrate the three possible outcomes that can occur when using the Import Wizard. The three models in the Vendor.lib file are:

AD827 (Analog Devices) - High speed, low power opamp
AD8145 (Analog Devices) - High speed, differential receiver
IRFE330 (International Rectifier) - 400V N-Channel MOSFET

The recommended location to place the downloaded file is the LIBRARY folder under the main Micro-Cap folder. The recommended extension of the file is .LIB. Neither of these are requirements though. Once the file is on the hard drive, the first step in importing the models is to access the Component Editor under the Windows menu. The Component Editor manages all of the circuit components used in the schematics.

In the Component Editor, select the group that you want to import these parts into. The component tree on the right hand side of the Component Editor sets the structure of the Component menu in the schematic editor. Double click on a group name to open or close the group. The Add Group icon can also be used to add a new group to the tree. Highlight the group name that the parts should be in. Then invoke the Import Wizard by clicking on the following icon in the Component Editor toolbar.

Import Wizard toolbar icon

The first page in the Import Wizard is the File page which is shown below. This page specifies the library file that contains the models to be imported. The Browse button lets you browse through the hard drive to locate the library. In addition, an option called "Copy the above file to the library directory" is available. When enabled, this option will copy the library file into the specified path. This option is useful in relocating the library file to the defined library path if it was downloaded into a different folder. Once the library file has been selected, click Next.

File page of the Import Wizard

The next page in the Import Wizard is the Suffix page which is shown below. This page specifies an optional suffix that can be added to all of the subcircuit names within the library file. To add a suffix, enter a string in the "Suffix to Append to SUBCKT names" field and then click the Append button. This will rewrite all of the subcircuit names in the library file to include this suffix. Note that upon clicking Append, the library file is modified and saved to the hard drive. If the wizard operation is later cancelled, the library file will still contain the modified subcircuit names. An appended suffix can be useful when trying to import a model that has the same name as one that already exists in the component library. The Import Wizard only imports models that have a name that does not exist in the component library and adding a suffix will let the wizard import the model. In most cases, no suffix is needed and this page can be ignored as it will be in this example. Click Next.

Suffix page of the Import Wizard

After the Suffix page, the wizard starts the process of importing all unique models from the library file. Micro-Cap will compare the part(s) in the library to the existing parts in the Component Editor. For subcircuits, it compares both the amount of pins defined within the model along with the names of those pins to all existing subcircuit entries. There are three possibilities that can occur with each model in the library file. If it finds a single match, it will automatically add the part using the template of that match. If it finds no matches, it will place the part in the library with a generic template along with a designation that the part needs more work. If it finds multiple matches, a list of all of the available matches is then shown, and the template that is most applicable to the specified model can then be selected by the user. In addition to the list of matching templates, a second dialog box will also be invoked that displays the netlist of the model being imported. This netlist can often be useful in deciding which of the listed templates provides the best match. In this example, multiple matches are found for the IRFE330 device. The following two dialog boxes are then displayed.

Choose a Template dialog box

Subcircuit listing dialog box

Since the IRFE330 is an N-Channel MOSFET, the template based on the 2N6782 model which uses a DNMOS shape is selected. Clicking OK imports the IRFE330 using the same shapes and pin configuration as the 2N6782 device in the component library. Clicking Cancel will skip this component in the import process.

Once all of the models in the library file have been processed, the Import Status page below will be displayed which lists the results of the Import Wizard operation.

Import Status page of the Import Wizard

The top section of the status listing describes the results for each individual model in the library file. For the AD827 model, a single match was found and the part has been imported in using a template defined by the AD645_AD component. For the AD8145 model, no match was found and the part has been imported in using a generic template. Note that this part has been flagged with a Needs Work label. For the IRFE330 model, the part has been imported in using a template defined by the 2N6782_IR component which was selected in a prior step.

The bottom section of the status listing describes the total results for the library file. In this case, three subcircuit models were found in the file, and all three were imported. Click Finish to complete the import process.

The parts will now be available in the Component Editor within the group that was selected when the Import Wizard was launched. Double check the parts to make sure the shape and the pin connections are correct. Highlight a part and then click on the Info icon in the toolbar. This will display the SPICE listing for the device which usually contains comments on the pin functions. Drag on the red dots to move the pin connections around as needed. At this point, you can edit the component just like any others in the Component Editor. For this example, the AD827 and IRFE330 need no additional work. The AD8145, which states Needs Work next to the component name in the tree to the right, needs a shape assigned and pins moved to the appropriate locations. Selecting a shape such as Opamp7d and then dragging the pin connections to the ends of the appropriate leads completes the importation of the AD8145.

 
Return to the main Newsletter page