Rtclk_read (), Rtcclk_gettime (), Rtclk_read – Maxim Integrated 73S12xxF Software User Manual
Page 28: Ge28), Rtcclk_gettime, E 28)

73S12xxF Software User Guide
UG_12xxF_016
28
Rev. 1.50
RTCCnt: Input parameter
32-bit RTC counter value.
RTCAcc[3]: Input parameter
24-bit accumulator value. Normally these values are to be initialized only once
during the manufacturing phase.
RTCTrim[3]: Input parameter
24-bit signed trimmer value. This is the offset value used to correct the quartz crystal
drift. It is the number of ticks between each correction of the Real Time Clock. Use
a negative numbers to decrease the tic-count by one and a positive number to
increase the tick-count by 1.
Return Codes None.
The RTC can be enabled and disabled via the PowerON() and PowerOFF() or RTCClk_Control ()
functions. The new values will not be loaded until the RTCLoad bit (bit 5) of the RTCCtl register
is set (HI).
RTClk_Read ()
Purpose
Extract the current Real Time Clock control, counter, accumulator, and trimmer values.
Synopsis
Void RTClk_Read ( IN struct RTC_t *pRTC );
struct RTC_t
{
Unsigned char RTCCtl;
Unsigned long RTCCnt;
Unsigned char RTCAcc[3];
Signed char
RTCTrim[3];
}
Parameters
RTCCtl: Output parameter
Current Real Time Clock Control register value (setting).
RTCCnt: Output parameter
Current Real Time Clock Counter value.
RTCAcc[3]: Output parameter
Current Real Time Clock accumulator value.
RTCTrim[3]: Output parameter
Current Real Time Clock Trimmer value.
Return Codes None.
RTCClk_GetTIME ()
Purpose
Extract current calendar Time. Time conversion is done by the Gregorian/Julian conversion
method as defined on website:
Synopsis
Void RTCClk_GetTIME ( struct C_RTC_t xdata *pRTC_Time )
struct C_RTC_t
{
Unsigned char
Sec;
Unsigned char
Min;
Unsigned char
Hour;
Unsigned char
Date;
enum MONTH
Month;
Unsigned integer
Year;
enum RTC_INTERVAL TicInterval;
//Tic interval - 1, 1/2 or 2 sec
enum RTC_INTERVAL IntInterval;
//int interval. NO_INT=disable int.
};