An implantable device for providing pacing and defibrillating stimuli to a heart, comprises: a power source, at least one electrode electrically connected to said power source, a sensor capable of providing data that can be used to determine a physiological pacing demand, and a control device. The control device controls the application of electrical stimuli to the heart. The control device calculates an adjusted pacing interval based on said demand, calculates an adjusted ventricular pace refractory period (VPRPc„rre„t) that is a function of said pacing interval, and calculates a T-wave monitoring window. The end time, and optionally the start time also, of the T-wave window is a function of the pacing interval. The control device is also capable of adjusting the sensitivity of an amplifier based on signals received during the T-wave window.
23 Claims, 4 Drawing Sheets