Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Are there any Electronic circuit simulator libraries/API that I can use to construct virtual circuit simulators like SPICE etc? My main research area is not Electronic simulation since I'm a Computer science undergrad so I have to give priority to Software Engineering aspects.

thanks

share|improve this question
Your main research area is "no thanks"??? – AndrejaKo Sep 16 '11 at 8:08
sorry. :) didn't notice it. My main research area is not Electronic simulation since I'm a Computer science undergrad so I have to give priority to Software Engineering aspects. – coder9 Sep 16 '11 at 11:44
I haven't seen an API for SPICE, but you might want to check out the source of ngspice and tclspice, or talk to their developers. – Oli Glaser Sep 16 '11 at 14:48

1 Answer

ummm spice does not really need an api ..... spice simulation file looks something like this

LPFILTER.CIR - SIMPLE RC LOW-PASS FILTER
*
VS  1   0   AC  1   SIN(0VOFF 1VPEAK   2KHZ)
*
R1  1   2   1K
C1  2   0   0.032UF
*
* ANALYSIS
.AC     DEC     5 10 10MEG
.TRAN   5US  500US
*
* VIEW RESULTS
.PRINT  AC  VM(2) VP(2)
.PRINT  TRAN    V(1) V(2)
*
.PROBE
.END

everything is driven by text files in the background and these files are passed to a pspice exe that normally does the rest. The spice engine itself is available with a BSD license so you can tweak it yourself.

Most commercial offerings offer schematic entry, parts libraries and output plotting options.

You can do away with this be passing in a netlist file with the simulation details to an spice engine and get back a text file of results.

So no real apil just a command line driven app. Of course you can get the source code and compile it into you own application.

check out wikipedia for more details.

share|improve this answer
thanks for the reply. You mean that for instance, I can get potential difference automatically calculated between a particular device, after giving circuit setup structure details into the spice? – coder9 Sep 17 '11 at 10:18
yes you can - but garbage in garbage out - you have to know the electronics circuits (or math representation) you are trying to calculate to write the netlist, and include the correct analysis - in this case dc bias, it should spit out the answer for you – smashtastic Sep 17 '11 at 22:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.