The offset self-calibration command corrects internal ADC2 offset error. Program the ADC2 input multiplexer register (ADC2MUX) to FFh to force open all input connections before sending the command. When the SFOCAL2 self-calibration command is sent, the ADC shorts together the internal PGA inputs of ADC2, then averages 16 readings to reduce conversion noise for an accurate calibration. When calibration is complete, the offset calibration result is written to the 16-bit ADC2 offset calibration register ADC2OFC[1:0]. After calibration, set the input multiplexer to the desired channel.