Bucknell University
College of Engineering

EE101 Electrical Engineering Analysis
Learning to use PSPice

Developed by Margaret Wismer, with minor modifications by R. Kozick in Spring, 1998

# Introduction

In this section we introduce a circuit-analysis program known as SPICE, an acronym for Simulation Program with Integrated Circuit Emphasis. The Electronics Research Laboratory at the University of California developed the program in the early 1970s. The program is in the public domain.

Chapter 16 of the Bobrow text contains an introduction to SPICE.

A spice program consists of the following parts:

• A title identifying the program.
• Comment statements
• Component statements that describe the circuit structure.
• Model statements that give detailed device parameters.
• Analysis requests.
• Output requests.
• An end statement.

Each of these parts will be described separately. Note that not all parts are required for all circuits.

# Title

SPICE assumes that the first line of the program is a title that is ignored except, in the analysis. The title is used only to label the output. If you omit the title, and start only with a program statement it will be ignored by SPice. Usually, this will result in an aborted run.

# Comment Statements

Comment statements are identified by and asterisk * in the first column. (Spaces preceding the first character are disregarded.) Comments are ignored by SPice except that they are included in the output file. Comments are useful for making the program meaningful to other users.

## Component Statements

The first step for describing a circuit in a SPice program is to number the circuit nodes. The ground node (reference node) is number 0, and the other nodes can be labeled with any positive integers, in any desired order. Of course, the number for different nodes must be different.

The statements are written to describe the circuit. A separate statement appears for each circuit element. The first item in each statement is a name for the circuit element. The name of an element must begin with a particular letter identifying the kind of circuit element. A partial list of these is:

• R Resistor
• V Independent Voltage source.
• I Independent Current source.
• G Voltage-controlled current source.
• E Voltage-controlled voltage source.
• F Current-controlled current source.
• H Current-controlled voltage source.
The name of each circuit element must be unique. Thus RLOAD is a valid resistor name, VS is an independent voltage source and Eamp is a voltage-controlled voltage source.

Following the name of a circuit element are the numbers of the nodes to which it is connected. Then the numerical value or other information concerning the component is given.

An example circuit including node numbers and the PSPice program is shown below

## Numerical Values

Numerical values can be given as integers for which a decimal point is assumed, as floating point numbers with a decimal point, or as floating-point numbers with an eponent. Thus the following forms are equivalent:
7654 = 7654.0 = 7.654E3

Furthermore, PSPice uses the following scale factor designations:
```
T=1E12        G=1E9           MEG=1E6

K=1E3         M=1E-3          U=1E-6

N=1E-9        P=1E-12         F=1E-15
```

Sometimes, for clarity, we use additional letters following a numerical value, but these are ignored by PSPice. For example, 2.2KOHMs is recognized as the value 2200, and "OHMS" is ignored by the program.

## Running PSPice on the PCs

In order to use PSPice on the PCs your program must be in a file whose name ends with .cir. The easiest way to do this is through the notepad. Click on the bottom lefthand START button and under ACCESSORIES go to the NOTEPAD. For practice type in the PSPice program shown in the figure above. Save your program to file whose name has a .cir extension.

Now go to the START button and under PSPice find PSpiceA_D and click on it. Under file, open your filename.cir file. PSPice will automatically analyze the circuit and save the results in filename.out. You can look at this output file by going back to the notepad and opening the filename.out. In this output file you should see a listing of your program and section with the heading DC BIAS SOLUTION. Here you should see all the nodal voltages listed in your circuit and what each is equal to. From these nodal voltages you can calculate any voltage drop or current in your circuit.

Wismer Margaret
Fri Jan 17 11:49:22 EST 1997