Embodiments include a heart stimulator that may be implanted in a heart ventricle and that includes a housing. The housing includes fixation elements that passively fix the heart stimulator in a heart ventricle and electrode poles that one or more of deliver stimulation pulses and sense electrical potentials. The housing includes an energy supply unit, a control unit connected to the energy supply unit, and a stimulation pulse generator connected to the control unit and the energy supply unit. A plurality of electrode poles are distributed on a surface of the housing and a switching matrix is connected between the electrode poles and the stimulation pulse generator, wherein the stimulation pulse generator is electrically connected via the switching matrix to different electrode poles depending on a switched state of the switching matrix.