DOC PREVIEW
UA ECE 304 - Using Text Files in PSpice

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE 304: Running a Net-list File in PSpiceECE 304: Running a Net-list File in PSpiceObjectiveSimple ExampleExample from Sedra and SmithSummaryECE 304: Running a Net-list File in PSPICE Objective ...................................................................................................................................... 2 Simple Example ........................................................................................................................... 2 Example from Sedra and Smith................................................................................................... 3 Summary...................................................................................................................................... 5 john brews Page 1 10/23/2002ECE 304: Running a Net-list File in PSPICE Objective Circuits can be described in text files. Although it is the old-fashioned way to do it, for simple circuits it is much faster than using SCHEMATIC CAPTURE, and it always uses a lot less memory. In many books and papers, the net list is used as a compact description of the circuit. For compactness plus precise description, a net list is hard to beat. To use such net lists, here is one way to do it. Simple Example For example, a very simple circuit is listed below1 * Text File Vin 0 1 0V R1 1 0 1ohm •DC Vin 0 12 .1 •PROBE FIGURE 1 Simple text listing of a simulation using PROBE; the file must be saved with a •cir extension; the lines beginning with • are simulation instructions, not part of the net list, which describes only the circuit parts and interconnections The meaning of the lines is 1. * Text File → we need a first line for the file, it can be a title or comment line but should not be part of the circuit net list. 2. Vin 0 1 0 → Vin means a voltage source, 0, 1 are the nodes it is connected between, and the last 0V is the voltage value. All nodes must be numbered, with 0 = ground node. 3. R1 1 0 1ohm → R1 means a resistor, 1, 0 are the nodes it is connected between, and 1ohm is its value. 4. •DC Vin 0 12 .1 → • DC means a DC sweep, Vin means Vin is the sweep variable, 0→12 is the range of the sweep and 0.1 is the sweep increment. 5. •PROBE calls PROBE to plot the simulation. A blank plot comes up and the TRACE/ADD menu can be used to select a variable for display To run the file, right click the mouse on the •cir file icon to obtain the OPEN WITH/PSPICE SIMULATOR menu, as shown in Figure 2. FIGURE 2 Using the OPEN WITH/PSPICE SIMULATOR menu; note the •cir file extension 1 The syntax of PSPICE command lines and net listing can be found in many books, for example, A. Vladimirescu, The Spice Book, Wiley, 1994 and Roberts and Sedra, Spice, 2nd Edition, Oxford, 1997. There is also a discussion in the on-line PSPICE reference manual, PspcRef.pdf. john brews Page 2 10/23/2002The file TEXT•CIR is imported into the PSPICE simulator, as shown in Figure 3. FIGURE 3 The •cir file is imported into PSPICE A/D Lite FIGURE 4 Running the file using SIMULATION/RUN Vin0V4V8V12VI(R1)-20A-10A0A(4.000,-4.000) FIGURE 5 PROBE output following running the file and using TRACE/ADD to select I(R1) as the variable Example from Sedra and Smith2 The CD in the back of S&S carries the PSPICE listings for Appendix D3. One of these is Fig. D8, a cascode amplifier, as shown in Figure 6. 2 For example, see Appendix D of the text, Microelectronic Circuits, Sedra and Smith, 4rth Edition, Oxford, 1998 where all the PSPICE files used in the book are listed this way. 3 They are in the file _DEMOS/NETLISTS. john brews Page 3 10/23/2002** A Cascode Amplifier ** ** Circuit Description ** * power supplies Vcc 1 0 DC +15V * input signal source Vs 9 0 AC 1V Rs 9 8 4k * CE stage (input stage) Cc1 6 8 1uF R1 1 3 18k R2 3 6 4k net list portion of text file R3 6 0 8k Q1 4 6 7 Q2N3904 Re 7 0 3.3k Ce 7 0 10uF * CB stage (upper stage) Q2 2 3 4 Q2N3904 Rc 1 2 6k Cb 3 0 10uF Cc2 2 5 1uF * output load Rl 5 0 4k * * transistor model statement for 2N3904 .model Q2N3904 NPN (Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 Bf=416.4 Ne=1.259 + Ise=6.734f Ikf=66.78m Xtb=1.5 Br=.7371 Nc=2 Isc=0 Ikr=0 Rc=1 + Cjc=3.638p Mjc=.3085 Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75 + Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10) ** Analysis Requests ** .OP .AC DEC 10 1Hz 100MegHz ** Output Requests ** .PLOT AC VdB(5) .probe .end FIGURE 6 Sedra and Smith net list and simulation instructions for Figure D8, see p. D-5 and D-6 in Microelectronic Circuits. This listing is mislabeled on the CD as Figure D9. Frequency100Hz 1.0KHz 10KHz 100KHz 1.0MHz 10MHz 100MHz20HzDB(V1(Rl))010203040(Corner frequency,5.697M,25.16dB)(Max Gain,50.12K,28.17dB) FIGURE 7 PROBE output using SIMULATION/ RUN FIGURED8.CIR and completely avoiding CAPTURE; Unfortunately, the midband gain and high-frequency corner do not agree with the answer in S&S, p. 626. john brews Page 4 10/23/20025640927831000+R38k+Cc11u0+-VCC15V0+R118k+Cb10u+Rc6k+R24kSweep+-ACVs1V+Ce10uF+Re3.3k0+Cc21u+RL4kQ2N3904Q2+Rs4k0Q2N3904Q1 FIGURE 8 Schematic from CAPTURE corresponding to the same net list as Figure 6; nodes have been numbered to correspond to the S&S net list. This schematic is to be compared with Fig. E7.17, p. 626 in S&S. * source CASCODE R_R3 6 0 8k R_Rc 2 1 6k R_Re 0 7 3.3k C_Cc1 8 6 1u V_VCC 1 0 DC 15V C_Cc2 2 5 1u C_Ce 0 7 10uF V_Vs 09 0 AC 1V 0 R_R1 3 1 18k R_R2 6 3 4k C_Cb 0 3 10u R_Rs 09 8 4k Q_Q2 2 3 4 Q2N3904 Q_Q1 4 6 7 Q2N3904 R_RL 0 5 4k FIGURE 9 Orcad net list corresponding to Figure 8. Summary The above is one approach to using text files directly in PSPICE. It can be handy for quick simulations. It also is handy for making sense out of listings in papers and books, and to make such listings yourself, in your own documentation. john brews Page 5


View Full Document
Download Using Text Files in PSpice
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Using Text Files in PSpice and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Using Text Files in PSpice 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?