A system and method for automatically adjusting the gain for a shock lead
system in an implantable medical device is provided. The system and method
operate when, after a pre-selected period of time, the gain has not been
programmed. The system and method then automatically produce and set the
gain for the shock lead system. The system and method poll and determine a
maximum value for the output of the shock lead system amplifier and
produce a new gain value to scale the output to facilitate providing
useful data that is large enough to separate signal from noise but small
enough to avoid clipping.