-1
\$\begingroup\$

I want to model the behaviour of a circuit in response to 'pushbutton' actions by a user. That is,

  1. Initial state;
  2. Simulate momentary button press & new state following;
  3. Likewise with a different button.

I haven't used NGSPICE for a looong time, and this sort of thing wasn't something I studied even back then. I haven't found any way to to this, or even to search properly for it, so any suggestions/help/links will be very much appreciated.

Thanks!

\$\endgroup\$
2
\$\begingroup\$

You can model initial state of a circuit by specifying node voltages at startup (using the .ic statement).

To model the switch you have a couple of options: 1. Switch Model (SW/CSW) (Ngspice manual 3.2.15) 2. Analog Switch (Ngspice manual 12.2.10) 3. Use a resistance with a parametric value: Rswitch node1 node2 R=v(controlnode) Vcontrol controlnode 0 {expression}

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.