Transcript Spice
Spice Enrico Santi Types of Analysis • Bias point (always performed) • .TRAN transient analysis • .AC AC analysis (on linearized system) • .FOUR Fourier analysis • .DC DC sweep analysis File Types • .CIR Input text file with circuit description Output • .OUT Spice text output (contains error messages and bias point info) • .DAT Data file (used by Probe to plot) Format of .CIR Files Title Circuit description Analysis description Output description (.PROBE) End-of-file statement (.END) Part Library • Part library contains collection of subcircuits representing OPAMPS, IC chips, etc. • Parts can be used to build circuits (node mapping) Part Library and Subcircuit Syntax .LIB eval.lib * include library eval.lib Xname [nodes] SUBNAME * call statement File eval.lib contains subcircuits: .SUBCKT SUBNAME [nodes] circuit description .ENDS SUBNAME Defining Model Parameters: the .MODEL statement • Used to define model parameters • Syntax for an NPN transistor with forward beta of 300 Q1 1 2 3 QNAME .MODEL QNAME NPN (BF = 300) 1 2 3 Examples • RC circuit (time domain and frequency domain) • Astable circuit using 555 (use of library and subcircuits) • Transistor current source (use of .MODEL statement to define component parameters) Example: Highpass Filter RC highpass filter VG 1 0 DC 10V AC 1 1 R1 2 0 159K C1 1 2 10NF IC=-5V .TRAN 6us 6MS .AC DEC 100 1HZ 10KHZ + VG - .PROBE .END C1 2 159K + - R1 0 10nF 555 Astable