A PIN diode includes a first p-area, an n-area, and in between an intermediate
area on a first surface of a substrate, wherein a doping concentration of the intermediate
area is lower than a doping concentration of the p-area and lower than a doping
concentration of the n-area. Further, the PIN diode includes a first electrically
conductive member, which is arranged on a side of the p-area, which faces away
from the intermediate area, and a second electrically conductive member, which
is arranged on a side of the n-area, which faces away from the intermediate area.
The PIN diode is preferably separated from the substrate by an insulating layer,
covered by a further insulating layer on the surface, which faces away from the
substrate, and laterally surrounded by a trench filled with an insulating material,
such that it is essentially fully insulated and encapsulated.