* Z:\tmp\asc_mix_bvbm4pog\mix_252.asc
* Generated by LTspice 26.0.1 for Windows.
M1 N001 N003 0 N004 PMOS
VGS N003 0 -5
VDS N001 0 -5
V1 +V 0 PWL(0 0 1 3.3)
R1 +V N002 4.32Meg
XU1 0 0 N002 N005 N005 N005 +V OUT LTC1540 ;pnba GND)V-)In+)In-)HYST)REF)V+)OUT
R2 N002 0 3Meg
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.MODEL CMOSP PMOS ( LEVEL = 49
+VERSION = 3.1 TNOM = 27 TOX = 4.1E-9
+XJ = 1E-7 NCH = 4.1589E17 VTH0 = -1
+K1 = 0.5341312 K2 = 0.0395326 K3 = 0
+K3B = 7.4916211 W0 = 1E-6 NLX = 1.194072E-7
+DVT0W = 0 DVT1W = 0 DVT2W = 0
+DVT0 = 0.5060555 DVT1 = 0.2423835 DVT2 = 0.1
+U0 = 115.6894042 UA = 1.573746E-9 UB = 1.874308E-21
+UC = -1E-10 VSAT = 1.130982E5 A0 = 1.9976555
+AGS = 0.4186945 B0 = 1.949178E-7 B1 = 6.422908E-7
+KETA = 0.0166345 A1 = 0.4749146 A2 = 0.300003
+RDSW = 198.321294 PRWG = 0.5 PRWB = -0.4986647
+WR = 1 WINT = 0 LINT = 2.94454E-8
+XL = 0 XW = -1E-8 DWG = -2.798724E-8
+DWB = -4.83797E-10 VOFF = -0.095236 NFACTOR = 2
+CIT = 0 CDSC = 2.4E-4 CDSCD = 0
+CDSCB = 0 ETA0 = 1.035504E-3 ETAB = -4.358398E-4
+DSUB = 1.816555E-3 PCLM = 1.3299898 PDIBLC1 = 1.766563E-3
+PDIBLC2 = 7.728395E-7 PDIBLCB = -1E-3 DROUT = 1.011891E-3
+PSCBE1 = 4.872184E10 PSCBE2 = 5E-10 PVAG = 0.0209921
+DELTA = 0.01 RSH = 7.7 MOBMOD = 1
+PRT = 0 UTE = -1.5 KT1 = -0.11
+KT1L = 0 KT2 = 0.022 UA1 = 4.31E-9
+UB1 = -7.61E-18 UC1 = -5.6E-11 AT = 3.3E4
+WL = 0 WLN = 1 WW = 0
+WWN = 1 WWL = 0 LL = 0
+LLN = 1 LW = 0 LWN = 1
+LWL = 0 CAPMOD = 2 XPART = 0.5
+CGDO = 6.35E-10 CGSO = 6.35E-10 CGBO = 1E-12
+CJ = 1.144521E-3 PB = 0.8468686 MJ = 0.4099522
+CJSW = 2.490749E-10 PBSW = 0.8769118 MJSW = 0.3478565
+CJSWG = 4.22E-10 PBSWG = 0.8769118 MJSWG = 0.3478565
+CF = 0 PVTH0 = 2.302018E-3 PRDSW = 9.0575312
+PK2 = 1.821914E-3 WKETA = 0.0222457 LKETA = -1.495872E-3
+PU0 = -1.5580645 PUA = -6.36889E-11 PUB = 1E-21
+PVSAT = 49.8420442 PETA0 = 2.827793E-5 PKETA = -2.536564E-3
+ NOIMOD=2.0E+00 NOIA=3.57456993317604E+18 NOIB=2500
+ NOIC=2.61260020285845E-11 EF=1.1388 EM=41000000 )
.dc VDS 0 -5 0.01 VGS 0 -5 2
* Nanopower 2.9V Vcc Threshold Detector
* Library below included based on ModelFile attribute of instance XU1 (C:\users\khalils\AppData\Local\LTspice\lib\sym\Comparators\LTC1540.asy)
.lib LTC.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1648 608
WIRE 368 80 272 80
WIRE 272 144 272 80
WIRE 272 144 192 144
WIRE 144 224 64 224
WIRE 192 224 192 192
WIRE 992 80 768 80
WIRE 1248 80 992 80
WIRE 992 96 992 80
WIRE 768 128 768 80
WIRE 1248 144 1248 80
WIRE 992 192 992 176
WIRE 1152 192 992 192
WIRE 992 208 992 192
WIRE 1360 208 1312 208
WIRE 1152 224 1184 192
WIRE 1184 224 1152 192
WIRE 768 240 768 208
WIRE 1152 256 1152 224
WIRE 1184 256 1152 256
WIRE 1152 288 1152 256
WIRE 1184 288 1152 288
WIRE 992 304 992 288
WIRE 1216 368 1216 336
WIRE 1280 368 1280 336
SYMBOL pmos4 144 144 R0
SYMATTR InstName M1
SYMBOL voltage 64 208 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VGS
SYMATTR Value -5
SYMBOL voltage 368 64 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VDS
SYMATTR Value -5
SYMBOL voltage 768 112 R0
SYMATTR InstName V1
SYMATTR Value PWL(0 0 1 3.3)
SYMBOL res 976 80 R0
SYMATTR InstName R1
SYMATTR Value 4.32Meg
SYMBOL Comparators\\LTC1540 1248 144 R0
SYMATTR InstName U1
SYMBOL res 976 192 R0
SYMATTR InstName R2
SYMATTR Value 3Meg
FLAG 192 240 0
FLAG 64 304 0
FLAG 368 160 0
FLAG 768 240 0
FLAG 1248 80 +V
FLAG 1216 368 0
FLAG 1280 368 0
FLAG 992 304 0
FLAG 1360 208 OUT
TEXT 304 240 Left 2 !.MODEL CMOSP PMOS (                                LEVEL   = 49\n+VERSION = 3.1            TNOM    = 27             TOX     = 4.1E-9\n+XJ      = 1E-7           NCH     = 4.1589E17      VTH0    = -1\n+K1      = 0.5341312      K2      = 0.0395326      K3      = 0\n+K3B     = 7.4916211      W0      = 1E-6           NLX     = 1.194072E-7\n+DVT0W   = 0              DVT1W   = 0              DVT2W   = 0\n+DVT0    = 0.5060555      DVT1    = 0.2423835      DVT2    = 0.1\n+U0      = 115.6894042    UA      = 1.573746E-9    UB      = 1.874308E-21\n+UC      = -1E-10         VSAT    = 1.130982E5     A0      = 1.9976555\n+AGS     = 0.4186945      B0      = 1.949178E-7    B1      = 6.422908E-7\n+KETA    = 0.0166345      A1      = 0.4749146      A2      = 0.300003\n+RDSW    = 198.321294     PRWG    = 0.5            PRWB    = -0.4986647\n+WR      = 1              WINT    = 0              LINT    = 2.94454E-8\n+XL      = 0              XW      = -1E-8          DWG     = -2.798724E-8\n+DWB     = -4.83797E-10   VOFF    = -0.095236      NFACTOR = 2\n+CIT     = 0              CDSC    = 2.4E-4         CDSCD   = 0\n+CDSCB   = 0              ETA0    = 1.035504E-3    ETAB    = -4.358398E-4\n+DSUB    = 1.816555E-3    PCLM    = 1.3299898      PDIBLC1 = 1.766563E-3\n+PDIBLC2 = 7.728395E-7    PDIBLCB = -1E-3          DROUT   = 1.011891E-3\n+PSCBE1  = 4.872184E10    PSCBE2  = 5E-10          PVAG    = 0.0209921\n+DELTA   = 0.01           RSH     = 7.7            MOBMOD  = 1\n+PRT     = 0              UTE     = -1.5           KT1     = -0.11\n+KT1L    = 0              KT2     = 0.022          UA1     = 4.31E-9\n+UB1     = -7.61E-18      UC1     = -5.6E-11       AT      = 3.3E4\n+WL      = 0              WLN     = 1              WW      = 0\n+WWN     = 1              WWL     = 0              LL      = 0\n+LLN     = 1              LW      = 0              LWN     = 1\n+LWL     = 0              CAPMOD  = 2              XPART   = 0.5\n+CGDO    = 6.35E-10       CGSO    = 6.35E-10       CGBO    = 1E-12\n+CJ      = 1.144521E-3    PB      = 0.8468686      MJ      = 0.4099522\n+CJSW    = 2.490749E-10   PBSW    = 0.8769118      MJSW    = 0.3478565\n+CJSWG   = 4.22E-10       PBSWG   = 0.8769118      MJSWG   = 0.3478565\n+CF      = 0              PVTH0   = 2.302018E-3    PRDSW   = 9.0575312\n+PK2     = 1.821914E-3    WKETA   = 0.0222457      LKETA   = -1.495872E-3\n+PU0     = -1.5580645     PUA     = -6.36889E-11   PUB     = 1E-21\n+PVSAT   = 49.8420442     PETA0   = 2.827793E-5    PKETA   = -2.536564E-3 \n+ NOIMOD=2.0E+00                                NOIA=3.57456993317604E+18                       NOIB=2500\n+ NOIC=2.61260020285845E-11     EF=1.1388                                                       EM=41000000 )
TEXT 488 168 Left 2 !.dc VDS 0 -5 0.01 VGS 0 -5 2
TEXT 696 264 Left 0 !.tran 1
TEXT 560 48 Bottom 0 ;Nanopower 2.9V Vcc Threshold Detector