Skip to content

getCalibrationTrim()

Arnd edited this page Aug 6, 2017 · 2 revisions

Function returns the value of the MCP7940's trim buffer. This is a software fine-tuning adjustment to the oscillator cycle calculations and ranges from -127 to 127. Each unit represent 2 clock cycles added or subtracted per minute. The MCP7940 datasheet describes the computations used on page 28.


Example:

...
MCP7940_Class MCP7940; // Create an instance of the MCP7940
...
  Serial.print("Trim value is ");
  Serial.print(MCP7940.getCalibrationTrim()*2);
  Serial.println(" cycles per minute.");
...