Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 References: G. W. Roberts, A. Sedra, SPICE, © Oxford University Press, 2/e, 1977 Tutorial on PSPICE.

Similar presentations


Presentation on theme: "1 References: G. W. Roberts, A. Sedra, SPICE, © Oxford University Press, 2/e, 1977 Tutorial on PSPICE."— Presentation transcript:

1 1 References: G. W. Roberts, A. Sedra, SPICE, © Oxford University Press, 2/e, 1977 Tutorial on PSPICE

2 Introduction SPICE = Simulation Program with Integrated Circuits Emphasis SPICE underlying engine solves numerically the various continuous time differential equations describing the circuit How to use SPICE ? We have to write an input file, also called “deck”. DeckOutput SPICE Engine ASCII Program

3 The SPICE deck The input file must contain: 1. Title statement : always on the first line of the input file 2..END statement : always on the last line of the input file 3. Circuit statements :lines that contains the description of a circuit element 4. Control statements : lines that contains an analysis request or measurements nodes or model parameters 5. Comment statements :lines starting with an asterisk (*)  The order of the SPICE lines is not important except for the title line and the.END line  SPICE is case insensitive and words can be separated by any number of spaces  Components must be uniquely labeled  Every node of the circuit is designated by a number. The ground node is labeled 0.

4 Example of an input file Low Pass Filter ** Circuit Description Vin 1 0 PWL(0s, 0V, 1ms, 0V, + 1.0001ms, 1V) R1 1 2 1kohm C1 2 0 1uF * Analysis Request.OP.TRAN 0.1ms 5ms.end Title Positive Terminal (n+) Negative Terminal (n-).END command The + sign means that the previous statement is continued on this line.

5 Dimensions and scale-factors

6 Common circuit elements First letterElement Ccapacitor Ddiode Rresistor Linductor Qbipolar transistor MMOS Field Effect transistor Iindependent current source Vindependent voltage source Evoltage-controlled voltage source Fcurrent-controlled current source Gvoltage-controlled current source Hcurrent-controlled voltage source

7 Independent Sources

8 Analysis and output requests Besides the circuit description we need to: Specify the type of analysis for our simulation Choose the circuit variables that we want to display

9 Analysis Requests Operating point.OP DC sweep.DC source_name start_value stop_value step_value AC frequency response.AC DEC points_per_decade freq_start freq_stop.AC OCT points_per_octave freq_start freq_stop.AC LIN total_points freq_start freq_stop Transient response.TRAN printing_time_step time_stop [time_start, max_time_step]

10 Output Requests

11 Sub circuits The definition in SPICE for a subcircuit is as follow:.SUBCKT subcircuit_name list_of_nodes Circuit Description.ENDS To incorporate the sub circuit into the main design use the following statement, which starts with the letter “X”: Xname node_connections subcircuit_name

12 Example using a sub circuit


Download ppt "1 References: G. W. Roberts, A. Sedra, SPICE, © Oxford University Press, 2/e, 1977 Tutorial on PSPICE."

Similar presentations


Ads by Google