* Z:\home\khalils\Downloads\files\data\raw_asc\201cce8717f7_Task_2-a.asc
* Generated by LTspice 26.0.1 for Windows.
* Library below included based on ModelFile attribute of instance XU1, XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\Comparators\LT1711.asy)
D2 0 Vout D
V2 0 Vn 12
XU1 N003 N002 Vp Vn NC_01 Vs1 NC_02 NC_03 LT1711 ;pnba In+)In-)V+)V-)GND)OUT+)OUT-)LATCH
V4 N003 0 PULSE(-1 1 0 0 0 100u 200u)
R2 Vs2 N005 50k
R1 N005 Vs1 10k
V1 Vp 0 12
M2 Vout Vs2 0 0 IRF530
V6 N004 0 25
D1 Vout N001 D
V3 N002 0 SINE(0 0.8 50)
R3 N004 Vout 20
M1 N001 Vs1 Vout Vout IRF530
XU2 0 N005 Vp Vn NC_04 Vs2 NC_05 NC_06 LT1711 ;pnba In+)In-)V+)V-)GND)OUT+)OUT-)LATCH
V5 N001 N004 25
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.tran 0.01
.lib LT1711.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4.1
SHEET 1 1988 812
WIRE 1536 -32 1200 -32
WIRE 1792 -32 1536 -32
WIRE 672 -16 672 -80
WIRE 640 16 320 16
WIRE 864 16 720 16
WIRE 1200 32 1200 -32
WIRE 1536 32 1536 -32
WIRE 640 48 464 48
WIRE 1792 48 1792 -32
WIRE 48 112 48 32
WIRE 320 112 320 16
WIRE 464 112 464 48
WIRE 1488 112 1392 112
WIRE 656 144 656 80
WIRE 1200 256 1200 112
WIRE 1312 256 1200 256
WIRE 1536 256 1536 128
WIRE 1536 256 1392 256
WIRE 1792 256 1792 112
WIRE 1792 256 1536 256
WIRE 48 288 48 192
WIRE 48 288 -64 288
WIRE 320 288 320 192
WIRE 464 288 464 192
WIRE -64 304 -64 288
WIRE 48 352 48 288
WIRE 784 352 688 352
WIRE 976 352 864 352
WIRE 1200 400 1200 256
WIRE 1536 400 1536 256
WIRE 1792 416 1792 256
WIRE 832 480 832 448
WIRE 1488 480 1392 480
WIRE 48 512 48 432
WIRE 464 512 368 512
WIRE 688 512 688 352
WIRE 688 512 544 512
WIRE 800 512 688 512
WIRE 976 512 976 352
WIRE 976 512 880 512
WIRE 1088 512 976 512
WIRE 800 544 656 544
WIRE 1200 544 1200 480
WIRE 1536 544 1536 496
WIRE 1536 544 1200 544
WIRE 1792 544 1792 480
WIRE 1792 544 1536 544
WIRE 816 624 816 576
WIRE 656 640 656 544
WIRE 1200 640 1200 544
DATAFLAG 448 16 ""
DATAFLAG 512 48 ""
DATAFLAG 816 16 ""
DATAFLAG 1248 256 ""
SYMBOL diode 1808 480 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMBOL voltage 48 336 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 12
SYMBOL voltage 320 96 R0
WINDOW 0 -46 6 Left 2
WINDOW 3 -186 98 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value SINE(0 0.8 50)
SYMBOL res 880 336 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R2
SYMATTR Value 50k
SYMBOL res 560 496 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL nmos 1488 32 R0
SYMATTR InstName M1
SYMATTR Value IRF530
SYMBOL voltage 1200 384 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V6
SYMATTR Value 25
SYMBOL voltage 1200 16 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V5
SYMATTR Value 25
SYMBOL voltage 48 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL nmos 1488 400 R0
SYMATTR InstName M2
SYMATTR Value IRF530
SYMBOL voltage 464 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value PULSE(-1 1 0 0 0 100u 200u)
SYMBOL Comparators\\LT1711 832 528 R0
SYMATTR InstName U2
SYMBOL res 1296 272 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R3
SYMATTR Value 20
SYMBOL diode 1808 112 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D1
SYMBOL Comparators\\LT1711 672 32 R0
SYMATTR InstName U1
FLAG -64 304 0
FLAG 320 288 0
FLAG 464 288 0
FLAG 656 640 0
FLAG 48 32 Vp
FLAG 48 512 Vn
FLAG 672 -80 Vp
FLAG 832 448 Vp
FLAG 656 144 Vn
FLAG 816 624 Vn
FLAG 864 16 Vs1
FLAG 1088 512 Vs2
FLAG 368 512 Vs1
FLAG 1392 112 Vs1
FLAG 1392 480 Vs2
FLAG 1200 640 0
FLAG 1536 256 Vout
TEXT 48 608 Left 2 !.tran 0.01