205 Power Tree 5 V, 3.3 V, 1.8 V
205-power-tree-5v-3v3-1v8.mc describes a small multi-rail power tree.
The 5 V source creates V5V and GND. V5V feeds U_3V3.INPUT, and U_3V3.OUTPUT creates the V3V3 rail. V3V3 then feeds U_1V8.INPUT, and U_1V8.OUTPUT creates the V1V8 rail. Both regulators have their ground pins tied to GND. C_5V, C_3V3, and C_1V8 each connect their rail to GND as local bypass capacitors.
Parse 205-power-tree-5v-3v3-1v8.mc:
bash
eval "$(../mcc/scripts/mcc-slot.sh)"
MCC_SYSTEM_ROOT="$(cd .. && pwd)" "$MCC_BIN" --local parse 20-power-recipes/205-power-tree-5v-3v3-1v8.mc --lib mcode --pass1 --pass2Generate HTML for 205-power-tree-5v-3v3-1v8.mc:
bash
eval "$(../mcc/scripts/mcc-slot.sh)"
MCC_SYSTEM_ROOT="$(cd .. && pwd)" "$MCC_BIN" --local parse 20-power-recipes/205-power-tree-5v-3v3-1v8.mc --lib mcode --viz -o 20-power-recipes/205-power-tree-5v-3v3-1v8.htmlSource
text
// Example: Power Tree 5 V, 3.3 V, 1.8 V
// Goal: Show a small multi-rail power structure.
// Library focus: REG, CAP, DC.
use mcfam.power/reg.mc
module main
{
io GND
io V1V8
io V3V3
io V5V
DC.SRC PWR(5V, 1A)
REG.LDO U_3V3(3.3V, 0.5A, 5V, 0.3V)
REG.LDO U_1V8(1.8V, 0.3A, 3.3V, 0.2V)
CAP.MLCC C_5V(10uF, 10V)
CAP.MLCC C_3V3(4.7uF, 6.3V)
CAP.MLCC C_1V8(4.7uF, 6.3V)
PWR.1 -> V5V
PWR.2 -> GND
V5V -> C_5V -> GND
V5V -> U_3V3.Vin
U_3V3.Vout -> V3V3
U_3V3.GND -> GND
V3V3 -> C_3V3 -> GND
V3V3 -> U_1V8.Vin
U_1V8.Vout -> V1V8
U_1V8.GND -> GND
V1V8 -> C_1V8 -> GND
}