Shown here is a simplified schematic showing a photo diode connected to a transimpedence (current to voltage) amplifier followed by a gain stage which features software controlled offset compensation. This is just one example of how these analog blocks may be configured. The low ohmic ground switches could be used to switch feedback resistors in or out to enable gain switching, or alternatively these switches could be used to ground the amplifier inputs to facilitate overall system offset calibration.