RTCC.getCalibration

Name

 * RTCC.getCalibration

Description
Gets the current value of the calibration fields (CAL<9:0>) of the RTC Control Register (RTCCON). This is the value that is added (or subtracted from) the RTCC timer once per minute to adjust the timekeeping of the RTCC. Calibration has the ability to eliminate an error of up to 260 ppm and provide a clock that is accurate to within 1 second per month.

Only works for 32-bit Pinguinos with a 32,768 kHz quartz crystal which allows the use of the built-in RTCC functionality of the PIC32, such as the Olimex PIC32 Pinguino OTG.

Syntax
int RTCC.getCalibration(void)
 * Parameters:
 * [None]


 * Returns/Output;
 * the current value of the calibration fields (CAL<9:0>) of the RTC Control Register (RTCCON).