* Z:\home\khalils\Downloads\files\data\raw_asc\LTC4246.asc
* Generated by LTspice 26.0.1 for Windows.
* Right+Click over Bit Value below (eg b7=0) or Reg_04 on symbol (eg Reg_04=255) to change TH reg value\n \nCH0_THRESHOLD Register (0x04)
* ON pin models Enable Bit\nOnly one channel is modeled without SPI functionality
* ECB filter [7:6]\nECB filter [7:6] <-- 00=10us 01=20us 10=50us 11=100us\nFast 2x ECB: Fault if >2x ECB current threshold for 1us\nECB Thresh [4:0]\nECB Thresh [4:0]\nECB Thresh [4:0]\nECB Thresh [4:0]\nECB Thresh [4:0]<-- current threshold
* Library below included based on ModelFile attribute of instance XU1 (C:\users\khalils\AppData\Local\LTspice\lib\sym\PowerProducts\LTC4246.asy)
+8*if({b3}<1,0,1)+4*if({b2}<1,0,1)+2*if({b1}<1,0,1)+if({b0}<1,0,1)
V2 Vin 0 pwl(0 0 10n 12)
C1 Vout 0 10p
R1 Vout 0 10k
V5 N001 0 PULSE(0 1 .15m 20n 20n .2m 1m 1)
V1 Vdd 0 pwl(0 0 10n 5)
S2 0 Vout N001 0 SHORT
V3 Von 0 pulse(0 5 10u 5n 5n .35m .4 1)
XU1 Vin Vout _FLT Von Vdd 0 LTC4246 Reg_04={reg_04} ;pnba IN)OUT)FAULT#)ON)Vdd)GND
R3 Vdd _FLT 4.7k
.tran 500u
.param b7=1
.param b6=1
.param b5=1
.param b4=1
.param b3=1
.param b2=1
.param b1=1
.param b0=0
.param reg_04=128*if({b7}<1,0,1)+64*if({b6}<1,0,1)+32*if({b5}<1,0,1)+16*if({b4}<1,0,1)+
.model SHORT SW(Ron=4 Roff=1meg Vt=.5 Vh=-.4)
.lib LTC4246.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 2620 768
WIRE 1472 -336 880 -336
WIRE 1472 -304 1472 -336
WIRE 880 -208 880 -336
WIRE 1024 -208 880 -208
WIRE 1072 -208 1024 -208
WIRE 1408 -208 1360 -208
WIRE 1472 -208 1472 -224
WIRE 1472 -208 1408 -208
WIRE 880 -192 880 -208
WIRE 880 -96 880 -112
WIRE 992 -48 768 -48
WIRE 1072 -48 992 -48
WIRE 1408 -48 1360 -48
WIRE 1520 -48 1408 -48
WIRE 1600 -48 1520 -48
WIRE 1696 -48 1600 -48
WIRE 768 -32 768 -48
WIRE 1696 -32 1696 -48
WIRE 1520 -16 1520 -48
WIRE 1856 -16 1744 -16
WIRE 1600 0 1600 -48
WIRE 1856 0 1856 -16
WIRE 992 16 960 16
WIRE 1072 16 992 16
WIRE 960 64 960 16
WIRE 1424 64 1360 64
WIRE 1696 64 1696 48
WIRE 768 80 768 48
WIRE 1520 80 1520 64
WIRE 1600 80 1600 64
WIRE 1424 96 1424 64
WIRE 1856 96 1856 80
WIRE 960 176 960 144
SYMBOL cap 1584 0 R0
SYMATTR InstName C1
SYMATTR Value 10p
SYMBOL res 1504 -32 R0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL sw 1696 64 R180
WINDOW 0 -23 102 Right 2
WINDOW 3 -26 2 Right 2
SYMATTR InstName S2
SYMATTR Value SHORT
SYMBOL voltage 880 -208 R0
WINDOW 0 36 4 Top 2
WINDOW 3 102 111 Bottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value pwl(0 0 10n 5)
SYMBOL voltage 1856 -16 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V5
SYMATTR Value PULSE(0 1 .15m 20n 20n .2m 1m 1)
SYMBOL voltage 768 -48 R0
WINDOW 0 36 4 Top 2
WINDOW 3 92 115 Bottom 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value pwl(0 0 10n 12)
SYMBOL res 1456 -320 R0
SYMATTR InstName R3
SYMATTR Value 4.7k
SYMBOL voltage 960 48 R0
WINDOW 3 24 117 Left 2
SYMATTR Value pulse(0 5 10u 5n 5n .35m .4 1)
SYMATTR InstName V3
SYMBOL LTC4246 1216 -64 R0
SYMATTR InstName U1
FLAG 768 80 0
FLAG 1424 96 0
FLAG 960 176 0
FLAG 1520 80 0
FLAG 1600 80 0
FLAG 880 -96 0
FLAG 992 -48 Vin
FLAG 992 16 Von
FLAG 1408 -48 Vout
FLAG 1696 64 0
FLAG 1744 32 0
FLAG 1856 96 0
FLAG 1408 -208 _FLT
FLAG 1024 -208 Vdd
TEXT 1592 -136 Left 2 !.tran 500u
TEXT 896 392 Left 2 !.param b7=1\n.param b6=1\n.param b5=1\n.param b4=1\n.param b3=1\n.param b2=1\n.param b1=1\n.param b0=0\n \n.param reg_04=128*if({b7}<1,0,1)+64*if({b6}<1,0,1)+32*if({b5}<1,0,1)+16*if({b4}<1,0,1)+\n+8*if({b3}<1,0,1)+4*if({b2}<1,0,1)+2*if({b1}<1,0,1)+if({b0}<1,0,1)
TEXT 1592 -96 Left 2 !.model SHORT SW(Ron=4 Roff=1meg Vt=.5 Vh=-.4)
TEXT 896 288 Left 2 ;Right+Click over Bit Value below (eg b7=0) or Reg_04 on symbol (eg Reg_04=255) to change TH reg value\n \nCH0_THRESHOLD Register (0x04)
TEXT 1600 -200 Left 2 ;ON pin models Enable Bit\nOnly one channel is modeled without SPI functionality
TEXT 1104 392 Left 2 ;ECB filter [7:6]\nECB filter [7:6] <-- 00=10us 01=20us 10=50us 11=100us\nFast 2x ECB: Fault if >2x ECB current threshold for 1us\nECB Thresh [4:0]\nECB Thresh [4:0]\nECB Thresh [4:0]\nECB Thresh [4:0]\nECB Thresh [4:0]<-- current threshold