<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://ltwiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Uwezi</id>
	<title>LTwiki-Wiki for LTspice - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://ltwiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Uwezi"/>
	<link rel="alternate" type="text/html" href="http://ltwiki.org/index.php?title=Special:Contributions/Uwezi"/>
	<updated>2026-04-21T04:43:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.7</generator>
	<entry>
		<id>http://ltwiki.org/index.php?title=Adding_a_permanent_component_to_LTspice&amp;diff=531</id>
		<title>Adding a permanent component to LTspice</title>
		<link rel="alternate" type="text/html" href="http://ltwiki.org/index.php?title=Adding_a_permanent_component_to_LTspice&amp;diff=531"/>
		<updated>2010-04-06T14:25:56Z</updated>

		<summary type="html">&lt;p&gt;Uwezi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;See &amp;#039;&amp;#039;[[Components_Library]]&amp;#039;&amp;#039; for parts ready to be added to LTspice.&lt;br /&gt;
&lt;br /&gt;
== Adding LM339 as a Comparator ==&lt;br /&gt;
&lt;br /&gt;
This technique allows you to add a frequently used part to the menu of LTspice.  In this way you don&amp;#039;t have to use include statements, etc.  These parts should not be overwritten during an LTspice update.&lt;br /&gt;
&lt;br /&gt;
1) Start with an existing .asy file if possible.  Here we can use LT1017.asy:&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
Version 4&lt;br /&gt;
SymbolType CELL&lt;br /&gt;
LINE Normal -32 -32 32 0&lt;br /&gt;
LINE Normal -32 32 32 0&lt;br /&gt;
LINE Normal -32 -32 -32 32&lt;br /&gt;
LINE Normal -28 -16 -20 -16&lt;br /&gt;
LINE Normal -28 16 -20 16&lt;br /&gt;
LINE Normal -24 20 -24 12&lt;br /&gt;
LINE Normal 0 -32 0 -16&lt;br /&gt;
LINE Normal 0 32 0 16&lt;br /&gt;
LINE Normal 4 -20 12 -20&lt;br /&gt;
LINE Normal 8 -24 8 -16&lt;br /&gt;
LINE Normal 4 20 12 20&lt;br /&gt;
WINDOW 0 16 -32 Left 0&lt;br /&gt;
WINDOW 3 16 32 Left 0&lt;br /&gt;
SYMATTR Value LT1017&lt;br /&gt;
SYMATTR Prefix X&lt;br /&gt;
SYMATTR SpiceModel LTC1.lib&lt;br /&gt;
SYMATTR Value2 LT1017&lt;br /&gt;
SYMATTR Description µPower Dual Comparator(1 of 2)&lt;br /&gt;
PIN -32 16 NONE 0&lt;br /&gt;
PINATTR PinName In+&lt;br /&gt;
PINATTR SpiceOrder 1&lt;br /&gt;
PIN -32 -16 NONE 0&lt;br /&gt;
PINATTR PinName In-&lt;br /&gt;
PINATTR SpiceOrder 2&lt;br /&gt;
PIN 0 -32 NONE 0&lt;br /&gt;
PINATTR PinName V+&lt;br /&gt;
PINATTR SpiceOrder 3&lt;br /&gt;
PIN 0 32 NONE 0&lt;br /&gt;
PINATTR PinName V-&lt;br /&gt;
PINATTR SpiceOrder 4&lt;br /&gt;
PIN 32 0 NONE 0&lt;br /&gt;
PINATTR PinName OUT&lt;br /&gt;
PINATTR SpiceOrder 5&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
2) Edit the lines above as shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
WAS:&lt;br /&gt;
&lt;br /&gt;
SYMATTR Value LT1017&lt;br /&gt;
SYMATTR Prefix X&lt;br /&gt;
SYMATTR SpiceModel LTC1.lib&lt;br /&gt;
SYMATTR Value2 LT1017&lt;br /&gt;
SYMATTR Description µPower Dual Comparator(1 of 2)&lt;br /&gt;
&lt;br /&gt;
NOW:&lt;br /&gt;
&lt;br /&gt;
SYMATTR Value LM339&lt;br /&gt;
SYMATTR Prefix X&lt;br /&gt;
SYMATTR SpiceModel LM339.sub&lt;br /&gt;
SYMATTR Value2 LM339&lt;br /&gt;
SYMATTR Description Quad Single Supply 3V/5V Comparator LM339&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
3) Save this file as LM339.asy under \lib\sym\Comparators  [http://alternateenergies.com/LTwiki/files/LM339.asy LM339.asy]&lt;br /&gt;
&lt;br /&gt;
4) Put [http://alternateenergies.com/LTwiki/files/LM339.sub LM339.sub] file, put in \lib\sub&lt;br /&gt;
&lt;br /&gt;
5) When LTspice opens again, LM339 should be available as a component under &amp;#039;Comparators&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Note: Additionally look at [http://alternateenergies.com/LTwiki/files/LM339_DIP14.asy LM339_DIP14.asy]  You may add this as well, if you want all four comparators.&lt;br /&gt;
&lt;br /&gt;
An Example using LM339 [http://alternateenergies.com/LTwiki/files/LM339_test.asc LM339_test.asc]&lt;br /&gt;
[http://alternateenergies.com/LTwiki/files/LM339_LTspice.png A screenshot of the LM339 test file]&lt;/div&gt;</summary>
		<author><name>Uwezi</name></author>
		
	</entry>
</feed>