An adaptive signal-processing technique was developed which detects P-waves by first canceling out the QRS-T complexes. Use was made of an impulse correlated adaptive filter (ICAF), whose inputs are the ECG signal to be filtered (the primary signal), and an impulse train correlated in time with the QRS complex (the reference signal). The filter output is derived by minimizing the mean-squared error between the original ECG signal and an adaptively constructed QRS-T template using the least-mean-square algorithm. After several iterations, the filter weights converge to a template of the QRS-T complex. This template, when subtracted from the ECG signal, returns a remainder waveform comprising of P-waves. Results of a theoretical analysis of the ICAF and of simulations with ECG signals are presented.