.PS include(libcct.m4) cct_init # Usual defs... qrt=dimen_/4; hlf=dimen_/2; dim=dimen_; ground(,T) source(up_,AC); rlabel(,v_i,) line up_ hlf then right_ dim Op1:opamp(right_,,,,P) with .In1 at Here line from Op1.In2 left_ 1.5*dim dot "$V_\mathrm{ref}$ sp_ " ljust_ resistor(up_);llabel(,R_1,) dot; {move up_ 0.1*dim; "$V_s$" ljust_} move down_ dim resistor(down_); rlabel(,R_2,); ground(,T) move to Op1.Out; line right_ hlf " $v_0$" ljust_ move to Op1.In2 then left_ qrt;dot line down_ hlf then right_ qrt resistor(right_); rlabel(,R\approx 10\times,) line right_ qrt; line to (Here,Op1.Out); dot; "\tiny Hysteresis" at (2*dim, 0) ljust_ .PE