Diode as a one way electronic switch