A variable optical attenuator. A PIN structure is integrated with an
optical detector such as a PIN diode or an APD diode. When the PIN
structure is forward biased, the light signal is not affected and is
detected by the optical detector. When the PIN structure is reverse
biased, the light signal is attenuated and the dynamic range of the
optical detector can be increased.