A Simple Way to Add Parts to the Component Library

Posted by admin 15/01/2016 0 Comment(s) Application Notes,

Here is a simple method to add parts to the Component Library.
 

If your part is a primitive (e.g. diode, NPN, NMOS, etc.) that is modeled with a .model statement, then there is an easy way to add the part to the library.
 

Assume that you have an NPN called 2NK1730 and its .model statement. Here is what you do:
 

1) Create a file from the File New command.
2) Copy and paste the .model statement into the file.
3) Save the file in the LIBRARY folder. Call it MYLIB.LIB.
4) Open the NOM.LIB file from your LIBRARY folder and add this line anywhere in that file.
 

.LIB "MYLIB.LIB"
 

This adds the contents of the MYLIB.LIB file, including your 2NK1730 part to the list of candidates when you place a new part.
 

This adds the contents of the MYLIB.LIB file, including your 2NK1730 part to the list of candidates when you place a new part.
 

As you create new model statements for other parts, add them to the file. They can be of any primitive type so long as they are modeled with a .model statement.
 

The 2NK1730 part name will not appear on the Component Menu. That is because when you add the part using the Component editor's Add Part command, the first step specifies where in the Component menu hierarchy you want the part name to appear. That step is missing in this simpler procedure. The name, however, will appear as an item in the part name list in the Attribute dialog box when you place an NPN part. Here are the steps again, this time in more detail.
 

1) Create a file from the File New command.



Click on the Text Library File (.LIB) item. Click on the OK button. MC11 will create a file called LIBRARY1. LIB and place it on the screen. Go to the circuit or other place where you have your model statement.

Now we're ready for the next step.

2) Select the model statement and copy it. Paste the model statement text into the library file.

The screen should now look something like this:




Here the .model statement has been pasted into the library file.
 

Now we're ready for the next step.
 

3) Save the file in the LIBRARY folder. Call it MYLIB.LIB.
 

Use the File menu / Save As command and enter
 

Windows XP: MYLIB.LIB
 

Windows 7 or later: MYLIB with the File Type selected as SPICE library (*.LIB)




Here we are saving the file as MYLIB and type SPICE library and we are saving it in the LIBRARY folder as that is where it must be.
 

Now we're ready for step 4.
 

4) Open the NOM.LIB file from your LIBRARY folder and add this line anywhere in that file.
 

.LIB "MYLIB.LIB"
 

 

Use the File menu / Open command to open the NOM.LIB file located in the LIBRARY folder.
 

Pick any line location in the file and add this line
 

.LIB "MYLIB.LIB"
 

Your screen should now look like the following.


 

After adding the .LIB "MYLIB.LIB" line, use the File menu Save command to save the modified NOM.LIB file.
 

Now the MYLIB.LIB contents, including the 2NK1730 NPN, will be added to the library and thus available for placement and use in a schematic.