Skip to content

023 Input RC ESD ​

023-input-rc-esd.mc joins four things at ADC_IN: the series resistor output, the continuing ADC signal, a filter capacitor, and an ESD protection input. CAP.MLCC selects a multilayer ceramic capacitor. D_ESD.CATHODE connects to the protected signal while D_ESD.ANODE connects to ground, matching the current library's DIO.ESD.Protect wiring. Repeating ADC_IN and GND across the statements creates shared nodes, not separate nets with similar labels.

bash
eval "$(../mcc/scripts/mcc-slot.sh)"
MCC_SYSTEM_ROOT="$(cd .. && pwd)" "$MCC_BIN" --local parse 02-circuits-with-branches/023-input-rc-esd.mc --lib mcode --pass1 --pass2
MCC_SYSTEM_ROOT="$(cd .. && pwd)" "$MCC_BIN" --local parse 02-circuits-with-branches/023-input-rc-esd.mc --lib mcode --viz -o 02-circuits-with-branches/023-input-rc-esd.html

Source ​

text
// Example: Input RC ESD
// Goal: Share one protected input node between a filter capacitor and ESD diode.
// Library focus: RES, CAP, DIO.ESD.

module main
{
    io ADC_IN
    io GND
    io INPUT_EXT

    RES R_INPUT(100R, 50V)
    CAP.MLCC C_FILTER(1nF, 16V)
    DIO.ESD D_ESD(5V)   // partno "USBLC6" is BOM metadata; only core electrical formals are constructor params

    INPUT_EXT -> R_INPUT -> ADC_IN
    // Both protection parts begin at the same ADC_IN node.
    ADC_IN -> C_FILTER -> GND
    ADC_IN -> D_ESD.K
    D_ESD.A -> GND
}

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