I am new to simulation and am trying to get read up on it, but I am having a problem with a netlist for an LM3914 that someone created for LTspice. I did some cleanup on it, but I think there is still something in there that is not ngspice compatible, but my google-foo has run out.
Can someone look at it and let me know? The error contains a lot of things that look like this:
Error on line 0 : b.x2.b1 led3_2 0 i= 1.0000000000e-06 - 1.0000000000e+01 * i(x2.rs) * ( v(x2.dvin) > 0.0000000000e+00 ) * ( ( v(x2.dvin) < ( v(x2.dv) + 1.0000000000e-03 ) ) | ( v(12vstart) + 1.0000000000e-01 >= v(12vstart) ) )
parameter value out of range or the wrong type
And this is the netlist:
* LM3914 Bar/dot display driver
* V1.0
*
* Model by Geoff Western.
* This is a work-in-progress.
* Pin 9 (Mode) bias arrangement, Ref source resistance Rs, and Ref plateau are speculative.
* Clamp diodes D1-D10 are a kludge to prevent B1-B10 producing fatal run-time errors in the sim
* for unconnected output pins, so introduce spurious -0.6V at unconnected pins.
*
.subckt lm3914 mode Sig Rhi Vp Vn Adj L1 L10 L2 L3 L4 L5 L6 L7 L8 L9 Ref Rlo
B1 L1 Vn I=1u-10*i(rs)*(V(dvin)>0)*((V(dvin)<(V(dv)+1m))|(V(mode)+0.1>=V(Vp)))
B2 L2 Vn I=1u-10*i(rs)*(V(dvin)>V(dv))*((V(dvin)<2*V(dv)+1m)|(V(mode)+0.1>=V(Vp)))
B3 L3 Vn I=1u-10*i(rs)*(V(dvin)>2*V(dv))*((V(dvin)<3*V(dv)+1m)|(V(mode)+0.1>=V(Vp)))
B4 L4 Vn I=1u-10*i(rs)*(V(dvin)>3*V(dv))*((V(dvin)<4*V(dv)+1m)|(V(mode)+0.1>=V(Vp)))
B5 L5 Vn I=1u-10*i(rs)*(V(dvin)>4*V(dv))*((V(dvin)<5*V(dv)+1m)|(V(mode)+0.1>=V(Vp)))
B6 L6 Vn I=1u-10*i(rs)*(V(dvin)>5*V(dv))*((V(dvin)<6*V(dv)+1m)|(V(mode)+0.1>=V(Vp)))
B7 L7 Vn I=1u-10*i(rs)*(V(dvin)>6*V(dv))*((V(dvin)<7*V(dv)+1m)|(V(mode)+0.1>=V(Vp)))
B8 L8 Vn I=1u-10*i(rs)*(V(dvin)>7*V(dv))*((V(dvin)<8*V(dv)+1m)|(V(mode)+0.1>=V(Vp)))
B9 L9 Vn I=1u-10*i(rs)*(V(dvin)>8*V(dv))*((V(dvin)<9*V(dv)+1m)|(V(mode)+0.1>=V(Vp)))
B10 L10 Vn I=1u-10*i(rs)*(V(dvin)>9*V(dv))*((V(mode)+0.1>=V(Vp))|(V(mode)>=V(L9)-0.9))
Rladder Rhi Rlo 12k
Ric Vp Vn 4k
B12 dvin 0 V=v(sig)-v(rlo)
B13 dv 0 V=(v(rhi)-v(rlo))/10
D1 Vn L1 D
D2 Vn L2 D
D3 Vn L3 D
D4 Vn L4 D
D5 Vn L5 D
D6 Vn L6 D
D7 Vn L7 D
D8 Vn L8 D
D9 Vn L9 D
D10 Vn L10 D
Rm2 mode Vn 10meg
I1 Vp Adj 75µ
Rs N001 Vn 50
B11 Ref N001 V=min(v(Vp)-v(Vn)-.3,1.25+v(adj)-v(Vn))
B1a L1 Vn I=150u*(V(mode)<(V(Vp)-0.1))*(V(dvin)>(V(dv)/10))
B15 Vp Vn I=1m1-4*i(B11)
Rm1 Vp mode 350k
.ends lm3914