Electronics calculations using C
Posted on 1997-12-11
I am looking for an appropriate data-structure to represent and calculate the values of electronic components that connected (wired) in a circuit.
- How do I resolve data storage for components that have many values (transistors) and for components that have a only a few (resistors, capacitors, yet don't end up with a dozen different "typedef struct"?
- How do I represent nodes -e.g. wires - connecting each components, since the components are
- not limited only to 2 nodes (transistors has 3 nodes)
- not limited to 2 wires (from a node any number of wires can origin)
If you have no idea, please answer these:
- Is it the problem that I am thinking too pictorically, and problems of this nature should be derived into equations and solved algebrically?
- Wouldn't be better to use C++ and create classes of components to pass data between components to simulate voltage/current/resistance values through the circuit?
- Am I have gone nuts?