The present invention provides a method and apparatus for detecting magnetic
fields in implantable medical devices. The apparatus includes a sensor adapted
to provide at least one signal proportional to at least one vector component of
a magnetic field. The apparatus further includes a circuit adapted to receive the
signal and perform a predetermined action when a predetermined quantity exceeds
a predetermined threshold value.