Patent ID: 8340519

Claim:
An apparatus comprising: (1) a receiver comprising: (a) a comparator, the comparator operable to provide a first output signal that has (i) a first digital state when the magnitude of a first electrical signal is greater than a first reference voltage and (ii) a second digital state when the magnitude of the first electrical signal is less than the first reference voltage, wherein the magnitude of the first electrical signal is based on a first optical signal transmitted by a first transmitter to the receiver; and (b) a voltage generator, the voltage generator operable to generate the first reference voltage; and (2) a controller that is operable to: (a) enable the first transmitter to transmit the first optical signal such that the first optical signal includes a first training pattern during a first testing timeslot; (b) provide a first test digital bit pattern to the voltage generator, wherein the first reference voltage is based on the first test digital bit pattern during the first training timeslot; (c) test the first output signal for presence of the first training pattern; (d) change the first test digital bit pattern if the first training pattern is not detected in the first output signal; and (e) store a first value in a database if the first training pattern is detected in the first output signal, the first value being based on the first test digital bit pattern.