There are a number of complete ECG simulator schematic diagrams (+ PIC code where applicable) in:
D. Prutchi and M. Norris, Design and Development of Medical Electronic Instrumentation - A Practical Perspective of the Design, Construction and Test of Medical Devices, ISBN: 0-471-67623-3, 450 pages, John Wiley & Sons, Inc., Hoboken, NJ, November 2004.
More specifically, Chapter VI includes details on the construction of biopotential amplifier calibration signal generators, digital arbitrary waveform generator for physiological signal simulation, multi-channel analog arbitrary signal source for physiological signal simulation (eg. ECG and LV pressure), responsive cardiac simulator for pacemaker testing (surface ECG, RA IEGM, RV IEGM, LV IEGM), how to perform volume-conductor experiments with voltage-to-current converters and physical models of the body.
Details on book contents are available at:
http://home.comcast.net/~prutchi/index_files/book_description.htm
and
http://home.comcast.net/~prutchi/index_files/book_circuits.htm
Best Regards,
David
www.prutchi.com