Resistor diode circuit