* Buck CCM 12V->6V, fsw=100kHz D=0.5 — Vout=D*Vin, ripple formulas
Vin in 0 DC 12
S1 in sw g 0 SWideal
Vg g 0 PULSE(0 5 0 1n 1n 5u 10u)
D1 0 sw Dfree
L1 sw out 100u
Co out 0 100u
Rload out 0 4
.model SWideal SW(Ron=1m Roff=1meg)
.model Dfree D(Vfwd=0)
.tran 6m
.end
