cardiac rhythm management device could be controlled by custom logic circuitry either in addition to or instead of a programmed microprocessor as used herein the terms u201c circuitry u201d or u201c programmed controller u201d should be taken to encompass either custom circuitry i e dedicated hardware or processor executable instructions contained in a memory along with associated circuit elements fig2 shows a system diagram of a microprocessor based cardiac rhythm management device with pacing functionality that is suitable for delivering therapy to treat af and to extend the atrial effective refractory period the controller 10 of the device is a microprocessor that communicates with a memory 12 via a bidirectional data bus the memory 12 may comprise for example a rom read only memory for program storage and a ram random access memory for data storage the device has atrial sensing and pacing channels comprising electrodes 34 a b leads 33 a b sensing amplifiers 31 a b pulse generators 32 a b and atrial channel interfaces 30 a b which communicate bidirectionally with microprocessor 10 a ventricular sensing pacing channel comprising electrode 24 lead 23 sensing amplifier 21 pulse generator 22 and ventricular channel interface 20 is also provided the device may also have additional channels for.