A device and a method for working in the presence of electromagnetic fields, in particular fields occurring in magnetic resonance tomography (referred to below as “MRT” or “MRI”) imaging devices. More precisely, the invention relates to a medical device (MD) in which an electrode is in contact with bodily tissue, and for detection of electromagnetic interference fields the input characteristic of the MD is automatically modified by a switching device in such a way that the influences of the electromagnetic interference fields are minimized.