an active implantable medical device , such as a double chamber pacemaker or defibrillator or cardiovertor , having an improved adjustment of atrial sensitivity and of atrial stimulation energy . this device includes control algorithms for suspecting a loss of atrial detection and / or atrial capture that operates by analysis of a sequence of detected stimulations and ventricular and atrial detections . the following conditions are detected : an absence of ventricular activity post - atrial stimulation ; and / or a lengthening , beyond a given limit , of the atrio - ventricular conduction delay over a predetermined number of successive cardiac cycles ; and / or an occurrence of an atrial detection consecutive to an atrial stimulation over a predetermined number of successive cardiac cycles ; and / or a ventricular extrasystole ; and / or reduction , below a given limit , of a delay between atrial stimulation and ventricular detection ; and / or the passage of an atrial detection to an atrial stimulation with concomitant reduction , below a given limit , of the delay between atrial event and ventricular detection . the atrial detection threshold and / or the atrial stimulation energy are adjusted , preferably stepwise , according to the detected conditions to provide improved patient care .