From andy simpers adc talk.
Code: Select all
tick(input):
v1 = input;
v2 = 0;
v3 = 0;
nr loop:
vd1 = (0 - v3);
ed1 = exp(vd1/vt1);
id1 = is1*ed1 - is1;
gd1 = is1*ed1/vt1;
id1eq = id1 - gd1*vd1;
vd2 = (v3 - 0);
ed2 = exp(vd2/vt2);
id2 = is2*ed2 - is2;
gd2 = is2*ed2/vt2;
id2eq = id2 - gd2*vd2;
v2 = solve for v2 using equations; //able to get this
v3 = solve for v3 using equations; // able to get this
ic1eq += minv*(gc1*(v3 - v2) - ic1eq);
ic2eq += minv*(gc2*(v3 - 0) - ic2eq);