[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: spice help



I have a Linux/gEDA/SPICE HOWTO at:

http://www.brorson.com/gEDA/SPICE/

This might help a little bit, but if you have already generated your
netlist you may be beyond needing it.

> 
> I would like to request someones interactive help using spice (tclspice)
> on a simple rf circuit.  I'm new to gschem and tclspice.  I created the
> circuit and chose a vac source.  I generated a netlist and have even
> opened it up in tclspice.  Although, I cannot seem how to place a trace
> probe to view what is taking place.  

To get an AC sweep, you place this in your SPICE netlist, either by
editing the netlist, or by sticking a SPICE directive box into your
schematic and then netlisting:

.ac dec 20 10Hz 100MegHz

Assuming your netlist is named output.net, you invoke tclspice by
saying:

ngspice output.net

Then once you are at a command prompt, say:

run

This runs the ac analysis.  Then to look at the voltage on a net, just
say:

plot V(netname)

To get the magnitude, say:

plot vm(netname)

To get the phase say:

plot vp(netname)

Some things to make sure of:

*  It helps to name the net you want to look at in your schematic.  I
often have a net called Vout, which is the output voltage I want to
look at.  Then, to see the output in ngspice I just say:

plot Vout

Otherwise, the SPICE netlister just numbers the nets consecutively,
and you get the voltage of a net by saying V(2), for example.

*  To run an AC analysis, make sure that you have an AC source
somewhere in your circuit.  WHen you run the AC analysis, ngspice will
find it and use it as the source.

For further info, look at the SPICE3f5 doc available on my web page.

Stuart



> This is for a school lab report due
> on Monday so a quick reply and interaction is at a great importance.  Of
> course, I would like to have this done much sooner then Monday.  Without
> some help I will be forced to finish this report using Orcad. :(
> 
> I read the documentation on gschem but didn't find much (I don't think
> even any) on spice.
> 
> This circuit is extremely simple, so please don't worry about any big
> headaces if you do offer to help.  I do have a good understanding on how
> to use Orcad but I think that mindset is hurting me not helping.
> 
> I need to perform an ac sweep, look at gain, and phase (if possible).
>    
> -- 
> Eric N. <enist@cox.net>
> 
>