# Introduction to SPICE

## Chapter 7 - Using The spice Circuit Simulation Program

“With Electronics Workbench, you can create circuit schematics that look just the same as those you’re already familiar with on paper—plus you can flip the power switch so the schematic behaves like a real circuit. With other electronics simulators, you may have to type in SPICE node lists as text files—an abstract representation of a circuit beyond the capabilities of all but advanced electronics engineers.” —(Electronics Workbench User’s guide—version 4, page 7)

This introduction comes from the operating manual for a circuit simulation program called Electronics Workbench. Using a graphic interface, it allows the user to draw a circuit schematic and then have the computer analyze that circuit, displaying the results in graphic form. It is a very valuable analysis tool, but it has its shortcomings. For one, it and other graphic programs like it tend to be unreliable when analyzing complex circuits, as the translation from picture to computer code is not quite the exact science we would want it to be (yet). Secondly, due to its graphics requirements, it tends to need a significant amount of computational “horsepower” to run, and a computer operating system that supports graphics. Thirdly, these graphic programs can be costly.

However, underneath the graphics skin of Electronics Workbench lies a robust (and free!) program called SPICE, which analyzes a circuit based on a text-file description of the circuit’s components and connections. What the user pays for with Electronics Workbench and other graphic circuit analysis programs is the convenient “point and click” interface, while SPICE does the actual mathematical analysis.

By itself, SPICE does not require a graphic interface and demands little in system resources. It is also very reliable. The makers of Electronic Workbench would like you to think that using SPICE in its native text mode is a task suited for rocket scientists, but I’m writing this to prove them wrong. SPICE is fairly easy to use for simple circuits, and its non-graphic interface actually lends itself toward the analysis of circuits that can be difficult to draw. I think it was the programming expert Donald Knuth who quipped, “What you see is all you get” when it comes to computer applications. Graphics may look more attractive, but abstracted interfaces (text) are actually more efficient.

This document is not intended to be an exhaustive tutorial on how to use SPICE. I’m merely trying to show the interested user how to apply it to the analysis of simple circuits, as an alternative to proprietary (\$) and buggy programs. Once you learn the basics, there are other tutorials better suited to take you further. Using SPICE—a program originally intended to develop integrated circuits—to analyze some of the really simple circuits showcased here may seem a bit like cutting butter with a chain saw, but it works!

All options and examples have been tested on SPICE version 2g6 on both MS-DOS and Linux operating systems. As far as I know, I’m not using features specific to version 2g6, so these simple functions should work on most versions of SPICE.

• Share
Published under the terms and conditions of the Design Science License