An optical transmitting and receiving device enabling incident light from an exterior to be detected with high precision is provided. A pixel electrode and a pixel driving element for driving the pixel electrode are provided in the display region, a driving circuitry section for controlling the pixel electrode and the pixel driving element is provided in the drive circuitry region. During operation, the sensor element provides a measuring signal which changes as a function of a measurement angle between the component of the field strength of the outer magnetic field lying in the plane of the layer system, and the direction of magnetization, and from which this measurement angle is able to be ascertained. Preferably, the device also checks whether the contacted item of equipment is trustable.