Neurostimulation is performed using electrical AC and/or DC stimulation pulses. Brain and/or spinal cord stimulation of a patient is achieved using an implanted neurostimulation device. Neurostimulation is performed using AC and/or DC stimulation pulses combined with a safe operation in DC mode by discharging build-up loads at the interfaces of the electrodes through short circuiting such stimulation electrodes with a counter electrode, for example a common ground electrode.