.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_ hlf Op1:opamp(right_,,,,P) with .In1 at Here line from Op1.In2 left_ 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_ qrt; " $v_0$" ljust_ "\tiny Comparator" at (dim, 0) ljust_ .PE