* Z:\home\khalils\Downloads\files\data\raw_asc\5510e379eea3_6counter.asc
* Generated by LTspice 26.0.1 for Windows.
* .step param LDR list 1Meg 10k
Q5 N022 N027 O1 0 2N3904
C5 S5 T4 {Cn}
R6 Vref 0 10k
R17 O3 0 {Rbot}
R81 N011 0 100k
Q38 N005 N011 N017 0 2N5550
D31 O2 N010 1N4148
R72 N009 0 14.3k
R16 CLK T3 {Rrst}
R30 Vref N026 {Rvref}
Q12 N031 N026 S5 0 2N3906
R2 N007 0 100k
Q11 N025 N030 O4 0 2N3904
C6 S1 T5 {Cn}
Q41 N006 N012 N018 0 2N5550
R86 N018 0 10k
R27 CLK T5 {Rrst}
R14 N028 O2 {Rb}
R12 CLK T2 {Rrst}
D4 T2 S2 1N4148
R9 O1 0 {Rbot}
Q33 N003 N009 N015 0 2N5550
D43 O0 N012 1N4148
Q2 CLK N021 0 0 2N3904
C3 N019 0 100n
R25 N030 O4 {Rb}
R3 N021 N020 10k
Q34 N004 N010 N016 0 2N5550
R4 0 N021 10k
D30 Vd N004 LXHL-BW02 N=10
D37 O5 N011 1N4148
R23 CLK T4 {Rrst}
R1 N013 0 10k
R11 Vref N022 {Rvref}
Q13 N026 N031 O5 0 2N3904
D28 Vd N003 LXHL-BW02 N=10
R28 O5 0 {Rbot}
R18 N029 O3 {Rb}
Q8 N029 N024 S3 0 2N3906
R5 CLK T1 {Rrst}
R20 VCC CLK 2k2
R8 VCC N019 3k9
R51 N014 0 10k
R19 Vref N024 {Rvref}
R87 N012 0 100k
R29 N031 O5 {Rb}
Q6 N028 N023 S2 0 2N3906
D29 O1 N009 1N4148
R52 N008 0 14k
R21 VCC N019 {LDR}
Q3 VCC N019 Vref 0 2N3904
D42 Vd N006 LXHL-BW02 N=10
Q7 N023 N028 O2 0 2N3904
Q10 N030 N025 S4 0 2N3906
C4 S4 T3 {Cn}
C1 S2 T1 1n
R24 O4 0 {Rbot}
R10 N027 O1 {Rb}
D3 T1 S1 1N4148
C18 N020 src_clk 22n
D2 O3 N007 1N4148
R75 N010 0 100k
R7 N019 0 10k
D26 Vd N002 LXHL-BW02 N=10
V2 VCC 0 12
D1 Vd N001 LXHL-BW02 N=10
R26 Vref N025 {Rvref}
R15 Vref N023 {Rvref}
D7 T4 S4 1N4148
V1 Vd 0 80
Q1 N001 N007 N013 0 2N5550
Q4 N027 N022 S1 0 2N3906
R80 N017 0 10k
R71 N015 0 10k
Q9 N024 N029 O3 0 2N3904
C2 S3 T2 {Cn}
Q24 N002 N008 N014 0 2N5550
D36 Vd N005 LXHL-BW02 N=10
D27 O4 N008 1N4148
D8 T5 S5 1N4148
R13 O2 0 {Rbot}
R73 N016 0 10k
D5 T3 S3 1N4148
V3 src_clk 0 PULSE(0 12 0 1n 1n 10m 20m)
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.tran 2
.param Cn=1n Rrst=2k2 Rbot=2k2 Rvref=10k Rb=10k
.param LDR 100Meg
.ic V(T1,S2)=0
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 4128 2836
WIRE 768 -336 768 -400
WIRE 1104 -336 1104 -400
WIRE 112 -320 112 -384
WIRE 448 -320 448 -384
WIRE 1504 -320 1504 -384
WIRE -240 -288 -240 -352
WIRE 768 -224 768 -272
WIRE 1104 -224 1104 -272
WIRE 112 -208 112 -256
WIRE 448 -208 448 -256
WIRE 1504 -208 1504 -256
WIRE -240 -176 -240 -224
WIRE 704 -176 640 -176
WIRE 1040 -176 976 -176
WIRE 48 -160 -16 -160
WIRE 384 -160 320 -160
WIRE 1440 -160 1376 -160
WIRE -304 -128 -368 -128
WIRE 640 -128 640 -176
WIRE 976 -128 976 -176
WIRE -16 -112 -16 -160
WIRE 320 -112 320 -160
WIRE 1376 -112 1376 -160
WIRE 768 -96 768 -128
WIRE 1104 -96 1104 -128
WIRE -368 -80 -368 -128
WIRE 112 -80 112 -112
WIRE 448 -80 448 -112
WIRE 1504 -80 1504 -112
WIRE -240 -48 -240 -80
WIRE 2144 288 528 288
WIRE 432 320 288 320
WIRE 608 320 432 320
WIRE 944 320 608 320
WIRE 1264 320 944 320
WIRE 1584 320 1264 320
WIRE 1904 320 1584 320
WIRE 608 352 608 320
WIRE 944 352 944 320
WIRE 1264 352 1264 320
WIRE 1584 352 1584 320
WIRE 1904 352 1904 320
WIRE -560 432 -560 384
WIRE 528 464 528 288
WIRE 544 464 528 464
WIRE 608 464 608 432
WIRE 624 464 608 464
WIRE 656 464 624 464
WIRE 880 464 720 464
WIRE 944 464 944 432
WIRE 960 464 944 464
WIRE 992 464 960 464
WIRE 1200 464 1056 464
WIRE 1264 464 1264 432
WIRE 1280 464 1264 464
WIRE 1312 464 1280 464
WIRE 1520 464 1376 464
WIRE 1584 464 1584 432
WIRE 1616 464 1584 464
WIRE 1632 464 1616 464
WIRE 1840 464 1696 464
WIRE 1904 464 1904 432
WIRE 1952 464 1904 464
WIRE 2144 464 2144 288
WIRE 2144 464 2016 464
WIRE -864 480 -864 464
WIRE -752 480 -752 464
WIRE -752 480 -864 480
WIRE -672 480 -752 480
WIRE -624 480 -672 480
WIRE 288 496 288 320
WIRE 608 496 608 464
WIRE 944 496 944 464
WIRE 1264 496 1264 464
WIRE 1584 496 1584 464
WIRE 1904 496 1904 464
WIRE -752 544 -752 480
WIRE -672 544 -672 480
WIRE -48 544 -48 528
WIRE -16 544 -48 544
WIRE 64 544 48 544
WIRE 176 544 144 544
WIRE 224 544 176 544
WIRE -48 560 -48 544
WIRE -560 576 -560 528
WIRE -512 576 -560 576
WIRE 176 576 176 544
WIRE 544 576 544 464
WIRE 560 576 544 576
WIRE 608 576 608 560
WIRE 608 576 560 576
WIRE 880 576 880 464
WIRE 896 576 880 576
WIRE 944 576 944 560
WIRE 944 576 896 576
WIRE 1200 576 1200 464
WIRE 1216 576 1200 576
WIRE 1264 576 1264 560
WIRE 1264 576 1216 576
WIRE 1520 576 1520 464
WIRE 1536 576 1520 576
WIRE 1584 576 1584 560
WIRE 1584 576 1536 576
WIRE 1840 576 1840 464
WIRE 1856 576 1840 576
WIRE 1904 576 1904 560
WIRE 1904 576 1856 576
WIRE -560 592 -560 576
WIRE 608 592 608 576
WIRE 944 592 944 576
WIRE 1264 592 1264 576
WIRE 1584 592 1584 576
WIRE 1904 592 1904 576
WIRE -672 624 -672 608
WIRE 688 640 672 640
WIRE 704 640 688 640
WIRE 816 640 784 640
WIRE 1024 640 1008 640
WIRE 1040 640 1024 640
WIRE 1152 640 1120 640
WIRE 1344 640 1328 640
WIRE 1360 640 1344 640
WIRE 1472 640 1440 640
WIRE 1664 640 1648 640
WIRE 1680 640 1664 640
WIRE 1792 640 1760 640
WIRE 1984 640 1968 640
WIRE 2000 640 1984 640
WIRE 2112 640 2080 640
WIRE 288 656 288 592
WIRE -560 688 -560 672
WIRE 688 688 688 640
WIRE 1024 688 1024 640
WIRE 1344 688 1344 640
WIRE 1664 688 1664 640
WIRE 1984 688 1984 640
WIRE 608 736 608 688
WIRE 608 736 576 736
WIRE 624 736 608 736
WIRE 944 736 944 688
WIRE 944 736 912 736
WIRE 960 736 944 736
WIRE 1264 736 1264 688
WIRE 1264 736 1232 736
WIRE 1280 736 1264 736
WIRE 1584 736 1584 688
WIRE 1584 736 1552 736
WIRE 1600 736 1584 736
WIRE 1904 736 1904 688
WIRE 1904 736 1872 736
WIRE 1920 736 1904 736
WIRE 576 752 576 736
WIRE 912 752 912 736
WIRE 1232 752 1232 736
WIRE 1552 752 1552 736
WIRE 1872 752 1872 736
WIRE 672 832 576 832
WIRE 688 832 688 784
WIRE 688 832 672 832
WIRE 1008 832 912 832
WIRE 1024 832 1024 784
WIRE 1024 832 1008 832
WIRE 1328 832 1232 832
WIRE 1344 832 1344 784
WIRE 1344 832 1328 832
WIRE 1648 832 1552 832
WIRE 1664 832 1664 784
WIRE 1664 832 1648 832
WIRE 1968 832 1872 832
WIRE 1984 832 1984 784
WIRE 1984 832 1968 832
SYMBOL res -256 -64 R0
SYMATTR InstName R86
SYMATTR Value 10k
SYMBOL npn -304 -176 R0
SYMATTR InstName Q41
SYMATTR Value 2N5550
SYMBOL res 1248 336 R0
SYMATTR InstName R16
SYMATTR Value {Rrst}
SYMBOL diode 592 496 R0
SYMATTR InstName D3
SYMATTR Value 1N4148
SYMBOL res 1856 736 R0
SYMATTR InstName R29
SYMATTR Value {Rb}
SYMBOL diode 912 -160 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D27
SYMATTR Value 1N4148
SYMBOL res 896 816 R0
SYMATTR InstName R13
SYMATTR Value {Rbot}
SYMBOL res 928 336 R0
SYMATTR InstName R12
SYMATTR Value {Rrst}
SYMBOL res 160 528 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res 624 -144 R0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL pnp 1648 688 R180
SYMATTR InstName Q10
SYMATTR Value 2N3906
SYMBOL res 560 736 R0
SYMATTR InstName R10
SYMATTR Value {Rb}
SYMBOL res 1568 336 R0
SYMATTR InstName R23
SYMATTR Value {Rrst}
SYMBOL res 432 -96 R0
SYMATTR InstName R73
SYMATTR Value 10k
SYMBOL cap 2016 448 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C6
SYMATTR Value {Cn}
SYMBOL diode 1568 496 R0
SYMATTR InstName D7
SYMATTR Value 1N4148
SYMBOL res -768 528 R0
SYMATTR InstName R7
SYMATTR Value 10k
SYMBOL res -32 -128 R0
SYMATTR InstName R72
SYMATTR Value 14.3k
SYMBOL npn 224 496 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL cap 1376 448 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C4
SYMATTR Value {Cn}
SYMBOL res 1536 736 R0
SYMATTR InstName R25
SYMATTR Value {Rb}
SYMBOL diode 1312 -144 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D37
SYMATTR Value 1N4148
SYMBOL npn -624 432 R0
SYMATTR InstName Q3
SYMATTR Value 2N3904
SYMBOL res 2096 624 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R30
SYMATTR Value {Rvref}
SYMBOL pnp 1968 688 R180
SYMATTR InstName Q12
SYMATTR Value 2N3906
SYMBOL cap 720 448 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value 1n
SYMBOL pnp 1008 688 R180
SYMATTR InstName Q6
SYMATTR Value 2N3906
SYMBOL diode -80 -144 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D29
SYMATTR Value 1N4148
SYMBOL res 1488 -96 R0
SYMATTR InstName R80
SYMATTR Value 10k
SYMBOL voltage -864 608 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 12
SYMBOL res 1776 624 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R26
SYMATTR Value {Rvref}
SYMBOL res 752 -112 R0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL npn 1600 688 R0
SYMATTR InstName Q11
SYMATTR Value 2N3904
SYMBOL cap 1056 448 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C2
SYMATTR Value {Cn}
SYMBOL res 1216 736 R0
SYMATTR InstName R18
SYMATTR Value {Rb}
SYMBOL npn 1440 -208 R0
SYMATTR InstName Q38
SYMATTR Value 2N5550
SYMBOL res 560 816 R0
SYMATTR InstName R9
SYMATTR Value {Rbot}
SYMBOL npn 1920 688 R0
SYMATTR InstName Q13
SYMATTR Value 2N3904
SYMBOL res 1360 -128 R0
SYMATTR InstName R81
SYMATTR Value 100k
SYMBOL res -576 576 R0
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL diode 1248 496 R0
SYMATTR InstName D5
SYMATTR Value 1N4148
SYMBOL LED -256 -288 R0
SYMATTR InstName D42
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL res -384 -96 R0
SYMATTR InstName R87
SYMATTR Value 100k
SYMBOL res 1216 816 R0
SYMATTR InstName R17
SYMATTR Value {Rbot}
SYMBOL res 1536 816 R0
SYMATTR InstName R24
SYMATTR Value {Rbot}
SYMBOL res 304 -128 R0
SYMATTR InstName R75
SYMATTR Value 100k
SYMBOL res 416 224 R0
SYMATTR InstName R20
SYMATTR Value 2k2
SYMBOL cap -688 544 R0
SYMATTR InstName C3
SYMATTR Value 100n
SYMBOL LED 96 -320 R0
SYMATTR InstName D28
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL pnp 672 688 R180
SYMATTR InstName Q4
SYMATTR Value 2N3906
SYMBOL voltage -1008 608 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 80
SYMBOL npn 704 -224 R0
SYMATTR InstName Q1
SYMATTR Value 2N5550
SYMBOL diode 256 -144 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D31
SYMATTR Value 1N4148
SYMBOL pnp 1328 688 R180
SYMATTR InstName Q8
SYMATTR Value 2N3906
SYMBOL res 960 -144 R0
SYMATTR InstName R52
SYMATTR Value 14k
SYMBOL npn 1040 -224 R0
SYMATTR InstName Q24
SYMATTR Value 2N5550
SYMBOL res 896 736 R0
SYMATTR InstName R14
SYMATTR Value {Rb}
SYMBOL LED 432 -320 R0
SYMATTR InstName D30
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL voltage -48 544 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -19 164 Left 2
SYMATTR Value PULSE(0 12 0 1n 1n 10m 20m)
SYMATTR InstName V3
SYMBOL npn 624 688 R0
SYMATTR InstName Q5
SYMATTR Value 2N3904
SYMBOL res 1088 -112 R0
SYMATTR InstName R51
SYMATTR Value 10k
SYMBOL npn 1280 688 R0
SYMATTR InstName Q9
SYMATTR Value 2N3904
SYMBOL res -768 368 R0
SYMATTR InstName R8
SYMATTR Value 3k9
SYMBOL npn 48 -208 R0
SYMATTR InstName Q33
SYMATTR Value 2N5550
SYMBOL diode -432 -112 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D43
SYMATTR Value 1N4148
SYMBOL res 1888 336 R0
SYMATTR InstName R27
SYMATTR Value {Rrst}
SYMBOL res 96 -96 R0
SYMATTR InstName R71
SYMATTR Value 10k
SYMBOL diode 576 -160 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D2
SYMATTR Value 1N4148
SYMBOL LED 1088 -336 R0
SYMATTR InstName D26
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL res 1456 624 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R19
SYMATTR Value {Rvref}
SYMBOL npn 384 -208 R0
SYMATTR InstName Q34
SYMATTR Value 2N5550
SYMBOL cap 1696 448 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C5
SYMATTR Value {Cn}
SYMBOL diode 928 496 R0
SYMATTR InstName D4
SYMATTR Value 1N4148
SYMBOL res 1856 816 R0
SYMATTR InstName R28
SYMATTR Value {Rbot}
SYMBOL res -880 368 R0
SYMATTR InstName R21
SYMATTR Value {LDR}
SYMBOL res 192 672 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL diode 1888 496 R0
SYMATTR InstName D8
SYMATTR Value 1N4148
SYMBOL res 592 336 R0
SYMATTR InstName R5
SYMATTR Value {Rrst}
SYMBOL LED 1488 -320 R0
SYMATTR InstName D36
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL res 800 624 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R11
SYMATTR Value {Rvref}
SYMBOL LED 752 -336 R0
SYMATTR InstName D1
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL res 1136 624 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R15
SYMATTR Value {Rvref}
SYMBOL npn 960 688 R0
SYMATTR InstName Q7
SYMATTR Value 2N3904
SYMBOL cap 48 528 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C18
SYMATTR Value 22n
FLAG -864 624 VCC
FLAG -864 704 0
FLAG -560 384 VCC
FLAG -560 688 0
FLAG -752 624 0
FLAG -752 384 VCC
FLAG -672 624 0
FLAG -512 576 Vref
FLAG 640 -48 0
FLAG 768 -16 0
FLAG 768 -400 Vd
FLAG -1008 704 0
FLAG -1008 624 Vd
FLAG 576 -176 O3
FLAG -48 640 0
FLAG 176 656 0
FLAG 288 656 0
FLAG 288 320 CLK
FLAG 576 912 0
FLAG 816 640 Vref
FLAG 912 912 0
FLAG 1152 640 Vref
FLAG 1232 912 0
FLAG 1472 640 Vref
FLAG 560 576 S1
FLAG 896 576 S2
FLAG 1216 576 S3
FLAG 672 832 O1
FLAG 1008 832 O2
FLAG 1328 832 O3
FLAG 624 464 T1
FLAG 960 464 T2
FLAG 1280 464 T3
FLAG 432 240 VCC
FLAG -864 384 VCC
FLAG 1552 912 0
FLAG 1792 640 Vref
FLAG 1648 832 O4
FLAG 1872 912 0
FLAG 2112 640 Vref
FLAG 1968 832 O5
FLAG -48 528 src_clk
FLAG 1536 576 S4
FLAG 1856 576 S5
FLAG 1616 464 T4
FLAG 1952 464 T5
FLAG 976 -48 0
FLAG 1104 -16 0
FLAG 1104 -400 Vd
FLAG 912 -176 O4
FLAG -16 -32 0
FLAG 112 0 0
FLAG 112 -384 Vd
FLAG -80 -160 O1
FLAG 320 -32 0
FLAG 448 0 0
FLAG 448 -384 Vd
FLAG 256 -160 O2
FLAG 1376 -32 0
FLAG 1504 0 0
FLAG 1504 -384 Vd
FLAG 1312 -160 O5
FLAG -368 0 0
FLAG -240 32 0
FLAG -240 -352 Vd
FLAG -432 -128 O0
TEXT -296 904 Left 2 !.tran 2
TEXT -1136 520 Left 2 ;.step param LDR list 1Meg 10k
TEXT -296 952 Left 2 !.param Cn=1n Rrst=2k2 Rbot=2k2 Rvref=10k Rb=10k
TEXT -1144 456 Left 2 !.param LDR 100Meg
TEXT -280 856 Left 2 !.ic V(T1,S2)=0