* 555 astable network: R1=10k, R2=10k, C=100n, VCC=5V * Comparators at VCC/3 and 2*VCC/3 plus an analogue SR latch. VCC 8 0 DC 5 R1 8 7 10k R2 7 2 10k C1 2 0 100n * Discharge transistor as a conductance on node 7, on when Q is low Bdis 7 0 I={V(9)<2.5 ? V(7)/5 : 0} Bset 10 0 V={V(2) < 5/3 ? 5 : 0} Brst 12 0 V={V(2) > 10/3 ? 5 : 0} Cq 9 0 1n Rq 9 0 10meg * Soft pull of the latch, reset wins Bq 9 0 I={ V(12)>2.5 ? (0-V(9))/100 : (V(10)>2.5 ? (5-V(9))/100 : 0) } .ic v(2)=0 v(9)=5 Bout 3 0 V={V(9)>2.5 ? 4.85 : 0.05} .option reltol=1e-3 abstol=1e-9 .tran 1u 12m uic .control set wr_singlescale run wrdata /tmp/timer_astable.csv v(3) v(2) .endc .end