# Spice simulation software installation

I wanted to learn to use SPICE through text files, (no GUI except for notepad/notepad++) but I am not capable of setting this up myself. I found some spice2/spice3 downloads from Berkeley's but that's about as far as I get. I know that I need to run "spice < myCircuit.cir" in cmd, but it is an unrecognized function. I have tried all day with Visual Studio and some strange things I gathered from searching the internet, but no success.

Oh, and I am using Windows 10.

To make things more clear, I was following this walkthrough https://www.allaboutcircuits.com/textbook/reference/chpt-7/fundamentals-spice-programming/ but failed miserably. In the link, beneath the example CMD line "spice < example.cir" it mentions "(providing that the SPICE software has been installed on the computer!)." The walkthrough doesn't mention how to install, so this is where I depart onto various internet threads and I haven't found a working installation procedure.

• I edited my post to include a link as to illuminate what I want to do. – Sheepwall Aug 9 '17 at 21:04
• I edited my post to (I hope) answer your question. – Sheepwall Aug 9 '17 at 21:17
• This might be a better fit on Super User; it's not so much an electronics question - more of a 'how do I get program X running' which is sort of off-topic. – Adam Lawrence Aug 9 '17 at 21:17
• Aside: many people here use LTspice as a freeware SPICE simulator - it's a Windows-native program and works well. – Adam Lawrence Aug 9 '17 at 21:21
• @KingDuken No, he's asking how to make Berkely SPICE work on his PC, because he cannot even launch it. That's why I think the post should move to SuperUser. Once he makes it work, asking about it would be more on-topic. – Adam Lawrence Aug 10 '17 at 0:00

You can download LTspice which has a GUI but run it from the command line:

scad3.exe -b example.cir


-b: Run in batch mode. E.g. "scad3.exe -b deck.cir" will leave the data in file deck.raw

• In addition to that, you can open *.cir (or *.net) files just fine and it will look like a syntax coloured circuit/netlist. – a concerned citizen Aug 10 '17 at 5:37

spice being an unrecognized function most probably means either the command has a different name, or you (and the installer) forgot to add it to the PATH.

First, go to the folder where you installed SPICE, and check what executable files are there. The name of the command you type in the command prompt must exactly match the executable file name (the .exe part is optional).

If you have found spice.exe, but the command you mention still fails, you have two options:

(1) Run the command mentioning the path to the executable file:

c:\programs\spice3\spice < myCircuit.cir


(2) Add the folder where the executable file lives to the PATH:

setx Path "%Path%;c:\programs\spice3"