Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
174 views5 pages

Pspice Tutorial Discusses Text-Based Pspice Entry

This document provides instructions for running a PSpice simulation of a simple op-amp circuit using a text-based entry method. It includes the Spice code for the circuit, as well as an included subcircuit definition for the op-amp model. The user is instructed to copy the code into a PSpice window, save it as a .cir file, include the subcircuit definition file, run the transient analysis simulation, and then plot the input and output waveforms.

Uploaded by

RobertDumitru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views5 pages

Pspice Tutorial Discusses Text-Based Pspice Entry

This document provides instructions for running a PSpice simulation of a simple op-amp circuit using a text-based entry method. It includes the Spice code for the circuit, as well as an included subcircuit definition for the op-amp model. The user is instructed to copy the code into a PSpice window, save it as a .cir file, include the subcircuit definition file, run the transient analysis simulation, and then plot the input and output waveforms.

Uploaded by

RobertDumitru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

PSpice tutorial

Discusses Text-Based PSPICE ENTRY


Note: I ran this tutorial using the PSPICE 9.1 STUDENT VERSION
downloaded from
http://www.cadencepcb.com/products/downloads/PSpicestudent/
It would be a good idea to also download the documentation .PDF file.
This tutorial was adapted from EDL Acoustic Signal Processing Grou
!el "# Psice tutorial (http://olympus.ece.hu.edu/!da"id/edl/help#.php$
From the Start Menu, run PSpice AD Student. This will bring up PSpice.
We are going to simulate the simple op amp circuit below.
There are many ways to enter a design into a Spice simulator. For this tutorial we will
describe the circuit in a text ile. !o to File->New->Text File. This will open up a
text ile where you can type your "Spice dec#". The ollowing is an example Spice
dec# with comments:
.lib "nom.lib"
* Include nominal library
V10 10 0 DC
* T!i" ma#e" a Volt DC $olta%e "ource between node
10 and %round &0'
V( ( 0 )IN *. 1m 100 0 0 0
* T!i" ma#e" a "inu"oidal $olta%e "ource between
node" ( and 0. T!e "ource !a" a DC o++"et o+ *., an
-C am.litude o+ 1 mV, and +re/uency o+ 100 01
V1 1 0 DC *.
* - DC $olta%e "ource
20 * ( *.*3
* - re"i"tor between * and ( wit! a re"i"tance o+ *.*
#4!m
21 * 5 **03
* - re"i"tor o+ **0 #4!m
61 1 * 10 0 5 78C9(9*:;N)
* T!i" call" an in"tance o+ t!e "ubcircuit
78C9(9*:;N), a C84) o.am. +rom National
)emiconductor. Node" 1, *, 10, 0, 5 corre".ond to
.ort" on t!e "ubcircuit. T!e "ubcircuit mu"t be
de+ined "omew!ere in t!e +ile.
.INC "lmc9(9*b.cir"
* Include t!e o.am. "ubcircuit de+inition
.T2-N 1u 10m 0
* 2un a tran"ient analy"i" +or 10 m"ec in 1 u"ec time
"te."
.<24:=
* )a$e" "imulation $ariable" +or .lottin%>
.=ND
* 2e/uired to end t!e dec#
$opy and paste this text to your PSPI$% window.
&To do this highlight the text by mouse selection then $'T()*$ to copy,
put cursor in PSPI$% window then $'T()*+ to paste it.,
Sa-e this ile &use File -> Save As . call it /emo0.cir,. 1e sure to gi-e it a .cir
ile extension.
/o the same thing with the op amp subcircuit deinition ile that ollows at the
end o all this below. Put it in the same directory as your Demo1.cir, and call it
lmc9(9*b.cir. The reason it must be called this is because it is reerenced by
this name in the 2include statement3 o the main program, which is
.INC "lmc9(9*b.cir".
For some reason, the simulator will only wor# i you exit Pspice &close all
PSPI$% windows,, start it again, and then load your .cir ile using File *4 5pen
&will not wor# rom 2recent ile list3,. /o this now.
6ou are now ready to run a simulation. !o to )imulation->2un.
When the simulation is complete, you can plot the results. To explore the
ampliying beha-ior o the op amp, we will plot the input and output wa-eorms
on the same plot. !o to Trace->-dd Trace.... then Type V&(' V&5' into the
Trace %xpression box at the bottom o the 7dd Traces Window ** then clic# 58.
Spice has many other capabilities. In addition to transient analysis, Spice can
perorm a small*signal, 7$ analysis o a circuit in order to determine the
re9uency response. &What is the maximum re9uency at which this circuit will
operate properly:,
The 2include ile3 or the op*amp is sometimes reerred to as a 2macromodel3.
6ou can get macromodels or other op*amps and components rom
manuacturer;s websites &e.g. Motorola, 'ational Semiconductor,.
*;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*78C9(9*: C84) Dual 4<--8< 8-C24-84D=7
*;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*
* connection"? non-in$ertin% in.ut
* @ in$ertin% in.ut
* @ @ .o"iti$e .ower "u..ly
* @ @ @ ne%ati$e .ower "u..ly
* @ @ @ @ out.ut
* @ @ @ @ @
* @ @ @ @ @
.)A:C3T 78C9(9*:;N) 1 * BB 0 *C
* C-ATI4N? )=T .4<TI4N) D8INE1=-19 T4 C422=CT7F 84D=7 IN<AT :I-)
CA22=NT.
*
*Feature"?
*4.erate" +rom "in%le or dual "u..lie"
*2ail-to-rail in.ut and out.ut "win%
*Altra low in.ut current E 10+-
*)lew rate E 0.0*V;u)
*
*N4T=? 8odel i" +or "in%le de$ice only and "imulated
* "u..ly current i" 1;* o+ total de$ice current.
* Noi"e i" not modeled.
* -"ymmetrical %ain i" not modeled.
*
*****************IN<AT )T-D=**************
*
I1 BB ( 9.BA
81 * ( BB 84)F=T
25 0 5.GB3
8* 9 G ( BB 84)F=T
2( 9 0 5.GB3
*F.*E.B 801
C( 9 *.5C9C<
D0 BC B 9 (.(19=-*
20 BC B 13
D<1 1 BB D-
D<* 0 1 DC
D<5 * BB D:
D<( 0 * DC
*For accurate Ib , "et D8INHE1=-19 on .4<TI4N) line.
*
***********C4884N 84D= =FF=CT***********
*
I* 0 BB 9.CA
*IJuie"cent current
=4) G 1 <47F&1' 19 (B 5.0=-5 1
*4++"et $olta%e..........
2C BB (B *03
2B (B 0 *03
*
***************<47= )T-D=***************
*
*F.E15.5 801
D5 BC 1 B (B 1=-5
21* BC 1 13
C BC 1 11.B9G<
*
************<47=;K=24 )T-D=*************
*
*F.E900 301, F1E 1.(801
D BC 1C 1 (B 1=-5
21( BC 1C 13
21 BC 1B G0
C9 1B 1C 11.C<
**********C4884N-84D= K=24 )T-D=*********
*
*F.cmE*0 301
D( BC 19 <47F&*' 1 (B * (B 0 *.C1*=-C *.C1*=-C
7* BC 1G G.BC8
215 1G 19 13
*
**************)=C4ND )T-D=**************
*
=0 BG BC BB (B 1
D1 BC *B 1C (B .999G=-9
2 BC *B 100.5G8=D
V* BB C 1.9
D1 *B C D6
D* 10 *B D6
V5 10 0 1.9
*
**************4AT<AT )T-D=**************
*
F9 BB 0 V-G 1
*IDynamic "u..ly current
F BB 5 V-C 1
D5 59 5 D6
V-G BB 59 0
D( 5 BB D6
=1 BB 5G BB (B 1
V-C 5G 5C 0
DN5 BC 11 (0 (B 1A
2N*1 BC 11 18=D
=N1 BG 1*5 BB 11 1
2N1G 1*5 1* 1C0
2N19 1*5 1*( 150
DN9 1* 1*G D6
DN 1*9 1*( D6
VNG *C 1*G 0.95
VN9 1*9 *C 0.95
DN5 11 1*0 D6
2N1C 1*0 1*B 503
VN( 1*B *C .*G
DN( 1*1 11 D6
2N1B 150 1*1 503
VN *C 150 .*G
=N< BG 0 BB 0 1
=NN 0 B9 0 0 1
DNG *C BB D6
DNC 0 *C D6
*
*
D9 5C (0 (B *B 19.99G=-5
219 5C (0 *.5CC93
V( 50 (0 .GG
D 50 BG D6
V (0 51 .GG
D9 B9 51 D6
*F.1EG.B9 01
C5 *B 5B *C0<
29 5B (0 13
*
***************84D=7) A)=D**************
*
.84D=7 D- D&I)E1.0G=-1*'
.84D=7 D: D&I)E1.1=-1*'
.84D=7 DC D&I)E1=-1*'
.84D=7 D6 D&I)E1=-1('
.84D=7 84)F=T <84)&VT4E0 3<E1.C(*=-5'
.=ND)
*
*L

You might also like