Auto clamping diode