Specifications
38
Curtis 1310 Manual, Rev. B
5 — VCL
Setup_RTC(7)
This function sets up the date and time on the Real-Time Clock. Note that the
24-hour format must be used to set the time.
Parameters
Hours Actual Hour in 24h format (0...23)
Minutes Actual Minute (0...59)
Seconds Actual Seconds (0...59)
Day Actual Day (1...31)
Month Actual Month (1...12)
Year Year (00...99)
DayofWeek Actual Day of Week (MONDAY...SUNDAY).
Returns
0 – Setup did not execute.
1 – Setup successful.
Error Codes Param_Range A parameter is out of range.
Examples If(RTC_Needs_Update=1)
{
Setup_RTC(14,35,00,11,6,12,MONDAY)
;June 11, 2012 at 2:35:00pm
}
Hold_RTC(0) and Release_RTC(0)
These functions stop and start the updating of the Date and Time variables. Note
that the internal clock continues to run independent of these functions; only the
VCL variables are not updated after a Hold_RTC is called. This can be useful when
writing the time out to a display or time stamping a fault into EEPROM, as the time
will not tick forward unexpectedly during the process.
Use Release_RTC() to allow the automatic update of the the correct time and date
VCL variables to continue.
Hold_RTC() will set the RTC_Disabled variable (=1) and Release_RTC() will clear
it (=0)
These functions have no parameters and no errors, and return nothing.
Examples Hold_RTC()
Release_RTC()










