44.3.3 Automatic Input Offset Voltage Calibration

The input offset voltage can be automatically calibrated by setting the OFCSEL bits to ‘b10 and starting the calibration sequence. The automatic offset calibration result is stored internally and not accessible from the OPAxOFFSET register. The sequence of events for automatically calibrating the OPA input offset voltage is:

  • Set the OFCSEL bits to ‘b10 to select automatic offset calibration result as input offset voltage source
  • Set the OFCST bit to start the calibration sequence
  • Monitor the OFCST bit to determine when the calibration sequence has completed
Important:
  • The OFCST bit is only accessible to the user when the OPA module is in automatic input offset voltage calibration mode (OFCSEL = ‘b10)
  • It is recommended to perform the calibration sequence at least once after selecting the automatic input offset voltage calibration result as the OPA offset source (OFCSEL = ‘b10)
Figure 44-2. Automatic Input Offset Voltage Calibration Timing Diagram

OPA Automatic Offset Calibration in C

// Code sequence to automatically calibrate
// the input offset voltage of the OPA module

OPAxCON4bits.OFCSEL = 0b10;      // Select automatic offset calibration
                               // result as input offset voltage source
OPAxCON4bits.OFCST = 1;        // Start the calibration sequence
while (OPAxCON4bits.OFCST);    // Wait for the automatic offset calibration
                               // sequence to complete

Note:
  1. The automatic input offset voltage calibration sequence takes approximately 20 ms. The inputs and outputs of the OPA module are disconnected and not available during this time. The OPA module will return to its previous configured state once the automatic input offset voltage calibration is complete.
  2. The automatic input offset voltage calibration result is stored internally and not accessible to the user. In this mode, the OPAxOFFSET value remains unchanged.