********************************************************************** Media Pro 4000 Brief June 23rd 2003 File: RTC-1248Y_Real_Time_Clock_Use_and_Y2K_BR06232003.txt Module: RTC-1248Y Title: Real Time Clock Use and Year 2000 Compliance ********************************************************************** 1) THE CLOCK/CALENDAR a) If a real-time clock is installed, the clock/calendar values are read from the hardware clock at initialization (reset or power-on) and reloaded once per hour thereafter. 1) If a real-time clock is installed, the clock/calendar values are read from the hardware clock at initialization (reset or power-on) and reloaded once per hour thereafter. 2) The hardware clock does not have a century register, but the firmware provides an integer for the year and will set it to the correct century 1998 through 2097. b) If no real-time clock module is installed, the operation is maintained by firmware. 1) With no hardware clock, the internal clock starts from zero at each reset or restart. 2) The clock operates on the internal 30Hz frame counter, which can be expected to be accurate to a few seconds per day; basically, this is the same accuracy as the hardware clock, but lacks the advantage of non-volatility AND running on battery. 3) Note that the 30Hz clock becomes slaved to video at 29.97 if the video sync input is connected. In that case, the accuracy attaches to the video rate. c) Note that the calendar, with or without a hardware clock, is cognizant of the number of days in each month, and of leap year. 2) The clock may be set as a 'port' resource by using the SET command: a) The clock/calendar operations of the ICM have been assigned to port 0. b) SET @R0,17,0 DEVICE 2 TO 1998 ; for the year SET @R0,17,0 DEVICE 3 TO 10 ; for the month, 1-12 SET @R0,17,0 DEVICE 4 TO 12 ; for the date, 1-31 SET @R0,17,0 DEVICE 5 TO 3 ; for the day, 1-7 (1=Sunday) SET @R0,17,0 DEVICE 1 TO hh:mm:ss.ff ;for the clock c) If a hardware clock is installed, it is set in the DEVICE 1 access, so that should ordinarily be the last action when it is necessary to set the entire clock/calendar. 3) The clock/calendar access is with the status mechanism for the same port: a) LOAD [@Vv,@Ii,@Oo] WITH @R0,17,0 STATUS 1 BYTE 0-3 ; FRAME_OF_DAY LOAD [@Vv,@Ii,@Oo] WITH @R0,17,0 STATUS 2 BYTE 0-1 ; YEAR LOAD [@Vv,@Ii,@Oo] WITH @R0,17,0 STATUS 3 BYTE 0-0 ; MONTH LOAD [@Vv,@Ii,@Oo] WITH @R0,17,0 STATUS 4 BYTE 0-0 ; DATE LOAD [@Vv,@Ii,@Oo] WITH @R0,17,0 STATUS 5 BYTE 0-0 ; DAY LOAD [@Vv,@Ii,@Oo] WITH @R0,17,0 STATUS 6 BYTE 0-0 ; HOUR LOAD [@Vv,@Ii,@Oo] WITH @R0,17,0 STATUS 7 BYTE 0-0 ; MINUTE LOAD [@Vv,@Ii,@Oo] WITH @R0,17,0 STATUS 8 BYTE 0-0 ; SECOND b) Note: Religious persuasions aside, the choice of day 1 corresponding to Sunday appears to be a standard, and literature from Dallas and Allen-Bradley was reviewed before adopting this convention in the Media Pro 4000. The only place this is hard-coded is in the display of the clock and system frame in the maintenance menu system, where the abbreviation 'Sun' corresponds to value 1 for this status. 4) There is currently no mechanism for directly using the clock/calendar to 'trigger', 'schedule', or 'synchronize' cues. 5) The FRAME_OF_DAY, if DISPLAYed with the %T specification, will show as an 'ordinary' 24 bit clock, with 30/s frame extension. 6) Year 2000 Compliance was tested on a ICM-4020 (11045-A) with Boot: ICMBT228.cod and Firmware 3220116T.cod. a) Rollover Tests, with ICM powered on and running. 1) Rollover to January 1st, 1999 - Passed. 2) Rollover to January 1st, 2000 - Passed. 3) Rollover to January 1st, 2001 - Passed. 4) Rollover to January 1st, 2097 - Passed. b) Rollover Tests, with ICM powered off. 1) Rollover to January 1st, 1999 - Passed. 2) Rollover to January 1st, 2000 - Passed. 3) Rollover to January 1st, 2001 - Passed. 4) Rollover to January 1st, 2097 - Passed. 7) Example Cue for setting the Date & Time. ;Set_RTC ; Set 'ICMRTC' Device 2 to 1999; Year Set 'ICMRTC' Device 3 to 1; Month Set 'ICMRTC' Device 4 to 1; Date Set 'ICMRTC' Device 5 to 6; Day (1=Sunday) Set 'ICMRTC' Device 1 to 00:00:00.00; Time ; 8) Example cue for retrieving and displaying the date & time. ;Display_RTC ; LOOP: Display "" Row 0 Column 0; Clear Line Display "" Row 1 Column 0; Clear Line Display "" Row 2 Column 0; Clear Line ; Load 'Year' with 'ICMRTC' Status 2 Byte 0-1; Year @v000 Load 'Month' with 'ICMRTC' Status 3 Byte 0-0; Month @v001 Load 'Date' with 'ICMRTC' Status 4 Byte 0-0; Date @v002 Load 'Hour' with 'ICMRTC' Status 6 Byte 0-0; Hour @v003 Load 'Minute' with 'ICMRTC' Status 7 Byte 0-0; Minute @v004 Load 'Second' with 'ICMRTC' Status 8 Byte 0-0; Second @v005 ; Load 'DOW' with 'ICMRTC' Status 5 Byte 0-0; Day of Week @v006 ; Load 'FOD' with 'ICMRTC' Status 1 Byte 0-3; Frame of Day @v007 ; Display "%d0" Row 0 Column 16; Year Display "%d2" Row 0 Column 13; Date ; If 'Month' != 1 GoTo FEB; Display "January" Row 0 Column 0; Month GoTo DAY; FEB: If 'Month' != 2 GoTo MAR; Display "February" Row 0 Column 0; Month GoTo DAY; MAR: If 'Month' != 3 GoTo APR; Display "March" Row 0 Column 0; Month GoTo DAY; APR: If 'Month' != 4 GoTo MAY; Display "April" Row 0 Column 0; Month GoTo DAY; MAY: If 'Month' != 5 GoTo JUN; Display "May" Row 0 Column 0; Month GoTo DAY; JUN: If 'Month' != 6 GoTo JUL; Display "June" Row 0 Column 0; Month GoTo DAY; JUL: If 'Month' != 7 GoTo AUG; Display "July" Row 0 Column 0; Month GoTo DAY; AUG: If 'Month' != 8 GoTo SEP; Display "August" Row 0 Column 0; Month GoTo DAY; SEP: If 'Month' != 9 GoTo OCT; Display "September" Row 0 Column 0; Month GoTo DAY; OCT: If 'Month' != 10 GoTo NOV; Display "October" Row 0 Column 0; Month GoTo DAY; NOV: If 'Month' != 11 GoTo DEC; Display "November" Row 0 Column 0; Month GoTo DAY; DEC: If 'Month' != 12 GoTo INV; Display "December" Row 0 Column 0; Month GoTo DAY; INV: Display "%d1 Invalid" Row 0 Column 0; Month GoTo DAY; ; DAY: If 'DOW' != 1 GoTo MON; Display "Sunday" Row 1 Column 0; Day GoTo Time; MON: If 'DOW' != 2 GoTo TUE; Display "Monday" Row 1 Column 0; Day GoTo Time; TUE: If 'DOW' != 3 GoTo WED; Display "Tuesday" Row 1 Column 0; Day GoTo Time; WED: If 'DOW' != 4 GoTo THU; Display "Wednesday" Row 1 Column 0; Day GoTo Time; THU: If 'DOW' != 5 GoTo FRI; Display "Thursday" Row 1 Column 0; Day GoTo Time; FRI: If 'DOW' != 6 GoTo SAT; Display "Friday" Row 1 Column 0; Day GoTo Time; SAT: If 'DOW' != 7 GoTo BDD; Display "Saturday" Row 1 Column 0; Day GoTo Time; BDD: Display "%d6 Invalid" Row 1 Column 0; Day GoTo Time; Time: Display "%d3" Row 1 Column 10; Hour Display ":%d4" Row 1 Column 12; Minute Display ":%d5" Row 1 Column 15; Second ; Display "%T7" Row 2 Column 0; Frame of Day ; GoTo LOOP; ; 9) Resulting Display January 1 1999 Friday 0 :0 :0 00:00:00.00 10) The Real Time Clock Date & Time can also be set through the HMT (Hand held Maintenance Terminal) System Menu. 11) On a ICM-4020 (11045-A) The Real Time Clock Should be Installed in U30 (Ram chip TC551001) {farthest from the Front Panel}. 12) If a RTC is installed in a ICM-4020 with Firmware 3220119u, or later Variables @V448 through @V512 are restored from non-volatile RAM; these last 64 variables are copied to the non-volatile RAM every time they change. 13) On a IMC-4010/20 (11066-B) The Real Time Clock Should be Installed in U25 (Ram chip TC551001) {farthest from the Front Panel}. a) As of IMC firmware IMC_119D.COD (06-12-2003) still only "LOAD ... WITH" is supported, ("load ... from" is not). ---------------------------------------------------------------------- Specifications subject to change at any time. The data in this document incorporates proprietary rights of Anitech Systems Inc., 25021 Anza Drive, Valencia, CA 91355 USA Phone (661) 257-2184 Fax (661) 257-2025 Email Mail@Anitech-Systems.com Web http://www.Anitech-Systems.com Any party accepting this document does so in confidence and agrees that it shall not be duplicated in whole or in part, nor disclosed to others, without the consent of ANITECH SYSTEMS.