024 Simple Power Branch
024-simple-power-branch.mc feeds a bypass capacitor and an LED indicator from V3V3. It introduces an explicit branch group:
text
V3V3 -> (
C_BYPASS -> GND,
R_LED -> D_STATUS.ANODE
)
D_STATUS.CATHODE -> GNDThe parentheses group paths that start at the same incoming node. The comma separates parallel branches; it does not connect the capacitor branch to the LED branch in sequence. The LED branch then finishes with an explicit cathode connection so the diode polarity stays readable.
bash
eval "$(../mcc/scripts/mcc-slot.sh)"
MCC_SYSTEM_ROOT="$(cd .. && pwd)" "$MCC_BIN" --local parse 02-circuits-with-branches/024-simple-power-branch.mc --lib mcode --pass1 --pass2
MCC_SYSTEM_ROOT="$(cd .. && pwd)" "$MCC_BIN" --local parse 02-circuits-with-branches/024-simple-power-branch.mc --lib mcode --viz -o 02-circuits-with-branches/024-simple-power-branch.htmlSource
text
// Example: Simple Power Branch
// Goal: Feed two loads from one named supply rail.
// Library focus: DC, RES, LED, CAP.
module main
{
io GND
io V3V3
DC.SRC PWR(3.3V, 200mA)
CAP.MLCC C_BYPASS(100nF, 10V)
RES R_LED(330R, 50V)
LED D_STATUS(2.0V, 10mA)
PWR.1 -> V3V3
PWR.2 -> GND
// Parentheses group two comma-separated paths that start at V3V3.
V3V3 -> (
C_BYPASS -> GND,
R_LED -> D_STATUS.A
)
D_STATUS.K -> GND
}