Report on electronics.
ELEC2320 - Electrical and Electronic Circuits Importing LM324 Spice model in your LT-Spice simulation
• Download the LM324 Spice model from Blackboard. This a text file LM324.txt. Save it in the LT-Spice working directory where your simulation circuit file (.asc) is stored.
• Open your circuit file (the .asc file) in LT-Spice. On the LT-Spice toolbar click the ‘.op’ (SPICE Directive) icon. A small window will open. Add a .include SPICE directive
.include LM324.txt
in the window as shown below.
Click ok. This directive will now appear on the LT-Spice main window as shown below.
• Open the SPICE model text file LM324.txt. Make a note of the SPICE model name (imme- diately after the .SUBCKT command). In this case it is LM324.
• Click on the AND gate icon (component) in LT-Spice. In the component window select Opamps as shown below.
1
In the list of available op-amps, select opamp2 as shown below.
2
Place the op-amp symbol in an approprate location in the schematic in LT-Spice window, as shown below.
• Move the mouse pointer over the opamp2 symbol and right click. In the pop-up window enter ‘LM324’ in the ‘VALUE’ field as follows.
3
• The opamp2 will now behave like LM324. This will be indicated in the schematic as shown below.
• Now we can create a circuit schematic using the LM324 symbol.
4