* Z:\tmp\asc_dec_bjh7r6w2\12e24a11f07d_gancia_a_dec2.asc
* Generated by LTspice 26.0.1 for Windows.
Q3 N013 N013 N016 0 BC547B
R1 N010 N013 100
R15 vi2 N012 1.1k
E2 vi2 N009 N005 0 -0.5
V4 Vref 0 1.2
R2 N001 N003 0.1k
R9 N015 N014 1k
R13 N007 vi2 2.2k
V7 N009 0 1.2 AC 1
R16 N012 vi2 20
E1 vi1 N009 N005 0 0.5
M1 N011 N014 N018 N018 BSZ0901NSI
.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
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1028 680
WIRE -704 -1024 -992 -1024
WIRE -496 -1024 -704 -1024
WIRE -320 -1024 -496 -1024
WIRE -704 -976 -704 -1024
WIRE -496 -960 -496 -1024
WIRE -704 -864 -704 -896
WIRE -496 -864 -496 -880
WIRE -608 -816 -640 -816
WIRE -560 -816 -608 -816
WIRE -608 -736 -608 -816
WIRE -2160 -688 -2352 -688
WIRE -1920 -688 -2160 -688
WIRE -496 -576 -496 -736
WIRE -2112 -560 -2112 -624
WIRE -1872 -560 -1872 -640
WIRE -2160 -544 -2160 -688
WIRE -1920 -544 -1920 -688
WIRE -336 -528 -432 -528
WIRE -176 -528 -336 -528
WIRE -32 -528 -176 -528
WIRE -1360 -496 -1360 -528
WIRE -336 -496 -336 -528
WIRE -176 -496 -176 -528
WIRE -1920 -464 -1920 -496
WIRE -2160 -448 -2160 -496
WIRE -496 -448 -496 -480
WIRE -496 -448 -592 -448
WIRE -2112 -432 -2112 -480
WIRE -1968 -432 -2112 -432
WIRE -1872 -432 -1872 -480
WIRE -1872 -432 -1968 -432
WIRE -1968 -384 -1968 -432
WIRE -336 -368 -336 -416
WIRE -320 -368 -336 -368
WIRE -176 -368 -176 -416
WIRE -176 -368 -320 -368
WIRE -1360 -304 -1360 -336
WIRE -320 -304 -320 -368
WIRE -992 -272 -992 -560
WIRE -1968 -224 -1968 -304
WIRE 416 -208 416 -272
WIRE 560 -208 560 -272
WIRE 560 -208 416 -208
WIRE -1360 -192 -1360 -224
WIRE -320 -160 -320 -224
WIRE -992 -128 -992 -192
WIRE -880 -128 -992 -128
WIRE 416 -112 416 -208
WIRE 416 -112 288 -112
WIRE -992 -80 -992 -128
WIRE 416 -64 416 -112
WIRE -880 -32 -880 -128
WIRE -880 -32 -928 -32
WIRE -656 -32 -880 -32
WIRE -320 -16 -320 -80
WIRE -176 -16 -176 -368
WIRE -176 -16 -320 -16
WIRE -32 -16 -176 -16
WIRE -176 16 -176 -16
WIRE 288 16 288 -112
WIRE 576 16 464 16
WIRE 752 16 656 16
WIRE -176 48 -176 16
WIRE -992 80 -992 16
WIRE 752 96 752 16
WIRE 288 176 288 96
WIRE 416 304 416 32
WIRE 752 304 752 176
SYMBOL npn -928 -80 M0
SYMATTR InstName Q3
SYMATTR Value BC547B
SYMBOL res -1008 -288 R0
SYMATTR InstName R1
SYMATTR Value 100
SYMBOL res -336 -320 R0
SYMATTR InstName R15
SYMATTR Value 1.1k
SYMBOL e -1872 -576 R0
SYMATTR InstName E2
SYMATTR Value -0.5
SYMBOL voltage -1360 -320 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value 1.2
SYMBOL res -512 -976 R0
SYMATTR InstName R2
SYMATTR Value 0.1k
SYMBOL res 672 0 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R9
SYMATTR Value 1k
SYMBOL res -352 -512 R0
SYMATTR InstName R13
SYMATTR Value 2.2k
SYMBOL voltage -1968 -400 R0
WINDOW 3 24 44 Left 2
WINDOW 123 24 72 Left 2
WINDOW 39 0 0 Left 0
SYMATTR Value 1.2
SYMATTR Value2 AC 1
SYMATTR InstName V7
SYMBOL res -336 -176 R0
SYMATTR InstName R16
SYMATTR Value 20
SYMBOL e -2112 -576 R0
SYMATTR InstName E1
SYMATTR Value 0.5
SYMBOL nmos 464 -64 M0
WINDOW 3 -116 -25 Left 2
SYMATTR Value BSZ0901NSI
SYMATTR InstName M1
FLAG -1360 -496 0
FLAG -1360 -192 0
FLAG -1360 -336 Vref
FLAG -1968 -224 0
FLAG -2112 -624 vi1
FLAG -1872 -640 vi2
FLAG -176 16 vi2
FLAG -1920 -464 0
FLAG -2160 -448 0