Methods and apparatus for treating fibrillation utilize biphasic waveforms. A cardiac stimulator includes a defibrillation circuit that uses a pulse width modulated capacitive discharge to generate various biphasic waveforms, one or more of which may be delivered to the heart to treat the fibrillation.