How do I add new libraries to Micro-Cap?
Parts may be modeled in libraries through the use of Micro-Cap binary models, .model statements, or .subckt statements. The method for adding libraries that contain these models is as follows.
Binary models and .model statements
Copy the library file into the LIBRARY subdirectory. In Micro-Cap, open up the file called NOM.LIB that resides in the LIBRARY subdirectory. This file contains a list of all libraries that Micro-Cap accesses automatically. On a new line in this file, add in a .LIB statement that references the library file that is to be added. Use the same format as the other lines. Save and close this file.
These models can now be accessed when a Primitive component is used. Placing a Primitive component in the schematic will invoke the Attribute dialog box for that component. In this dialog box will appear a list of all available models for that type.
Libraries that contain these parts are frequently used by vendors. In the Component Editor, there is an Import Wizard that extracts all subcircuits from a specified file. Run this wizard and it will take you through all of the necessary steps to add the subcircuits to Micro-Cap.
To add the library manually, copy the library file into the LIBRARY subdirectory. In Micro-Cap, open up the file called NOM.LIB that resides in the LIBRARY subdirectory. This file contains a list of all libraries that Micro-Cap accesses automatically. On a new line in this file, add in a .LIB statement that references the library file that is to be added. Use the same format as the other lines. Save and close this file.
All subcircuits that have their own configuration need to be added into the Component Editor. A sample vendor supplied header for the OP27 opamp is shown below. All lines that begin with * are comments.
* Node assignments
* non-inverting input = 1
* inverting input = 2
* positive supply = 99
* negative supply = 50
* output = 39
.SUBCKT OP27_AD 1 2 99 50 39
Enter the Component Editor through the Windows menu. Choose the group you would like to place the subcircuit into through the component tree on the right side of the editor. When you get the group that you want, highlight the group name and click on the Add Component button. To define the OP27, the settings in the Component Editor would need to be as follows:
The name should match the name that appears on the .SUBCKT line although it doesn't have to. The Opamp5 is a preexisting shape. A user may create a new shape in the Shape Editor. The definition defines the part as a subcircuit. In the Shape/pin display window (the window on the left of the Component Editor), the subcircuit pins need to be added to the shape. In this case, five pins will need to be added. Click in the window, set the pin to Analog and give it the name '1'. Place this pin at the non-inverting input of the opamp shape. You can drag on the dot to move the pin. Click again in the window, and call this pin '2'. Place this pin at the inverting input. Proceed to add pins 99, 50, and 39 to the shape. Close the Component Editor and save all changes. This part will appear in the Component menu in the group it was added to in the Component Editor.