Abstract: An apparatus for treating impotence incorporating a pulse generator and a lead for carrying electrical pulses from the pulse generator to the cavernous nerve. The pulse generator includes a magnetically actuated switching mechanism for extending battery life. One version of the pulse generator is programmable so that the width, frequency and amplitude can be varied.