主权项 |
1. A method, comprising:
receiving an optical signal; generating an electrical signal in response to the optical signal, a magnitude of the electrical signal based on a power of the optical signal; applying an adjustable gain to the electrical signal to generate an amplified electrical signal; sampling the amplified electrical signal to generate a digital sample of the amplified electrical signal; and controlling the adjustable gain applied to the electrical signal based on a value of the digital sample to substantially maintain the value of the digital sample within a particular resolution zone of an analog-to-digital converter, wherein controlling the adjustable gain comprises:
comparing the value of the digital sample with a high threshold digital sample value:comparing the adjustable gain with a low threshold gain value; andin response to the value of the digital sample exceeding the high threshold digital sample value and the adjustable gain exceeding the low threshold gain value, decreasing the adjustable gain. |