* Z:\home\khalils\Downloads\files\data\raw_asc\37bdf2b47ffc_hysteresis_comparator.asc
* Generated by LTspice 26.0.1 for Windows.
* Library below included based on ModelFile attribute of instance XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\OP292.asy)
M1 N010 N010 0 0 BS170
V1 Vcc 0 12
R11 Vcc N010 2k
R1 Vcc N007 2k
XU2 N002 N004 Vcc 0 N003 OP292 ;pnba In+)In-)V+)V-)OUT
Q5 N005 N007 0 0 BC337-25
V2 N006 0 SINE(6 6 1k)
V3 N004 0 SINE(6 6 1k)
R10 Vo 0 10k
R3 N003 N002 1k
R9 Vin- N006 5k
R2 Vout 0 100k
R12 Vcc Vin_p 10k
R8 Vout Vin+ 1k
M4 N008 Vin_p N009 N009 BS170
R6 Vcc Vin+ 50k
Q1 N001 Vin+ N005 0 BC337-25
R14 Vo Vin_p 1k
V4 Vin_n 0 SINE(6 6 1k)
R5 N002 0 10k
Q3 N001 N001 Vcc 0 BC327-25
Q2 Vout Vin- N005 0 BC337-25
Q6 N007 N007 0 0 BC337-25
R7 Vin+ 0 50k
M3 Vo Vin_n N009 N009 BS170
R4 Vcc N002 10k
R13 Vin_p 0 10k
M5 N008 N008 Vcc Vcc BS250P
M6 Vo N008 Vcc Vcc BS250P
Q4 Vout N001 Vcc 0 BC327-25
M2 N009 N010 0 0 BS170
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.tran 5m
.inc opamp.sub
.inc "C:\Users\TCFH2003\Documents\LTspice\PSPICE_Models\BS170.lib"
.inc "C:\Users\TCFH2003\Documents\LTspice\PSPICE_Models\BS250P.lib"
.lib ADI1.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1916 2040
WIRE 272 -160 -48 -160
WIRE 624 -160 352 -160
WIRE 304 -32 160 -32
WIRE 464 -32 304 -32
WIRE 1456 0 1440 0
WIRE 1472 0 1456 0
WIRE 160 16 160 -32
WIRE 464 16 464 -32
WIRE -224 32 -256 32
WIRE -160 32 -224 32
WIRE 1472 48 1472 0
WIRE 304 64 224 64
WIRE 400 64 304 64
WIRE 1616 64 1568 64
WIRE 1760 64 1696 64
WIRE -160 96 -160 32
WIRE 1648 128 1600 128
WIRE 160 144 160 112
WIRE 304 144 304 64
WIRE 304 144 160 144
WIRE 464 144 464 112
WIRE 624 144 624 -160
WIRE 624 144 464 144
WIRE 672 144 624 144
WIRE 784 144 672 144
WIRE 1600 144 1600 128
WIRE -736 160 -752 160
WIRE -704 160 -736 160
WIRE 1648 160 1648 128
WIRE 160 176 160 144
WIRE 464 176 464 144
WIRE 1472 176 1472 128
WIRE 1568 176 1568 64
WIRE 1568 176 1472 176
WIRE 1616 176 1568 176
WIRE 1760 192 1760 64
WIRE 1760 192 1680 192
WIRE 1616 208 1280 208
WIRE -160 224 -160 176
WIRE -48 224 -48 -160
WIRE -48 224 -160 224
WIRE 48 224 -48 224
WIRE 96 224 48 224
WIRE 576 224 528 224
WIRE 688 224 576 224
WIRE -704 240 -704 160
WIRE 784 240 784 224
WIRE 1280 240 1280 208
WIRE 1472 240 1472 176
WIRE -160 272 -160 224
WIRE 160 288 160 272
WIRE 304 288 160 288
WIRE 464 288 464 272
WIRE 464 288 304 288
WIRE 688 288 688 224
WIRE 1648 288 1648 224
WIRE 1728 288 1648 288
WIRE 1760 288 1728 288
WIRE 1472 336 1472 320
WIRE -704 352 -704 320
WIRE 1280 352 1280 320
WIRE -160 384 -160 352
WIRE 528 384 496 384
WIRE 544 384 528 384
WIRE 688 400 688 368
WIRE 496 416 496 384
WIRE 688 496 688 480
WIRE 496 528 496 496
WIRE 496 528 400 528
WIRE 304 560 304 288
WIRE 496 560 496 528
WIRE 400 608 400 528
WIRE 400 608 368 608
WIRE 432 608 400 608
WIRE 304 688 304 656
WIRE 496 688 496 656
WIRE 272 1136 -16 1136
WIRE 608 1136 352 1136
WIRE 304 1216 160 1216
WIRE 464 1216 304 1216
WIRE 160 1264 160 1216
WIRE 464 1264 464 1216
WIRE 304 1280 208 1280
WIRE 416 1280 304 1280
WIRE -176 1328 -208 1328
WIRE -112 1328 -176 1328
WIRE -112 1392 -112 1328
WIRE 464 1392 464 1360
WIRE 608 1392 608 1136
WIRE 608 1392 464 1392
WIRE 704 1392 608 1392
WIRE 720 1392 704 1392
WIRE 160 1408 160 1360
WIRE 304 1408 304 1280
WIRE 304 1408 160 1408
WIRE 160 1440 160 1408
WIRE 464 1440 464 1392
WIRE 720 1488 720 1472
WIRE -112 1520 -112 1472
WIRE -16 1520 -16 1136
WIRE -16 1520 -112 1520
WIRE 48 1520 -16 1520
WIRE 112 1520 48 1520
WIRE 576 1520 512 1520
WIRE 656 1520 576 1520
WIRE 304 1536 160 1536
WIRE 464 1536 304 1536
WIRE 656 1536 656 1520
WIRE -112 1568 -112 1520
WIRE 528 1632 496 1632
WIRE 544 1632 528 1632
WIRE 656 1648 656 1616
WIRE 496 1664 496 1632
WIRE -112 1680 -112 1648
WIRE 496 1776 496 1744
WIRE 496 1776 400 1776
WIRE 304 1808 304 1536
WIRE 496 1808 496 1776
WIRE 400 1888 400 1776
WIRE 400 1888 352 1888
WIRE 448 1888 400 1888
WIRE 304 1936 304 1904
WIRE 496 1936 496 1904
SYMBOL npn 432 560 R0
SYMATTR InstName Q6
SYMATTR Value BC337-25
SYMBOL npn 368 560 M0
SYMATTR InstName Q5
SYMATTR Value BC337-25
SYMBOL OpAmps\\OP292 1648 256 M180
SYMATTR InstName U2
SYMBOL res 368 1120 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R14
SYMATTR Value 1k
SYMBOL res -176 256 R0
SYMATTR InstName R7
SYMATTR Value 50k
SYMBOL nmos 112 1440 R0
SYMATTR InstName M4
SYMATTR Value BS170
SYMBOL voltage 656 1520 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value SINE(6 6 1k)
SYMBOL nmos 448 1808 R0
SYMATTR InstName M1
SYMATTR Value BS170
SYMBOL res 368 -176 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R8
SYMATTR Value 1k
SYMBOL voltage -704 224 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL res 704 1376 R0
SYMATTR InstName R10
SYMATTR Value 10k
SYMBOL res 672 272 R0
SYMATTR InstName R9
SYMATTR Value 5k
SYMBOL nmos 512 1440 M0
SYMATTR InstName M3
SYMATTR Value BS170
SYMBOL res 1456 32 R0
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL pnp 224 112 R180
SYMATTR InstName Q3
SYMATTR Value BC327-25
SYMBOL npn 96 176 R0
SYMATTR InstName Q1
SYMATTR Value BC337-25
SYMBOL res 480 400 R0
SYMATTR InstName R1
SYMATTR Value 2k
SYMBOL res 480 1648 R0
SYMATTR InstName R11
SYMATTR Value 2k
SYMBOL res 768 128 R0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL pmos 416 1360 M180
SYMATTR InstName M6
SYMATTR Value BS250P
SYMBOL voltage 1280 224 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value SINE(6 6 1k)
SYMBOL nmos 352 1808 M0
SYMATTR InstName M2
SYMATTR Value BS170
SYMBOL res 1712 48 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 1k
SYMBOL res -128 1552 R0
SYMATTR InstName R13
SYMATTR Value 10k
SYMBOL pmos 208 1360 R180
SYMATTR InstName M5
SYMATTR Value BS250P
SYMBOL voltage 688 384 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value SINE(6 6 1k)
SYMBOL npn 528 176 M0
SYMATTR InstName Q2
SYMATTR Value BC337-25
SYMBOL res 1456 224 R0
SYMATTR InstName R5
SYMATTR Value 10k
SYMBOL pnp 400 112 M180
SYMATTR InstName Q4
SYMATTR Value BC327-25
SYMBOL res -128 1376 R0
SYMATTR InstName R12
SYMATTR Value 10k
SYMBOL res -176 80 R0
SYMATTR InstName R6
SYMATTR Value 50k
FLAG -704 352 0
FLAG -736 160 Vcc
FLAG 304 -32 Vcc
FLAG 672 144 Vout
FLAG 784 240 0
FLAG 304 688 0
FLAG 496 688 0
FLAG 528 384 Vcc
FLAG 1472 336 0
FLAG 1456 0 Vcc
FLAG 1280 352 0
FLAG 1600 144 0
FLAG 1728 288 Vcc
FLAG 48 224 Vin+
FLAG 576 224 Vin-
FLAG 688 496 0
FLAG -160 384 0
FLAG -224 32 Vcc
FLAG 304 1216 Vcc
FLAG 704 1392 Vo
FLAG 720 1488 0
FLAG 304 1936 0
FLAG 496 1936 0
FLAG 528 1632 Vcc
FLAG 48 1520 Vin_p
FLAG 576 1520 Vin_n
FLAG 656 1648 0
FLAG -112 1680 0
FLAG -176 1328 Vcc
TEXT -720 416 Left 2 !.tran 5m
TEXT 1592 536 Left 2 !.inc opamp.sub
TEXT 0 1992 Left 2 !.inc "C:\\Users\\TCFH2003\\Documents\\LTspice\\PSPICE_Models\\BS170.lib"
TEXT 0 2024 Left 2 !.inc "C:\\Users\\TCFH2003\\Documents\\LTspice\\PSPICE_Models\\BS250P.lib"