Negative capacitance effects in semiconductor diodes