Skip to content

203 LDO 5 V to 3.3 V ​

203-ldo-5v-to-3v3.mc describes a 5 V source feeding a 3.3 V LDO regulator.

The source positive pin creates the V5V rail, and the source ground pin creates GND. V5V connects to U_LDO.INPUT, U_LDO.OUTPUT creates V3V3, and U_LDO.GND connects to GND. C_IN bypasses V5V to GND, while C_OUT bypasses V3V3 to GND.

Parse 203-ldo-5v-to-3v3.mc:

bash
eval "$(../mcc/scripts/mcc-slot.sh)"
MCC_SYSTEM_ROOT="$(cd .. && pwd)" "$MCC_BIN" --local parse 20-power-recipes/203-ldo-5v-to-3v3.mc --lib mcode --pass1 --pass2

Generate HTML for 203-ldo-5v-to-3v3.mc:

bash
eval "$(../mcc/scripts/mcc-slot.sh)"
MCC_SYSTEM_ROOT="$(cd .. && pwd)" "$MCC_BIN" --local parse 20-power-recipes/203-ldo-5v-to-3v3.mc --lib mcode --viz -o 20-power-recipes/203-ldo-5v-to-3v3.html

Source ​

text
// Example: LDO 5 V to 3.3 V
// Goal: Convert a 5 V rail to a 3.3 V rail with an LDO.
// Library focus: REG.LDO, CAP, DC.

use mcfam.power/reg.mc

module main
{
    io GND
    io V3V3
    io V5V

    DC.SRC PWR(5V, 1A)
    REG.LDO U_LDO(3.3V, 0.5A, 5V, 0.3V)
    CAP.MLCC C_IN(1uF, 10V)
    CAP.MLCC C_OUT(1uF, 6.3V)

    PWR.1 -> V5V
    PWR.2 -> GND
    V5V -> U_LDO.Vin
    U_LDO.Vout -> V3V3
    U_LDO.GND -> GND
    V5V -> C_IN -> GND
    V3V3 -> C_OUT -> GND
}

MCode Bench is the public face of the MCode stack. Closed capabilities are served through the MCode gateway.