* Z:\home\khalils\Downloads\files\data\raw_asc\AD8452.asc
* Generated by LTspice 26.0.1 for Windows.
* Simple Battery Model
* Voltage Setpoint
* Current Setpoint
* Charge CC Loop
* Discharge CC Loop
* Charge CV Loop
* Discharge CV Loop
* Mode
* Enable
* Library below included based on ModelFile attribute of instance XU1 (C:\users\khalils\AppData\Local\LTspice\lib\sym\SpecialFunctions\AD8452.asy)
C10 0 N036 1n
R20 N024 N029 10K
V6 N009 0 1.98
C13 N033 N040 1n
R1 0 N013 4.02K
R8 N006 N004 1K
R7 N024 N027 10K
R28 N020 BATT 10K
R12 N002 N001 64.9K
R21 N012 N011 5m
R27 N044 N041 121K
R2 0 N015 100K
V2 N028 0 -5
R6 N024 N026 10K
C19 N033 N041 39p
C15 N023 0 500p
R13 N005 N002 15K
C6 N003 N002 270p
C20 N033 N044 1n
R19 N040 N035 121K
D1 N023 N019 BD
V3 N019 0 12
R5 N024 N025 499K
C1 0 ss 10n
XU1 0 0 MP_01 N017 N020 BATT MP_02 0 MP_03 0 MP_04 0 N028 N032 N034 N038 N042 N041 N035 N033 MP_05 N031 N030 N029 N027 N026 N025 N024 N019 N022 N021 0 N018 ss N016 N015 N013 N012 N011 N010 N003 N007 N002 N004 N009 MP_06 0 N014 AD8452 ;pnba Isrefh)Isrefl))Isvp)Isvn)Bvp))Bvn))Bvrefl))Bvrefh)AVee)Vset)VVP0)Bvmea)Vsetb)Vve0)Vve1)Vint_CV))Mode)EN)Fault)CLflg)Sync)Scfg)Vreg)Vin)DL)DH)Dgnd)DT)SS)Dmax)Freq)CLvt)CLp)CLn)AVcc)Vint_CC)Ive1)Ive0)Ismea)Iset))Agnd)Vref
S2 0 N023 N022 0 FET_SW
C14 N019 N023 500p
R3 0 N016 499K
V1 N010 0 12
R9 N007 N006 64.9K
R17 N039 N038 6.65K
S1 N023 N019 N021 0 FET_SW
R22 N011 BATT 3m
R4 0 N018 10K
V7 N032 0 1.68
R14 N037 N038 6.65K
R26 N041 N043 78.7K
R11 N001 N004 1K
R25 N043 N042 6.65K
C3 N003 N007 270p
R10 N008 N007 15K
C5 N002 N001 1n
C18 N041 N043 560p
R16 N036 N034 121K
C9 0 N034 39p
C12 N033 N035 39p
C2 N007 N006 1n
R24 N014 0 10K
C23 N020 0 100p
C4 N003 N008 2n
C16 N011 0 150 x4
V4 N031 0 5
C7 N003 N005 2n
R15 N034 N037 78.7K
L1 N023 N012 6.8 Rser=5m
C22 0 N017 100p
C11 N035 N039 560p
R18 N035 N039 78.7K
D2 0 N023 BD
C21 N017 N020 1n
C8 N034 N037 560p
V5 N030 0 5
R23 N017 N011 10K
C17 BATT 0 .3 Rser=10m
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.ic V(batt)=3.2
.tran 50m
.model FET_SW SW(Ron=2m Roff=1G Vt=2 Vh=50m)
.model BD D(Ron=10m Roff=1G epsilon=10m Vfwd=0.35)
.lib AD8452.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 2420 1432
WIRE 352 -736 336 -736
WIRE 448 -736 416 -736
WIRE 528 -736 448 -736
WIRE 656 -736 592 -736
WIRE 240 -656 160 -656
WIRE 336 -656 336 -736
WIRE 336 -656 320 -656
WIRE 352 -656 336 -656
WIRE 448 -656 448 -736
WIRE 448 -656 432 -656
WIRE 464 -656 448 -656
WIRE 576 -656 544 -656
WIRE 656 -656 656 -736
WIRE 656 -656 640 -656
WIRE 448 -592 448 -656
WIRE 448 -592 208 -592
WIRE 352 -544 336 -544
WIRE 448 -544 416 -544
WIRE 528 -544 448 -544
WIRE 656 -544 656 -656
WIRE 656 -544 592 -544
WIRE 160 -464 160 -656
WIRE 240 -464 160 -464
WIRE 336 -464 336 -544
WIRE 336 -464 320 -464
WIRE 352 -464 336 -464
WIRE 448 -464 448 -544
WIRE 448 -464 432 -464
WIRE 464 -464 448 -464
WIRE 576 -464 544 -464
WIRE 656 -464 656 -544
WIRE 656 -464 640 -464
WIRE 448 -384 448 -464
WIRE 448 -384 256 -384
WIRE 112 -352 -496 -352
WIRE 656 -352 656 -464
WIRE 656 -352 304 -352
WIRE -496 -336 -496 -352
WIRE 16 -320 -176 -320
WIRE -176 -304 -176 -320
WIRE 1648 -304 400 -304
WIRE 1536 -272 448 -272
WIRE -496 -240 -496 -256
WIRE -176 -208 -176 -224
WIRE 528 -208 496 -208
WIRE 640 -208 608 -208
WIRE -32 -176 -224 -176
WIRE -224 -144 -224 -176
WIRE -32 -144 -32 -176
WIRE 16 -144 16 -320
WIRE 64 -144 64 -176
WIRE 112 -144 112 -352
WIRE 160 -144 160 -464
WIRE 208 -144 208 -592
WIRE 256 -144 256 -384
WIRE 304 -144 304 -352
WIRE 400 -144 400 -304
WIRE 448 -144 448 -272
WIRE 496 -144 496 -208
WIRE -224 -32 -224 -64
WIRE -144 -32 -224 -32
WIRE 624 -32 592 -32
WIRE 816 -32 704 -32
WIRE -224 16 -224 -32
WIRE -144 16 -224 16
WIRE 704 16 592 16
WIRE 816 16 784 16
WIRE -224 48 -224 16
WIRE 608 64 592 64
WIRE 624 64 608 64
WIRE 816 64 688 64
WIRE -416 80 -496 80
WIRE -304 80 -304 64
WIRE -304 80 -336 80
WIRE -144 80 -304 80
WIRE -304 96 -304 80
WIRE 704 112 592 112
WIRE 816 112 784 112
WIRE 1056 160 592 160
WIRE 1456 160 1056 160
WIRE -416 176 -464 176
WIRE -304 176 -304 160
WIRE -304 176 -336 176
WIRE -144 176 -304 176
WIRE 1056 176 1056 160
WIRE 1200 176 1056 176
WIRE 1280 176 1200 176
WIRE 1456 176 1456 160
WIRE -304 192 -304 176
WIRE 1056 192 1056 176
WIRE 1200 192 1200 176
WIRE 1280 192 1280 176
WIRE 1008 208 592 208
WIRE 912 256 592 256
WIRE 1456 272 1456 256
WIRE -144 288 -432 288
WIRE 1056 288 1056 272
WIRE 1200 288 1200 256
WIRE 1200 288 1056 288
WIRE 1280 288 1280 256
WIRE 1280 288 1200 288
WIRE 608 304 592 304
WIRE 1056 320 1056 288
WIRE 1360 320 1056 320
WIRE 1536 320 1536 -272
WIRE 1536 320 1440 320
WIRE 1552 320 1536 320
WIRE 1648 320 1648 -304
WIRE 1648 320 1632 320
WIRE 1712 320 1648 320
WIRE 1808 320 1712 320
WIRE 1824 320 1808 320
WIRE 1920 320 1904 320
WIRE 2064 320 1920 320
WIRE 1712 336 1712 320
WIRE 2064 336 2064 320
WIRE 2064 336 1984 336
WIRE 864 352 592 352
WIRE 1056 352 1056 320
WIRE 1200 352 1056 352
WIRE 1280 352 1200 352
WIRE 2064 352 2064 336
WIRE 1056 368 1056 352
WIRE 1200 368 1200 352
WIRE -144 384 -400 384
WIRE 912 384 912 256
WIRE 1008 384 912 384
WIRE 1280 384 1280 352
WIRE 640 400 592 400
WIRE 864 400 864 352
WIRE 864 400 720 400
WIRE -144 448 -192 448
WIRE 704 448 592 448
WIRE 864 448 864 400
WIRE 864 448 784 448
WIRE 1712 448 1712 400
WIRE 2064 448 2064 416
WIRE 2064 448 2032 448
WIRE 1056 464 1056 448
WIRE 1200 464 1200 432
WIRE 1200 464 1056 464
WIRE 1280 464 1280 448
WIRE 1280 464 1200 464
WIRE 2064 464 2064 448
WIRE 1056 480 1056 464
WIRE -192 496 -192 448
WIRE -144 496 -192 496
WIRE 768 496 592 496
WIRE 864 496 864 448
WIRE 864 496 848 496
WIRE -192 528 -192 496
WIRE -32 656 -32 624
WIRE 496 672 496 624
WIRE 688 672 496 672
WIRE 864 672 864 496
WIRE 864 672 768 672
WIRE 448 720 448 624
WIRE 1056 720 448 720
WIRE 1056 736 1056 720
WIRE -32 768 -32 736
WIRE 400 784 400 624
WIRE 976 784 400 784
WIRE 1056 832 1056 816
WIRE 16 848 16 624
WIRE 16 848 -768 848
WIRE 304 848 304 624
WIRE 656 848 304 848
WIRE 64 864 64 624
WIRE 64 864 -112 864
WIRE 256 864 256 624
WIRE 448 864 256 864
WIRE -768 880 -768 848
WIRE 976 880 976 784
WIRE -304 944 -320 944
WIRE -208 944 -240 944
WIRE -112 944 -112 864
WIRE -112 944 -128 944
WIRE -96 944 -112 944
WIRE 0 944 -16 944
WIRE 16 944 0 944
WIRE 112 944 112 624
WIRE 112 944 96 944
WIRE 240 944 112 944
WIRE 336 944 320 944
WIRE 352 944 336 944
WIRE 448 944 448 864
WIRE 448 944 432 944
WIRE 464 944 448 944
WIRE 576 944 544 944
WIRE 656 944 656 848
WIRE 656 944 640 944
WIRE -768 976 -768 960
WIRE 976 976 976 960
WIRE -320 1024 -320 944
WIRE -256 1024 -320 1024
WIRE -112 1024 -112 944
WIRE -112 1024 -192 1024
WIRE -80 1024 -112 1024
WIRE 0 1024 0 944
WIRE 0 1024 -16 1024
WIRE 336 1024 336 944
WIRE 352 1024 336 1024
WIRE 448 1024 448 944
WIRE 448 1024 416 1024
WIRE 528 1024 448 1024
WIRE 656 1024 656 944
WIRE 656 1024 592 1024
WIRE -320 1056 -320 1024
WIRE 208 1104 208 624
WIRE 400 1104 208 1104
WIRE 160 1152 160 624
WIRE 192 1152 160 1152
WIRE 288 1152 272 1152
WIRE 304 1152 288 1152
WIRE 400 1152 400 1104
WIRE 400 1152 384 1152
WIRE 432 1152 400 1152
WIRE 528 1152 512 1152
WIRE 608 1152 592 1152
WIRE 656 1152 656 1024
WIRE 656 1152 608 1152
WIRE 288 1232 288 1152
WIRE 304 1232 288 1232
WIRE 400 1232 400 1152
WIRE 400 1232 368 1232
WIRE 480 1232 400 1232
WIRE 608 1232 608 1152
WIRE 608 1232 544 1232
WIRE -400 1296 -400 384
WIRE 2032 1296 2032 448
WIRE 2032 1296 -400 1296
WIRE -432 1328 -432 288
WIRE 1984 1328 1984 336
WIRE 1984 1328 -432 1328
WIRE -464 1360 -464 176
WIRE 1920 1360 1920 320
WIRE 1920 1360 -464 1360
WIRE -496 1392 -496 80
WIRE 1808 1392 1808 320
WIRE 1808 1392 -496 1392
LINE Normal -352 1280 -352 896 2
LINE Normal 672 1280 -352 1280 2
LINE Normal 672 1088 672 1280 2
LINE Normal 224 1088 672 1088 2
LINE Normal 224 896 224 1088 2
LINE Normal -352 896 224 896 2
RECTANGLE Normal 2384 528 2016 352 2
RECTANGLE Normal -240 -192 -544 -384 2
RECTANGLE Normal -528 1008 -816 832 2
RECTANGLE Normal 912 -416 144 -608 2
RECTANGLE Normal 912 -608 144 -784 2
RECTANGLE Normal 896 1088 224 832 2
SYMBOL sw 1056 464 M180
WINDOW 0 24 93 Left 2
WINDOW 3 23 19 Left 2
SYMATTR InstName S2
SYMATTR Value FET_SW
SYMBOL diode 1184 256 M180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D1
SYMATTR Value BD
SYMBOL cap -80 1040 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C8
SYMATTR Value 560p
SYMBOL cap 1264 192 R0
SYMATTR InstName C14
SYMATTR Value 500p
SYMBOL sw 1056 288 M180
WINDOW 0 28 89 Left 2
WINDOW 3 22 20 Left 2
SYMATTR InstName S1
SYMATTR Value FET_SW
SYMBOL cap 640 -480 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C4
SYMATTR Value 2n
SYMBOL cap -320 96 R0
SYMATTR InstName C21
SYMATTR Value 1n
SYMBOL cap 592 -752 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C6
SYMATTR Value 270p
SYMBOL res 784 656 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R20
SYMATTR Value 10K
SYMBOL res -240 -160 R0
SYMATTR InstName R24
SYMATTR Value 10K
SYMBOL cap 688 48 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C1
SYMATTR Value 10n
SYMBOL res 288 1168 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R25
SYMATTR Value 6.65K
SYMBOL cap -320 0 R0
SYMATTR InstName C22
SYMATTR Value 100p
SYMBOL res 448 -672 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R12
SYMATTR Value 64.9K
SYMBOL res 800 432 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R6
SYMATTR Value 10K
SYMBOL cap -304 960 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C10
SYMATTR Value 1n
SYMBOL cap -256 1040 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C9
SYMATTR Value 39p
SYMBOL res -224 960 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R16
SYMATTR Value 121K
SYMBOL AD8452 208 240 R0
SYMATTR InstName U1
SYMBOL res 0 960 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R14
SYMATTR Value 6.65K
SYMBOL res 720 -48 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R2
SYMATTR Value 100K
SYMBOL res 1808 336 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R22
SYMATTR Value 3m
SYMBOL res 800 96 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 10K
SYMBOL res 736 384 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R5
SYMATTR Value 499K
SYMBOL res 528 1168 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R27
SYMATTR Value 121K
SYMBOL voltage -176 -320 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 12
SYMBOL cap 1264 384 R0
SYMATTR InstName C15
SYMATTR Value 500p
SYMBOL res 336 960 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R17
SYMATTR Value 6.65K
SYMBOL cap 416 1040 M270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C11
SYMATTR Value 560p
SYMBOL cap 416 -560 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C2
SYMATTR Value 1n
SYMBOL res 448 -480 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R9
SYMATTR Value 64.9K
SYMBOL cap 640 -672 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C7
SYMATTR Value 2n
SYMBOL voltage 1456 160 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V3
SYMATTR Value 12
SYMBOL res 560 -480 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R10
SYMATTR Value 15K
SYMBOL voltage -32 640 R0
WINDOW 0 10 15 Left 2
WINDOW 3 10 96 Left 2
WINDOW 123 24 138 Left 2
WINDOW 39 24 117 Left 2
SYMATTR InstName V2
SYMATTR Value -5
SYMBOL voltage -768 864 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V7
SYMATTR Value 1.68
SYMBOL voltage -496 -352 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V6
SYMATTR Value 1.98
SYMBOL cap 592 -560 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C3
SYMATTR Value 270p
SYMBOL diode 1184 432 M180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMATTR Value BD
SYMBOL res 624 -224 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 4.02K
SYMBOL cap 368 1248 M270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C18
SYMATTR Value 560p
SYMBOL res 800 0 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 499K
SYMBOL voltage 976 864 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V4
SYMATTR Value 5
SYMBOL cap 592 1168 M270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C20
SYMATTR Value 1n
SYMBOL res -320 160 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R28
SYMATTR Value 10K
SYMBOL res 560 960 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R19
SYMATTR Value 121K
SYMBOL res 336 -672 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R11
SYMATTR Value 1K
SYMBOL ind 1344 336 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 5 56 VBottom 2
WINDOW 39 -23 56 VBottom 2
SYMATTR InstName L1
SYMATTR Value 6.8
SYMATTR SpiceLine Rser=5m
SYMBOL cap 592 1040 M270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C12
SYMATTR Value 39p
SYMBOL res 560 -672 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R13
SYMATTR Value 15K
SYMBOL cap 416 -752 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName C5
SYMATTR Value 1n
SYMBOL cap -320 192 R0
SYMATTR InstName C23
SYMATTR Value 100p
SYMBOL cap 640 960 M270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C13
SYMATTR Value 1n
SYMBOL cap 2048 352 R0
WINDOW 39 24 84 Left 2
SYMATTR SpiceLine Rser=10m
SYMATTR InstName C17
SYMATTR Value .3
SYMBOL res 1536 336 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R21
SYMATTR Value 5m
SYMBOL cap 1696 336 R0
WINDOW 3 27 50 Left 2
WINDOW 39 27 81 Left 2
SYMATTR Value 150
SYMATTR SpiceLine x4
SYMATTR InstName C16
SYMBOL res 400 1168 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R26
SYMATTR Value 78.7K
SYMBOL res 448 960 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R18
SYMATTR Value 78.7K
SYMBOL cap 544 1248 M270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName C19
SYMATTR Value 39p
SYMBOL res -320 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R23
SYMATTR Value 10K
SYMBOL res 336 -480 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R8
SYMATTR Value 1K
SYMBOL voltage 1056 720 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V5
SYMATTR Value 5
SYMBOL res -112 960 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R15
SYMATTR Value 78.7K
SYMBOL res 864 480 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R7
SYMATTR Value 10K
FLAG 608 304 0
FLAG 64 -176 0
FLAG -176 -208 0
FLAG -32 768 0
FLAG -224 48 0
FLAG -192 528 0
FLAG 640 -208 0
FLAG 1456 272 0
FLAG 1056 480 0
FLAG 1008 256 0
FLAG 1008 432 0
FLAG 1712 448 0
FLAG 2064 464 0
FLAG 2064 320 BATT
FLAG -496 -240 0
FLAG -768 976 0
FLAG -320 1056 0
FLAG 1056 832 0
FLAG 976 976 0
FLAG 816 -32 0
FLAG 816 16 0
FLAG 816 64 0
FLAG 816 112 0
FLAG -304 256 0
FLAG -304 0 0
FLAG 608 64 ss
TEXT 2112 512 Left 2 ;Simple Battery Model
TEXT 2128 472 Left 2 !.ic V(batt)=3.2
TEXT 960 1072 Left 2 !.tran 50m\n.model FET_SW SW(Ron=2m Roff=1G Vt=2 Vh=50m)\n.model BD D(Ron=10m Roff=1G epsilon=10m Vfwd=0.35)
TEXT -728 928 Left 2 ;Voltage Setpoint
TEXT -448 -288 Left 2 ;Current Setpoint
TEXT 704 -488 Left 2 ;Charge CC Loop
TEXT 696 -688 Left 2 ;Discharge CC Loop
TEXT 704 944 Left 2 ;Charge CV Loop
TEXT -136 1144 Left 2 ;Discharge CV Loop
TEXT 1016 920 Left 2 ;Mode
TEXT 1096 776 Left 2 ;Enable