* Z:\tmp\asc_mix_bvbm4pog\mix_320.asc
* Generated by LTspice 26.0.1 for Windows.
V1 N001 0 5V
R1 N006 N001 1k
R2 N008 N006 1k
R3 N011 N008 1k
R4 0 N011 1k
R5 0 N006 1k
R6 0 N008 1k
R7 0 N011 1k
A1 N002 0 0 0 0 N003 0 0 BUF
A2 N002 0 0 0 0 N004 0 0 BUF
A3 N004 0 N002 N003 0 0 N005 0 AND
A4 N004 0 N002 N002 0 0 N007 0 AND
A5 N002 0 N002 N003 0 0 N009 0 AND
A6 N002 0 N002 N002 0 0 N012 0 AND
V2 N002 0 3V
XU1 NC_11 NC_12 NC_13 NC_14 PC817 Igain=1.5m ;pnba A)K)C)E
XU2 NC_15 NC_16 NC_17 NC_18 PC817 Igain=1.5m ;pnba A)K)C)E
XU3 NC_19 NC_20 NC_21 NC_22 PC817 Igain=1.5m ;pnba A)K)C)E
M1 VDD VIN1 VOUT VDD PMOS l=90n w=400n
M2 VDD VIN2 VOUT VDD PMOS l=90n w=400n
M3 VOUT VIN1 N010 0 NMOS l=90n w=200n
M4 N010 VIN2 0 0 NMOS l=90n w=200n
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.tran 10ms
* Driving Ref
* Decorder?
* Demux
* Library below included based on ModelFile attribute of instance XU1, XU2, XU3 (C:\users\khalils\AppData\Local\LTspice\lib\sym\Optos\PC817B.asy)
.lib PC817.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 3424 1152
WIRE 576 0 528 0
WIRE 704 0 656 0
WIRE 704 64 704 0
WIRE 1344 80 1216 80
WIRE 1488 80 1344 80
WIRE 1520 80 1488 80
WIRE 1776 80 1584 80
WIRE 1216 112 1216 80
WIRE 1488 112 1488 80
WIRE 1728 112 1488 112
WIRE 1344 160 1344 80
WIRE 1488 160 1344 160
WIRE 1520 160 1488 160
WIRE 1664 160 1584 160
WIRE 1872 160 1664 160
WIRE 2064 176 1936 176
WIRE 1344 192 1344 160
WIRE 1616 192 1344 192
WIRE 1872 192 1616 192
WIRE 704 208 704 144
WIRE 704 208 640 208
WIRE 1776 208 1776 80
WIRE 1872 208 1776 208
WIRE 1216 240 1216 192
WIRE 640 256 640 208
WIRE 704 304 704 208
WIRE 1152 304 704 304
WIRE 1664 304 1664 160
WIRE 1872 304 1664 304
WIRE 2064 320 1936 320
WIRE 1616 336 1616 192
WIRE 1872 336 1616 336
WIRE 1728 352 1728 112
WIRE 1872 352 1728 352
WIRE 704 368 704 304
WIRE 640 416 640 336
WIRE 640 416 576 416
WIRE 576 432 576 416
WIRE 1488 432 1488 160
WIRE 1664 432 1488 432
WIRE 1872 432 1664 432
WIRE 2064 448 1936 448
WIRE 1616 464 1616 336
WIRE 1872 464 1616 464
WIRE 1776 480 1776 208
WIRE 1872 480 1776 480
WIRE 640 496 640 416
WIRE 1152 496 640 496
WIRE 640 512 640 496
WIRE 576 544 576 512
WIRE 576 544 512 544
WIRE 1664 560 1664 432
WIRE 1872 560 1664 560
WIRE 2064 576 1936 576
WIRE 1616 592 1616 464
WIRE 1872 592 1616 592
WIRE 1728 608 1728 352
WIRE 1872 608 1728 608
WIRE 576 624 576 544
WIRE 1152 624 576 624
WIRE 512 656 512 544
WIRE 576 656 576 624
WIRE 512 768 512 736
WIRE 512 768 448 768
WIRE 576 768 576 736
WIRE 576 768 512 768
WIRE 640 768 640 592
WIRE 640 768 576 768
WIRE 704 768 704 448
WIRE 704 768 640 768
WIRE 2880 112 2880 80
WIRE 2880 112 2864 112
WIRE 3072 112 3072 80
WIRE 3088 112 3072 112
WIRE 2880 160 2880 112
WIRE 2880 160 2864 160
WIRE 3088 160 3088 112
WIRE 3088 160 3072 160
WIRE 2816 192 2800 192
WIRE 3024 192 3008 192
WIRE 2864 304 2864 208
WIRE 2992 304 2864 304
WIRE 3072 304 3072 208
WIRE 3072 304 2992 304
WIRE 3104 304 3072 304
WIRE 2992 320 2992 304
WIRE 3072 368 2992 368
WIRE 2944 400 2928 400
WIRE 2992 448 2992 416
WIRE 3008 496 2992 496
WIRE 2944 528 2928 528
WIRE 3008 544 3008 496
WIRE 3008 544 2992 544
WIRE 3072 544 3072 368
WIRE 3072 544 3008 544
WIRE 3008 576 3008 544
SYMBOL voltage 672 0 R90
WINDOW 0 -32 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName V1
SYMATTR Value 5V
SYMBOL res 720 160 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R1
SYMATTR Value 1k
SYMBOL res 656 352 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R2
SYMATTR Value 1k
SYMBOL res 592 528 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R3
SYMATTR Value 1k
SYMBOL res 528 752 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R4
SYMATTR Value 1k
SYMBOL res 720 464 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R5
SYMATTR Value 1k
SYMBOL res 656 608 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R6
SYMATTR Value 1k
SYMBOL res 592 752 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R7
SYMATTR Value 1k
SYMBOL Digital\\inv 1520 16 R0
SYMATTR InstName A1
SYMBOL Digital\\inv 1520 96 R0
SYMATTR InstName A2
SYMBOL Digital\\and 1904 128 R0
SYMATTR InstName A3
SYMBOL Digital\\and 1904 272 R0
SYMATTR InstName A4
SYMBOL Digital\\and 1904 400 R0
SYMATTR InstName A5
SYMBOL Digital\\and 1904 528 R0
SYMATTR InstName A6
SYMBOL voltage 1216 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 3V
SYMBOL Optos\\PC817B 2416 112 R0
SYMATTR InstName U1
SYMBOL Optos\\PC817B 2416 272 R0
SYMATTR InstName U2
SYMBOL Optos\\PC817B 2416 416 R0
SYMATTR InstName U3
SYMBOL pmos4 2816 112 R0
SYMATTR InstName M1
SYMATTR Value2 l=90n w=400n
SYMBOL pmos4 3024 112 R0
SYMATTR InstName M2
SYMATTR Value2 l=90n w=400n
SYMBOL nmos4 2944 320 R0
SYMATTR InstName M3
SYMATTR Value2 l=90n w=200n
SYMBOL nmos4 2944 448 R0
SYMATTR InstName M4
SYMATTR Value2 l=90n w=200n
FLAG 528 0 0
FLAG 448 768 0
FLAG 1216 240 0
FLAG 2800 192 VIN1
FLAG 3008 192 VIN2
FLAG 3008 576 0
FLAG 2928 400 VIN1
FLAG 2928 528 VIN2
FLAG 2880 80 VDD
FLAG 3104 304 VOUT
FLAG 3072 80 VDD
TEXT 362 -34 VRight 2 !.tran 10ms
TEXT 392 -88 Left 2 ;Driving Ref
TEXT 2288 -48 Left 2 ;Decorder?
TEXT 1432 -72 Left 2 ;Demux