DIYbanter

DIYbanter (https://www.diybanter.com/)
-   Electronics (https://www.diybanter.com/electronics/)
-   -   Convert electronic circuit to computer code? (https://www.diybanter.com/electronics/274540-convert-electronic-circuit-computer-code.html)

[email protected] March 28th 09 02:51 AM

Convert electronic circuit to computer code?
 
Hi

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

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.

thanks
Jeff

Jasen Betts[_2_] March 28th 09 04:57 AM

Convert electronic circuit to computer code?
 
On 2009-03-28, wrote:
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?


jeffs87 March 28th 09 05:34 AM

Convert electronic circuit to computer code?
 
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

Jasen Betts[_2_] March 28th 09 11:37 AM

Convert electronic circuit to computer code?
 
On 2009-03-28, jeffs87 wrote:
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.


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?

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?


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

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


jeffs87 March 28th 09 08:01 PM

Convert electronic circuit to computer code?
 
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

[email protected] March 30th 09 12:44 AM

Convert electronic circuit to computer code?
 
On Mar 28, 9:01*pm, jeffs87 wrote:
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,)




All times are GMT +1. The time now is 03:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 DIYbanter