A device including circuits able to control the switching of a AAI mode in a DDD mode, and conversely the return of DDD mode to AAI mode, according to predetermined criteria of detection of atrio-ventricular block (AVB) of the first, second, or third degree and of ventricular pause.