A quite general model of the nonlinear interaction of two impulse systems describing some types of cardiac arrhythmias is developed. Taking into account a refractory time the phase locking phenomena are investigated. Effects of the tongue splitting and their interweaving in the parametric space are found. The results obtained allow us to predict the behavior of excitable systems with two pacemakers depending on the type and intensity of their interaction and the initial phase.