Quoting "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>: > I am trying to simulate a circuit that uses a potentiometer, but can't > figure out how to do that. Anybody can tell what a commandfile would > look like to do so? I read somewhere that it should be possible to > sweep > resistor values, but didn't find any further explanation or an example. > > Tobias
Hi Tobias -- It's hard to answer this question without a clearer idea of where you are stuck. Also, what simulator do you want to use? To answer your question, I'll assume you want to use gschem to draw your circuit, and then use tclspice/ngspice to simulate. Right? Plain Berkeley SPICE (which is what tclspice is) doesn't support pots. (i.e. there is no built-in pot component recognized by the program.) Therefore, if you want to simulate a circuit with a pot in it using plain SPICE, you should just use two series resistors & vary the ratio between the two resistor values. Yes, it's a PITA, but life is full of sorrows. . . . . If the TCL facilities in tclspice worked better, you could write a TCL prog to do this automaticaly. However, the TCL stuff rarely seems to work for me. :-( Commercial simulators like PSpice *do* incorporate pot symbols and models. We have previously discussed incorporating this kind of facility into gschem & gnetlist/spice-sdb. However, without the ability to simulate using an open-source simulator, it's hard to know what SPICE code syntax should be spit out from the netlister. And yes, I suppose somebody could hack tclspice to support pots, but it seems like a lot of work to me. . . . Does anybody know what (if anything) gnucap does with pots? Does it have a native pot component? Stuart
