Figure 2—The signal from the phototransistor is DC-coupled to the input amplifier. A 6-bit DAC supplies the DC offset to compensate brightness variations. A low-pass filter cleans the signal before it’s digitized. An 8-bit monostable timer repairs the pulsed signal from CRT monitors. A 16-bit timer is used for pulse-width measurement. The blue blocks are software implemented.