* Z:\home\khalils\Downloads\files\data\raw_asc\1144c66be9c7_Ideal_4_bit_DAC.asc
* Generated by LTspice 26.0.1 for Windows.
Vone Vone 0 1
S15 B0L Vone B0 Vtrip switmod
S6 0 B3L Vtrip B3 switmod
S13 B1L Vone B1 Vtrip switmod
S16 0 B0L Vtrip B0 switmod
R1 Vtrip 0 100Meg
S7 B2L Vone B2 Vtrip switmod
S8 0 B2L Vtrip B2 switmod
R2 VDD Vtrip 100Meg
S14 0 B1L Vtrip B1 switmod
B1 Vout 0 V=((v(vrefp)-v(vrefm))/16)*(v(B3L)*8+v(B2L)*4+v(B1L)*2+v(B0L))+v(vrefm)
S5 B3L Vone B3 Vtrip switmod
R3 Vrefp Vrefm 100Meg
.model switmod SW
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 2732 1316
WIRE 320 -176 208 -176
WIRE 320 -144 320 -176
WIRE 320 -16 208 -16
WIRE 320 -16 320 -64
WIRE 368 176 192 176
WIRE 368 224 192 224
WIRE 368 272 192 272
WIRE 368 320 192 320
WIRE 480 272 480 208
WIRE 480 416 480 352
WIRE 528 -192 528 -256
WIRE 528 -80 528 -112
WIRE 528 -48 528 -80
WIRE 528 96 528 32
WIRE 608 -80 528 -80
WIRE 640 -80 608 -80
WIRE 896 -192 848 -192
WIRE 896 -144 848 -144
WIRE 896 -64 848 -64
WIRE 896 -16 848 -16
WIRE 896 208 848 208
WIRE 896 256 848 256
WIRE 896 336 848 336
WIRE 896 384 848 384
WIRE 944 -208 944 -256
WIRE 944 -96 944 -128
WIRE 944 -80 944 -96
WIRE 944 48 944 0
WIRE 944 192 944 144
WIRE 944 304 944 272
WIRE 944 320 944 304
WIRE 944 448 944 400
WIRE 1072 -96 944 -96
WIRE 1072 304 944 304
WIRE 1104 -96 1072 -96
WIRE 1104 304 1072 304
WIRE 1360 -192 1312 -192
WIRE 1360 -144 1312 -144
WIRE 1360 -64 1312 -64
WIRE 1360 -16 1312 -16
WIRE 1360 208 1312 208
WIRE 1360 256 1312 256
WIRE 1360 336 1312 336
WIRE 1360 384 1312 384
WIRE 1408 -208 1408 -256
WIRE 1408 -96 1408 -128
WIRE 1408 -80 1408 -96
WIRE 1408 48 1408 0
WIRE 1408 192 1408 144
WIRE 1408 304 1408 272
WIRE 1408 320 1408 304
WIRE 1408 448 1408 400
WIRE 1536 -96 1408 -96
WIRE 1536 304 1408 304
WIRE 1568 -96 1536 -96
WIRE 1568 304 1536 304
WIRE 1616 32 1616 -16
WIRE 1616 176 1616 112
WIRE 1776 -16 1616 -16
IOPIN 528 -256 In
IOPIN 1776 -16 Out
IOPIN 208 -176 In
IOPIN 208 -16 In
IOPIN 192 176 In
IOPIN 192 224 In
IOPIN 192 272 In
IOPIN 192 320 In
SYMBOL sw 1408 16 M180
WINDOW 3 24 -12 Left 0
WINDOW 38 39 67 Left 0
WINDOW 0 38 33 Left 0
SYMATTR Value ""
SYMATTR SpiceModel switmod
SYMATTR InstName S14
SYMBOL sw 944 288 M180
WINDOW 3 24 -12 Left 0
WINDOW 38 39 67 Left 0
WINDOW 0 38 33 Left 0
SYMATTR Value ""
SYMATTR SpiceModel switmod
SYMATTR InstName S7
SYMBOL sw 1408 416 M180
WINDOW 3 24 -12 Left 0
WINDOW 38 39 67 Left 0
WINDOW 0 38 33 Left 0
SYMATTR Value ""
SYMATTR SpiceModel switmod
SYMATTR InstName S16
SYMBOL sw 1408 288 M180
WINDOW 3 24 -12 Left 0
WINDOW 38 39 67 Left 0
WINDOW 0 38 33 Left 0
SYMATTR Value ""
SYMATTR SpiceModel switmod
SYMATTR InstName S15
SYMBOL res 512 -208 R0
SYMATTR InstName R2
SYMATTR Value 100MEG
SYMBOL res 304 -160 R0
SYMATTR InstName R3
SYMATTR Value 100MEG
SYMBOL sw 944 16 M180
WINDOW 3 24 -12 Left 0
WINDOW 38 39 67 Left 0
WINDOW 0 38 33 Left 0
SYMATTR Value ""
SYMATTR SpiceModel switmod
SYMATTR InstName S6
SYMBOL voltage 480 256 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Vone
SYMATTR Value 1
SYMBOL sw 1408 -112 M180
WINDOW 3 24 -12 Left 0
WINDOW 38 39 67 Left 0
WINDOW 0 38 33 Left 0
SYMATTR Value ""
SYMATTR SpiceModel switmod
SYMATTR InstName S13
SYMBOL res 512 -64 R0
SYMATTR InstName R1
SYMATTR Value 100MEG
SYMBOL sw 944 416 M180
WINDOW 3 24 -12 Left 0
WINDOW 38 39 67 Left 0
WINDOW 0 38 33 Left 0
SYMATTR Value ""
SYMATTR SpiceModel switmod
SYMATTR InstName S8
SYMBOL bv 1616 16 R0
WINDOW 123 24 132 Left 0
SYMATTR InstName B1
SYMATTR Value V=((v(vrefp)-v(vrefm))/16)*(v(B3L)*8+v(B2L)*4+v(B1L)*2+v(B0L))+v(vrefm)
SYMBOL sw 944 -112 M180
WINDOW 3 24 -12 Left 0
WINDOW 38 39 67 Left 0
WINDOW 0 38 33 Left 0
SYMATTR Value ""
SYMATTR SpiceModel switmod
SYMATTR InstName S5
FLAG 608 -80 Vtrip
FLAG 528 -256 VDD
FLAG 848 -192 B3
FLAG 848 -144 Vtrip
FLAG 848 -64 Vtrip
FLAG 848 -16 B3
FLAG 1072 -96 B3L
FLAG 944 48 0
FLAG 848 208 B2
FLAG 848 256 Vtrip
FLAG 848 336 Vtrip
FLAG 848 384 B2
FLAG 1072 304 B2L
FLAG 944 448 0
FLAG 1312 -192 B1
FLAG 1312 -144 Vtrip
FLAG 1312 -64 Vtrip
FLAG 1312 -16 B1
FLAG 1536 -96 B1L
FLAG 1408 48 0
FLAG 1312 208 B0
FLAG 1312 256 Vtrip
FLAG 1312 336 Vtrip
FLAG 1312 384 B0
FLAG 1536 304 B0L
FLAG 1408 448 0
FLAG 1616 176 0
FLAG 1776 -16 Vout
FLAG 208 -176 Vrefp
FLAG 208 -16 Vrefm
FLAG 192 176 B3
FLAG 192 224 B2
FLAG 192 272 B1
FLAG 192 320 B0
FLAG 528 96 0
FLAG 480 416 0
FLAG 480 208 Vone
FLAG 944 -256 Vone
FLAG 944 144 Vone
FLAG 1408 -256 Vone
FLAG 1408 144 Vone
TEXT 120 64 Left 0 !.model switmod SW