Uploaded by mnasr302

CDLecture5

advertisement
Circuits design using Computer
Lecture 5
SPICE Programming 4
Dr. Emad Badry
Lecturer at faculty of Engineering, Suez Canal University
emad.badry@eng.suez.edu.eg
Output Requests
Spice provides display features that enables us to specify which network variables we want to see and the
best format for them.
PRINT statement
❑ The .PRINT command prints out variables in tabular form as a function of the independent variable
associated with the analysis. With it, we must also specify the analysis (i.e., DC, AC, or TRAN) for which
the specified outputs are desired.
❑ Next, we specify a list of voltage or current variables (denoted as output_variables). Generally, a voltage
variable is specified as the voltage difference between two nodes, say node_1 and node_2, as V(node_1,
node_2). When one of the nodes is omitted, it is assumed to be the ground node (0).
❑ Spice allows only those currents flowing through independent voltage sources to be observed. Such a
current would be specified by I(Vname).
General form:
.PRINT PRTYPE OV1, OV2; ... OV8>
Examples:
.PRINT TRAN V(4) I(VIN)
.PRINT DC V(2) I(VSRC) V(23, 17)
.PRINT AC VM(4, 2) VR(7) VP(8, 3)
PLOT statement
❑ Spice's graphical feature generates a simple line plot from the list of output variables as a function the
independent variable. The syntax for the plot command is identical to that of the print command and .PRINT is
replaced by .PLOT.
General form:
Examples:
.PLOT DC V(4) V(5) V(1)
.PLOT TRAN V(17, 5) (2, 5) I(VIN) V(17) (1, 9)
.PLOT AC VM(5) VM(31, 24) VDB(5) VP(5)
.PLOT TRAN V(5, 3) V(4) (0, 5) V(7) (0, 10)
Download