* dac
* Converted from CircuitJS by eetree.cn/tools - open in LTspice (File > Open, then Run)
R1 N001 N002 160.6
R2 N001 N003 200
R3 N004 N001 400
* logic input L
V1 N003 0 0
* logic input H
V2 N004 0 5
R4 N005 N001 800
R5 N006 N001 100
* logic input L
V3 N006 0 0
* logic input H
V4 N005 0 5
* op-amp 1: A0=100000, GBW=1000000, output limited to [-15.0, 15.0]
G_OA1 0 OA1 0 N001 1
R_OA1 OA1 0 100k
C_OA1 OA1 0 159.1549431n
B_OA1 N002 0 V=min(max(V(OA1), -15), 15)
.tran 5u 768m 0 5u uic
.end
