[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jfet example

From: Felix Salfelder
Subject: Re: jfet example
Date: Sat, 15 Feb 2020 22:45:25 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Sat, Feb 15, 2020 at 07:52:06PM +0100, Matthias Brennwald wrote:
> I have already started playing around with your example, so here's a first
> question regarding the input voltage. You first set up the input voltage as
> "vin nin 0 sin f=1k amplitude=20 ac 1".

Lets start with a disclaimer. I used spice as a language in the jfet
example. The use of spice in many free software tools and educational
works is not necessarily indicative of a proper way of doing these
things today. Note that punch cards were used to store spice netlists,
and saving letters was relevant. In Gnucap, you can represent close to
everything with verilog instead, but there is some friction and it would
add to the learning curve...

> - As far as I can tell, this gives 1 kHz sine with an amplitudie of +/- 20
> V. What ist the "ac 1" part good for?

Short answer: It sets the amplitude during AC simulation.
More details here [1]. The way Gnucap implements spice simple component
syntax is in terms of "simple component" + "behavioural description" and
"behavioural description" may depend on the simulation mode, which is
a requirement for spice compatibility.

> - Later on, you apply different DC voltages to the input (".dc vin -24 24
> 4") --> does that delete the previous configuration of the input voltage?
> Where / how would I find this information in the Wiki manual?

Here [2]. The dc command temporarily zaps out the model for "vin". it
will be reset to what it was after the dc is finished (I have added a
remark to the wiki page -- thanks!).

> - Then you seem to apply an AC signal ranging from 1 Hz to 1 MHz to the
> input (".ac 1 1e6 * 10") --> how does Gnucap know that this AC sweep should
> be applied to the input? Where / how would I find this information in the
> Wiki manual?

No signal is applied here. The AC command mimics spice and only sweeps
the frequency. Is this more clear now with "ac 1" above?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]