In a programmable integrated circuit, a discharge circuit for discharging high voltage nodes provides a current path whose current is limited by a control voltage. In one embodiment, the current path is implemented by a transistor coupled to the high voltage nodes, with the control voltage provided by a current mirror coupled to the current path. The control voltage is applied across the gate and source terminals of the transistor. In one embodiment, the source terminal of the transistor is precharged to a supply voltage less a threshold voltage of a transistor. With the current in the current path thus limited, threshold voltage shifts and other damages to the functional circuit of the integrated circuit due to the discharge current of high voltage nodes are avoided.