Maker Pro
Maker Pro

Convert electronic circuit to computer code?

J

Jasen Betts

Hi

I have a few simple circuits I built in a java circuit simulator I
found online...
http://falstad.com/circuit/

that one tends to be a little unstable, but if it works for you...
and I was wondering how you convert a circuit to computer code or
pseudo code so I can add it to a C++ program I have.

embedded java? open a pipe to an instance of spice?
 
J

jeffs87

Hi,
that one tends to be a little unstable, but if it works for you...
I have a Macintosh and I haven't found anything better. There is
MacSpice, but it does not have a way to graphically build circuits.
embedded java?  
It does have source code, so you might be able to figure it out by
stepping through the code while that circuit is running.
open a pipe to an instance of spice?
I'm new to this. Any tips on how to do that?

thanks
Jeff
 
J

Jasen Betts

Hi,

I have a Macintosh and I haven't found anything better.

mainly it would often lock up with a "singular matrix" error when I was
playing with it.
There is MacSpice, but it does not have a way to graphically build circuits.

do you need the graphics for your application?
It does have source code, so you might be able to figure it out by
stepping through the code while that circuit is running.
I'm new to this. Any tips on how to do that?

start with the documentation for spice (macspice?)
then ask in a mac programming newsgroup.

these guys did something similar in python: http://gcompris.net/
 
J

jeffs87

HI,
do you need the graphics for your application?
No, I'm trying to design a op-amp filter and then convert that to code
to use in an audio program I'm working on. I have a few FIR and IIR
filters working, but the filter I'm working on now is a little
unusual, so I'm trying to get it working in an electronic circuit
simulator first, then make a dsp version.

thanks
Jeff
 
No, I'm trying to design a op-amp filter and then convert that to code
to use in an audio program I'm working on.   I have a few FIR and IIR
filters working, but the filter I'm working on now is a little
unusual, so I'm trying to get it working in an electronic circuit
simulator first, then make a dsp version.

MacSpice is a simulator and takes instructions from a text
decscription of the circuit (a netlist). The process of translarting a
circuit diagram into a netlist is known as 'schematic capture' and the
first answer on the MacSpice FAQ lists several applications that
perform this process:

http://www.macspice.com/FAQ.html

MacSpice has a range of methods to allow it to communicate with other
applications. It can send and receive AppleEvents (e.g. AppleScript),
read and write to files, and execute shell scripts:

http://www.macspice.com/Interprocess.html

It's not clear to me exactly what your goals are, but you could try
using MacSpice to perform a pole-zero analysis of your circuit and
then use these values to parameterise the real circuit within your own
program.

Charles

(BTW, I am the developer of MacSpice. I don't normally read this
group, I'm just passing through while looking for something else,)
 
Top