Difference between revisions of "LTspice Library API"

From LTwiki-Wiki for LTspice
Line 1: Line 1:
 
You can use an external schematic editor to generate your LTspice netlist.  LTspice can read the netlist and do your simulation.  This saves you time drawing the schematic in both applications.
 
You can use an external schematic editor to generate your LTspice netlist.  LTspice can read the netlist and do your simulation.  This saves you time drawing the schematic in both applications.
  
To be compatible with most SPICE libraries, you must satisfy the following requirements:
+
To be compatible with most SPICE libraries, your SPICE syntax must satisfy the following requirements:
1.) Your part name must be one of the part names in the library.
+
# Your part name must be one of the part names in the library.
2.) "IC" typically map to a sub-circuit.  Therefore, you must use the standard PSPICE "X" prefix for your reference designators.
+
# An "IC" typically maps to a sub-circuit.  Therefore, you must use the standard SPICE "X" prefix for your reference designators.
3.) You need to have your SPICE netlister export the correct number of nodes that the corresponding libraries sub-circuit expects.
+
# You need to have your SPICE netlister export the correct number of nodes that the corresponding libraries sub-circuit expects.
4.) Your node parameters must be in the correct calling sequence.  Node names do not have to be the same.
+
# Your node parameters must be in the correct calling sequence.  Node names do not have to be the same.
5.) Typically you must include the corresponding library in your netlist.
+
# Typically you must include the corresponding library in your netlist.
  
 
Sub-circuit example:
 
Sub-circuit example:
----
+
XU1  0 /My/V5in /Vc LT1086-5 ; Node Sequence Specification <GND,VO,VI>
XU1  0 /My/V5in /Vc LT1086-5 ;Node Sequence Spec.<GND,VO,VI>
 
----
 
  
 
The link below gives you a quick summary of the LTspice installation and the library parts.  You can use this to help satisfy the above requirements.  
 
The link below gives you a quick summary of the LTspice installation and the library parts.  You can use this to help satisfy the above requirements.  
  
[[LTSPICE Part Summary]]
+
[[LTspice Part Summary]]:
 
http://ltwiki.org/images/4/4e/LTSpicePartListAPI.pdf
 
http://ltwiki.org/images/4/4e/LTSpicePartListAPI.pdf

Revision as of 04:09, 31 May 2011

You can use an external schematic editor to generate your LTspice netlist. LTspice can read the netlist and do your simulation. This saves you time drawing the schematic in both applications.

To be compatible with most SPICE libraries, your SPICE syntax must satisfy the following requirements:

  1. Your part name must be one of the part names in the library.
  2. An "IC" typically maps to a sub-circuit. Therefore, you must use the standard SPICE "X" prefix for your reference designators.
  3. You need to have your SPICE netlister export the correct number of nodes that the corresponding libraries sub-circuit expects.
  4. Your node parameters must be in the correct calling sequence. Node names do not have to be the same.
  5. Typically you must include the corresponding library in your netlist.

Sub-circuit example:

XU1  0 /My/V5in /Vc LT1086-5 ; Node Sequence Specification <GND,VO,VI>

The link below gives you a quick summary of the LTspice installation and the library parts. You can use this to help satisfy the above requirements.

LTspice Part Summary: http://ltwiki.org/images/4/4e/LTSpicePartListAPI.pdf