Hi all,
Since I am having trouble with TI.com supplied models for (quad) comparators I am trying to use an ideal model for a comparator, but with an interpolated (so more smooth) changeover around zero input.
The comparator output is resistance very low (open collector) for in+ < in- and very high for in+ > in- . I like to use 1 Ohm and 1 MOhm for the low and high values.
I cannot find a description of the right syntax and ngspice does not accept the following:
You are using the TABLE function with 2 points only. Within -1m, 1m the reaction is obvious.
Outside of this range it is not! What will happen if ngspice just defines a straight line between the two points and extrapolates it outside of this range?
To ensure that that will not happen, you have to give another two points, to direct the extrapolation towards a constant output, like
Thanks a lot, Holger; however ngspice still objects as follows:
Note: Compatibility modes selected: ps lt a
Circuit: KiCad schematic
Warning: Value of resistor rf4 is too small, set to 1.000000e-12
Error: no such function 'table' at line 12
from file
"C:/Users/jjmcu/OneDrive/Activator_Kicad/Project4/Spice models/LM339/LM339 with resistor table.lib
Error: ngspice.dll cannot recover and awaits to be reset or detached
Warning: can't find the initialization file spinit.
N.B. in some other example it was said that table would use (the same) constant values outside the range, but better to make sure indeed.
Thanks Holger, this is accepted by ngspice.
Just for your info: Table does seem to be supported, see 5.2.3 in the ngspice manual, but maybe not as I used it.
Further: in 9.0.0 after selecting a model file, the model selection is not reflected in the selection slot, though the selection works. And the analysis tab does not seem to be (always) remembered as before.
Thanks again,
Jan